×ðÁú¿­Ê±¹ÙÍøµÇ¼

ʹÓÃEclipse¾ÙÐÐLinux Java¿ª·¢µÄ»ù±¾ÉèÖÃÖ¸ÄÏ

ʹÓÃeclipse¾ÙÐÐlinux java¿ª·¢µÄ»ù±¾ÉèÖÃÖ¸ÄÏ

СÐò£º

Eclipse ÊÇÆÕ±éÓÃÓÚ Java ¿ª·¢µÄ¼¯³É¿ª·¢ÇéÐΣ¨IDE£© £¬ÌṩÁËÐí¶àÀû±ãµÄ¹¦Ð§ºÍ¹¤¾ß¡£ÔÚ Linux ²Ù×÷ϵͳÉÏʹÓà Eclipse ¾ÙÐÐ Java ¿ª·¢ £¬¿ÉÒÔʹ¿ª·¢Àú³ÌÔ½·¢¸ßЧ¡£±¾ÎĽ«ÏÈÈÝÔõÑùÔÚ Linux ÉÏÉèÖà Eclipse £¬ÒÔ±ã˳Ëì¾ÙÐÐ Java ¿ª·¢¡£

°ì·¨Ò»£º×°Öà Eclipse

·­¿ªÖÕ¶Ë £¬²¢½øÈ뵽ϣÍû×°Öà Eclipse µÄĿ¼¡£

´Ó Eclipse ¹Ù·½ÍøÕ¾£¨https://www.eclipse.org/downloads/£©ÏÂÔØÊÊÓÃÓÚ Linux µÄ×îа汾µÄ Eclipse¡£

ÔÚÖÕ¶ËÖÐʹÓÃÒÔÏÂÏÂÁî½âѹÏÂÔØµÄ Eclipse ѹËõ°ü£º

tar -zxvf eclipse-xxx.tar.gz

µÇ¼ºó¸´ÖÆ

Õ⽫½âѹÎļþµ½Ä¿½ñĿ¼Ï¡£

Á¬Ã¦Ñ§Ï°¡°JavaÃâ·ÑѧϰÌõ¼Ç£¨ÉîÈ룩¡±£»

°ì·¨¶þ£ºÌí¼Ó JDK ·¾¶

È·±£ÒѾ­×°ÖÃÁË JDK£¨Java Development Kit£©¡£

·­¿ªÖÕ¶Ë £¬²¢ÊäÈëÒÔÏÂÏÂÁîÒÔÈ·¶¨ JDK ×°ÖõÄλÖãº

update-alternatives --config java

µÇ¼ºó¸´ÖÆ

ÔÚÊä³öÖÐ £¬ÕÒµ½ JDK ×°ÖõÄ·¾¶¡£Í¨³£ÇéÐÎÏ £¬JDK ×°Ö÷¾¶ÀàËÆÓÚ /usr/lib/jvm/java-x.x.x-openjdk-amd64¡£

·­¿ª Eclipse £¬Ôڲ˵¥À¸ÖÐÑ¡Ôñ Window -> Preferences ¡£

ÔÚ·­¿ªµÄ´°¿ÚÖÐ £¬Õö¿ª Java -> Installed JREs¡£

µã»÷ Add £¬²¢ÔÚµ¯³ö´°¿ÚÖÐÑ¡Ôñ Standard VM £¬È»ºóµã»÷ Next¡£

ÔÚ JRE home ×Ö¶ÎÖÐ £¬µã»÷ Directory…²¢Ñ¡Ôñ JDK ×°Ö÷¾¶¡£

µã»÷ Finish £¬È»ºóµã»÷ Apply and Close¡£

°ì·¨Èý£ºÉèÖà Eclipse ÊÂÇéÇø

·­¿ª Eclipse¡£

ÔÚÆô¶¯´°¿ÚÖÐÑ¡ÔñÒ»¸öĿ¼×÷ΪÄãµÄÊÂÇéÇø¡£

ÈôÊÇÄãµÄÏîÄ¿ÒѾ­±£´æ £¬¿ÉÒÔÑ¡Ôñ Open Projects from File System £¬²¢Ñ¡ÔñÏîÄ¿ËùÔÚµÄĿ¼¡£ÈôÊÇÄãÏ뽨ÉèÒ»¸öÐÂÏîÄ¿ £¬¿ÉÒÔÑ¡Ôñ Create a new Java Project¡£

°ì·¨ËÄ£º½¨ÉèÒ»¸ö Java ÏîÄ¿

ÔÚ Package Explorer ÖÐÓÒ»÷ÊÂÇé¿Õ¼ä £¬Ñ¡Ôñ New -> Java Project¡£

ÔÚ Project name ×Ö¶ÎÖÐÊäÈëÏîÄ¿µÄÃû³Æ¡£

µã»÷ Finish¡£

°ì·¨Î壺±àдºÍÔËÐÐ Java ´úÂë

ÔÚ Package Explorer ÖÐÓÒ»÷¸Õ½¨ÉèµÄÏîÄ¿ £¬Ñ¡Ôñ New -> Class¡£

ÔÚ Name ×Ö¶ÎÖÐÊäÈëÀàµÄÃû³Æ¡£

¹´Ñ¡ public static void main(String[] args) £¬È»ºóµã»÷ Finish¡£

Ôڱ༭Æ÷ÖÐ £¬ÊäÈëÄãµÄ Java ´úÂë¡£ÀýÈ磺

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

µÇ¼ºó¸´ÖÆ

µã»÷²Ëµ¥À¸ÖÐµÄ Run -> Run£¨»òʹÓÿì½Ý¼ü Ctrl + F11£©ÔËÐдúÂë¡£

ÔÚ Console ÊÓͼÖÐ £¬Ä㽫¿´µ½³ÌÐòÊä³öÁË Hello, World!¡£

½áÂÛ£º

ͨ¹ýƾ֤±¾ÎÄÌṩµÄ°ì·¨ £¬ÔÚ Linux ²Ù×÷ϵͳÉÏÉèÖúÍʹÓà Eclipse ¾ÙÐÐ Java ¿ª·¢Ó¦¸ÃÊÇÏà¶ÔÈÝÒ׵ġ£Ï£Íû±¾ÎÄÄÜΪÄãÌṩÓÅÒìµÄ¿ª·¢ÇéÐκͿª·¢ÌåÑé¡£

ÒÔÉϾÍÊÇʹÓÃEclipse¾ÙÐÐLinux Java¿ª·¢µÄ»ù±¾ÉèÖÃÖ¸ÄϵÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í×ðÁú¿­Ê±¹ÙÍøµÇ¼ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±¹ÙÍøµÇ¼

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
ÍøÕ¾µØͼ