×ðÁú¿­Ê±

linux java ±àÒëÏÂÁîÊÇʲô

linux java±àÒëÏÂÁî¡°javac [options] [source files]¡±£¬ÆäÖУ¬[options] ÊÇ¿ÉÑ¡µÄ±àÒëÑ¡ÏÓÃÓÚÖ¸¶¨±àÒëʱµÄһЩÉèÖòÎÊý£¬[source files] ÊÇÐèÒª±àÒëµÄ java Ô´´úÂëÎļþ·¾¶¡£

±¾½Ì³Ì²Ù×÷ϵͳ£ºLinux5.18.14ϵͳ¡¢Dell G3µçÄÔ¡£

ÔÚ Linux ÉÏ£¬Ê¹Óà Java ±àÒëÆ÷£¨javac£©À´±àÒë Java Ô´´úÂëÎļþ¡£ÏÂÃæÊÇÔÚ Linux ÖÕ¶ËÖÐʹÓà javac ÏÂÁî¾ÙÐÐ Java ±àÒëµÄ»ù±¾Óï·¨£º

javac [options] [source files]

µÇ¼ºó¸´ÖÆ

ÆäÖУ¬[options] ÊÇ¿ÉÑ¡µÄ±àÒëÑ¡ÏÓÃÓÚÖ¸¶¨±àÒëʱµÄһЩÉèÖòÎÊý£¬[source files] ÊÇÐèÒª±àÒëµÄ Java Ô´´úÂëÎļþ·¾¶¡£

ÒÔÏÂÊÇһЩ³£ÓÃµÄ javac ±àÒëÑ¡Ï

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

-d £ºÖ¸¶¨±àÒëÊä³öĿ¼¡£

-classpath £ºÖ¸¶¨Àà·¾¶£¬ÓÃÓÚ²éÕÒÒÀÀµµÄÀàºÍ°ü¡£

-sourcepath £ºÖ¸¶¨Ô´´úÂë·¾¶£¬ÓÃÓÚ²éÕÒÒýÓõÄÔ´Îļþ¡£

-version£ºÏÔʾ±àÒëÆ÷µÄ°æ±¾ÐÅÏ¢¡£

-help£ºÏÔʾ×ÊÖúÐÅÏ¢¡£

ÀýÈ磬ÈôÊÇÄãÓÐÒ»¸öÃûΪ HelloWorld.java µÄ Java Ô´´úÂëÎļþ£¬²¢ÇÒÄãÏ뽫±àÒëЧ¹ûÊä³öµ½Ä¿½ñĿ¼Ï嵀 output Îļþ¼ÐÖУ¬¿ÉÒÔʹÓÃÒÔÏÂÏÂÁî¾ÙÐбàÒ룺

javac -d output HelloWorld.java

µÇ¼ºó¸´ÖÆ

Õ⽫ÔÚ output Îļþ¼ÐÖÐÌìÉúÒ»¸öÃûΪ HelloWorld.class µÄ±àÒëºóµÄ×Ö½ÚÂëÎļþ¡£

Çë×¢ÖØ£¬ÔÚ±àÒë֮ǰ£¬È·±£ÄãÒѾ­×¼È·×°ÖÃÁË Java Development Kit£¨JDK£©£¬²¢ÇÒ½« java ºÍ javac ÏÂÁîÌí¼Óµ½ÁËϵͳµÄ PATH ÇéÐαäÁ¿ÖУ¬ÒÔ±ãÔÚÈκÎλÖö¼Äܹ»»á¼ûµ½ËüÃÇ¡£

ÒÔÉϾÍÊÇlinux java ±àÒëÏÂÁîÊÇʲôµÄÏêϸÄÚÈÝ£¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

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

Ïà¹ØÐÂÎÅ

ÁªÏµ×ðÁú¿­Ê±

18523999891

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

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

QR code
¡¾ÍøÕ¾µØͼ¡¿¡¾sitemap¡¿