在 Mac10.9 和 JDK7 環境中運行 IntelliJ IDEA

來源:互聯網
上載者:User

在 Mac10.9 和 JDK7 環境中運行 IntelliJ IDEA

升級到 Mavericks 之後,需要自行安裝 JDK 環境。如果你安裝了 JDK7,那麼在安裝之後,在命令列中運行 javac、java 命令沒有問題,但是 Eclipse 和 IDEA 都無法啟動,系統要求安裝 JDK6。

經過以下幾個步驟可以恢複正常使用:

  • 找到 /Library/Java/JavaVirtualMachines/jdk1.7.0_XX.jdk/Contents/Info.plist,增加後邊的 4 個 string。

      <key>JVMCapabilities</key>  <array>      <string>CommandLine</string>      <string>JNI</string>          <string>BundledApp</string>        <string>WebStart</string>        <string>Applets</string>  </array>
  • 找到 /Applications/IntelliJ IDEA XXX.app/Contents/Info.plist file. 修改 JVMVersion 從 1.6* 到 1.7*。

      <key>JVMVersion</key>  <string>1.7*</string>
  • 啟動 IDEA12,按以下步驟選擇相應的 JDK Home。

      File - Project Structure - Project - New - JDK
  • 如果是 Eclipse,那做完第一步就可以正常啟動了;如果是 IDEA,那麼需要三步都做完整。

mvn -v error

# mvn -v

Error: JAVA_HOME is not defined correctly.  We cannot execute /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/bin/java

# vim /etc/profile

export JAVA_HOME=`/usr/libexec/java_home -v 1.7`export PATH=$JAVA_HOME/bin:$PATH    

# source /etc/profile

IntelliJ IDEA: 字型美化(anti-aliased)和字型添加

IntelliJ IDEA 12 建立Web項目圖文詳細教程

用IntelliJ IDEA開發Android程式圖文教程

IntelliJ IDEA 12開發haXe NME應用配置指南

IntelliJ IDEA運行Play Framework的test mode

Ubuntu 13.04 安裝IntelliJ IDEA 12

IntelliJ IDEA 12建立Maven管理的Java Web項目(圖解)

IntelliJ IDEA 的詳細介紹:請點這裡
IntelliJ IDEA 的:請點這裡

本文永久更新連結地址:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.