我對Java很陌生並且使用IDE。我有一個問題,我想知道是否有人可以幫助我。我編譯HelloWorld項目並保存它,但是當我右鍵單擊主項目時,編譯類路徑是空的。我知道我需要向libria添加JAR文件,但我不確定添加哪個文件,這給我帶來了問題,因爲我無法編譯IDE之外的項目。我在Windows7系統上使用NetBeans。編譯類路徑
有反正你可以幫我嗎?
這是我的代碼運行正常
public class helloworld {
public static void main(String[] args) {
System.out.println("Hello OCA World");
}
}
這是我的JDK箱C中的位置:\ Program Files文件\的Java \ jdk1.7.0_09 \ BIN ,這是它輸入到系統變量\路徑
C:\ Program Files \ java \ jdk1.7.0_ {xx} \ bin; C:\ Program Files \ Common Files \ Microsoft Shared \ Windows Live; C:\ Program Files(x86) \ Common Files \ Microsoft Shared \ Windows Live;%SystemRoot%\ system32;%SystemRoot%;%SystemRoot%\ System32 \ Wbem;%SYSTEMROOT%\ System32 \ WindowsPowerShell \ v1.0 \; c:\ Program文件(x86)\ ATI Technologies \ ATI.ACE \ Core-Static; C:\ Program Files \ Dell \ Dell無線WLAN卡; C:\ Program Files(x86)\ Windows Live \ Shared; C:\ Program Files(x86 )\ Common Files文件\ Roxio的共享\ DLLShared \中國:\程序文件(x86)\ QuickTime的\ QTSystem \
我猜這就是「{xx}」第一部分而不是「09」這是實際的路徑。 –
PATH與CLASSPATH無關 – madth3
看起來您需要將classpath添加到您的系統環境中。請點擊此鏈接http://www.ecs.umass.edu/ece/ece122/help/setenvironment.htm – Smit