é ç½®javaè¿è¡ç¯å¢çè¯éè¦ä»¥ä¸æ¥éª¤ï¼
1ãä»Oracleå®ç½ä¸è½½å¹¶å®è£ jdkï¼å¦jdk1.7çwindowså®è£ æ件åï¼jdk-7u79-windows-x64.exeï¼
2ãé ç½®jdkç¯å¢åé
a)ä¾æ¬¡æå¼æççµèå³å»ââå±æ§ââé«çº§ç³»ç»è®¾ç½®ï¼å·¦è¾¹æåä¸é¡¹ï¼ââé«çº§ââç¯å¢åéï¼æå¼ççé¢ä¸é¢é¨å为ç¨æ·ç¯å¢åéï¼ä¸é¢çæ¯ç³»ç»ç¯å¢åéï¼
b)ç¹å»ä¸é¢çæ°å»ºï¼æ°å»ºç¯å¢åé
åéåï¼JAVA_HOME
å¼ï¼C:\Program Files\Java\jdk1.7.0_79
说æï¼å¼ä¸ºjdkçå®è£ ä½ç½®
c)åæ°å»ºä¸ä¸ªç³»ç»ç¯å¢åé
åéåï¼CLASS_PATH
å¼ï¼%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar;.;
dï¼ä¿®æ¹ç³»ç»ç¯å¢åéPathï¼å¨åé¢å å ¥ï¼
;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin
ä¸é¢ä¸è¡ä¸ºéè¦å å ¥çå 容ï¼æ³¨æåé¢çâ;âä¹æ¯è¦å å ¥
3ãç»è¿ä¸é¢ä¸¤æ¥é
置就å®æäºã
4ãéªè¯javaç¯å¢
è¿è¡cmdï¼windowé®+Ré®ï¼å¼¹åºè¿è¡æ¡ï¼è¾å
¥cmdå车ï¼å°±è¿è¡cmdé»è²çdosçªå£äº
å¨cmdçªå£ä¸è¾å ¥ï¼java -version ç»æä¼æå°åºå½åé ç½®çjdkçæ¬ä¿¡æ¯ï¼è¿è¡ç»æå¦å¾
OKï¼ç»è¿ä¸é¢çæ¥éª¤jdkçç¯å¢å°±é ç½®å®æäº