日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

maven+eclipse编译常见问题

發(fā)布時(shí)間:2025/4/5 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 maven+eclipse编译常见问题 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.


問題:

?

[ERROR] Unable to locate the Javac Compiler in: [ERROR] C:\Program Files (x86)\Java\jre1.5.0_11\..\lib\tools.jar [ERROR] Please ensure you are using JDK 1.4 or above and [ERROR] not a JRE (the com.sun.tools.javac.Main class is required). [ERROR] In most cases you can change the location of your Java [ERROR] installation by setting the JAVA_HOME environment variable.


網(wǎng)上有人說eclipse.ini文件中設(shè)置

?

?

-vm
C:\Program Files\Java\jdk1.6.0_21\jre\bin\javaw.exe

或者

window-->preferences-->java-->Installed JREs:將路徑設(shè)置成jdk的路徑


這些方法都是影響這個(gè)ide環(huán)境的,更好的方法是針對(duì)項(xiàng)目進(jìn)行修改:

最佳解決方案(我懶就不翻譯了):


?

?You can install as many different versions of Java — JREs and JDKs — as you like, and tell Eclipse which one to use for each project.

First step is to install the JDK 1.5 on your machine (JDK is short for 'Java [SE] Development Kit', look for that on the Oracle download site). The JDK includes a JRE, so to make life easier you can usually just install the JDK and not worry about the JRE/JDK distinction.

Second step is to tell Eclipse about the new JDK. Go to?Preferences...?then?Java?>?Installed JREs. Click the?Search...?button and Eclipse should find your newly installed JDK 1.5 and add it to the list.

Final step is to allocate that JDK 1.5 to your project. Bring up the?Properties?menu for your project (right-click it). Then set these values:

  • Java Compiler?tab
    • Tick?Enable project specific settings
    • Set?Compiler Compliance level?to?1.5
  • Java Build Path?tab,?Libraries?subtab
    • Find the?JRE System Library?item, click?Edit...
    • Set?Alternate JRE?to your newly installed JDK 1.5

?

轉(zhuǎn)載于:https://www.cnblogs.com/kinzhang/archive/2012/07/30/3048794.html

總結(jié)

以上是生活随笔為你收集整理的maven+eclipse编译常见问题的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。