1ãä¸è½½å®è£
âeclipseâ
2ãä¸è½½å®è£
âjdkâï¼ä¸è¬å°±ä¸è½½ææ°ççãï¼
3ã解åä¸è½½çeclipseæ件ï¼ä¸éè¦å®è£
ï¼è§£åå°ä½ æ³è¦çç®å½å³å¯
4ãé¦æ¬¡eclipseï¼ä¼è®©ä½ 设置工ä½ç©ºé´ï¼å»ºè®®æ好ä¸è¦æ¾å¨cç
5ãæå¼eclipseåï¼å¨Window-->Preferences-->Java-->Installed JREsãçè·¯å¾æ¯ä¸æ¯åæ们å®è£
çjdkè·¯å¾ä¸è´(第3æ¥éª¤ä¸è®°ä½çé£ä¸ªè·¯å¾)ã
6ãæeclipseä¸Javaç¼è¯å¨çæ¬æ¹ææ大ï¼å¨Window-->Preferences-->Java-->Compilerã
为äºé²æ¢å¨ä»¥åçå¼åä¸ï¼åºç°æä¸ªç©ºæ ¼å´åæäºå°é»ç¹ä»ä¹çæªè±¡ï¼æeclipseä¸ï¼å±å¼Window-->Preferences-->General-->Editors-->Text Editorså»æShow whitespace charactersåé¢çé©ã
å°è¿éwindowsä¸eclipse+javaå¼åç¯å¢å°±é
置好äºï¼å¯ä»¥è¯è¯ã
å¨eclipseç¼å第ä¸ä¸ªjavaç¨åºï¼HelloWord:
1ãæå¼eclipse-->å¨å·¥ä½åºå³å»-->æ°å»ºproject-->java projectï¼ä¼è·³è½¬å°javaè§å¾ï¼å¨Next Java Projectçªå£ä¸è¾å
¥Project nameï¼å
¶ä»æç
§é»è®¤ï¼ç¹Finishã
2ãå¨ç¡®è®¤çªå£(Open Associated Perspective?çªå£)ä¸ï¼éä¸Remember my decisionï¼ç¹Yesï¼å°±ä¼åæ¢å°javaè§å¾ã
3ãå±å¼javaå·¥ç¨ï¼ä¼æ个src(æ¾æºç¨åºç)ï¼å³é®ç¹å»src-new classï¼è¾å
¥ç±»åï¼å¦helloworldï¼éä¸èªå¨çæ主æ¹æ³(public static void main(String[] args))
å¨æå¼çhelloworldç±»è¾å
¥å¦ä¸ä»£ç ï¼å°±å®æäºä¸ä¸ªJAVAç¨åºã
public class helloworld{
pubilc static void main(String[] args){
System.out.println("æç第ä¸ä¸ªJAVAç¨åºï¼");
}
}
ç¹å·¥å
·æ runæé®è¿è¡ç¨åºï¼å¨æ§å¶å°å°±ä¼è¾åºï¼æç第ä¸ä¸ªJAVAç¨åºï¼
温馨提示:答案为网友推荐,仅供参考