Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÔÚLINUXϲ¿ÊðJAVAÏîÄ¿ - Java / Java EE

ÎÒÔÚWINDOWÏÂдÁËÒ»¸öJAVAÏîÄ¿µ÷¶ÈµÄÏîÄ¿¡£

ÎÒ°ÑËü·ÅÔÚLINUXϵͳÏ£¬ÎÒÏëÖªµÀÔõôÆô¶¯Õâ¸öÏîÄ¿£¨·ÇWEBÏîÄ¿£©¡£
Ò»ÑùµÄ£¬µ÷ÓÃ
java your_class
or
java -jar your_jar


µ«ÊÇÎÒµÄÏîÄ¿ÒýÓÃÁ˵ÚÈý·½JAR°ü£¬Æô¶¯¾Í±¨ÀàÕÒ²»µ½¡£

  ²»ÖªÔõôÅäÖá£

javaÊÇÒ»¸ö¿ÉÖ´ÐÐÎļþ£¬Êµ¼ÊÉÏÎÞÂÛÊÇÔÚLinuxÉÏ»¹ÊÇÔÚWindowsÉÏ£¬ÄãµÄjar»òÕßclass¶¼ÊDZ»µ±×ö²ÎÊý´«µÝ¸øÁËjavaÕâ¸ö¿ÉÖ´ÐгÌÐò¡£
ÔÚWindowsÉÏ£¬Äã¿ÉÒÔÓÃbat£¬¿ÉÒÔÔÚcmdÖÐÖ±½ÓÆô¶¯java³ÌÐò¡£
ÔÚLinuxÉÏÒ²Ò»Ñù¡£½øÈë¿ØÖÆ̨£¬ÉèÖúû·¾³±äÁ¿(¿É×Ô¼ºÐ´½Å±¾)£¬ÊäÈëºÍwindowsÉÏÏàͬµÄÃüÁî¾ÍÐÐÁË¡£
Ç°ÌáÊÇ£¬ÄãµÄLinuxÉϵÃÓÐjre¡£


ÀàÕÒ²»µ½£¬ÊÇÒòΪÄãµÄclasspathÉèÖò»ÕýÈ·¡£
°ÑÐèÒªµÄjar¶¼·Åµ½Ò»¸ölibÏ£¬¼ÙÉèÊÇ/home/yourname/lib
È»ºó£º
CLASS_PATH=/home/yourname/lib
JAVA_HOME=/opt/java/jrex.x.x

$JAVA_HOME/bin/java -cp $CLASS_PATH yourClassOrJarName

jar °üµÄ»°£¬ÒªÔÚ jar °üµÄ META-INF/MANIFEST.MF ÎļþÖмÓÉÏ Class-Path: ÏîµÄ¡£¹ØÓÚÕâ¸ö¾ßÌåÔõô¼ÓÎÒÔÚÕâ¸öÂÛ̳ÖÁÉٻظ´¹ý 10 ´Î£¬²»ÏëÔÙ˵ÁË¡£

²»¹ýÎÒ½¨Òé¿ÉÒÔÖ±½Ó°Ñ class Îļþ¸´ÖƹýÈ¥£¬Ò²²»Óôòʲô jar °üÁË£¬Óà class ÔËÐС£Linux µÄ»°£¬ÔÚÆô¶¯ÃüÁîºóÃæ¼Ó¸ö & ·ûºÅ£¬¿ÉÒÔÈóÌÐòÔÚºǫ́ÔËÐУ¬ÐèÒª¼Ç¼һÏÂÕâ¸ö³ÌÐòµÄ PID ºÅ±ãÓÚÒÔºó kill µôÕâ¸ö³ÌÐò¡£

ÒýÓÃ

jar °üµÄ»°£¬ÒªÔÚ jar °üµÄ META-INF/MANIFEST.MF ÎļþÖмÓÉÏ Class-Path: ÏîµÄ¡£¹ØÓÚÕâ¸ö¾ßÌåÔõô¼ÓÎÒÔÚÕâ¸öÂÛ̳ÖÁÉٻظ´¹ý 10 ´Î£¬²»ÏëÔÙ˵ÁË¡£

²»¹ýÎÒ½¨Òé¿ÉÒÔÖ±½Ó°Ñ class Îļþ¸´ÖƹýÈ¥£¬Ò²²»Óôòʲô jar °üÁË£¬Óà class


Ïà¹ØÎÊ´ð£º

linux»·¾³ÏÂgethostbynameº¯ÊýÎÊÌâ - C/C++ / CÓïÑÔ

дÁ˸ö²âÊÔ³ÌÐòÈçÏÂ
   
  struct hostent *hp; 
char AlarmDevIP[20];  
  int x2;

hp = gethostbyname("www.google.com");
if (hp)
{ ......

¹ØÓÚAJAXºÍJSPµÄһЩСÎÊÌâ¡« - Java / Web ¿ª·¢

ÎÒJSPµÄÒ³ÃæÊÇ£º
<%@ page language="java" contentType="text/html; charset=gb2312"
  %>
<script>
function Save(){
xmlHttp=GetXmlHttpObject()
if(xmlHttp==nul ......

JAVAµç×Ӵʵ䣿 - Java / Java SE

¸÷·´óÏÀ¸ø¸ö˼·£¬²»ÊÇÔÚÏßµÄÄÇÖÖ£¬¾ÍÊÇÒ»¸ö×öÆÕͨµÄÓ¦ÓóÌÐò¡£


´Ê¿âÔõôÉú³ÉÄØ£¿

²»»á¡£

ÒýÓÃ
´Ê¿âÔõôÉú³ÉÄØ£¿
ÕÒ±¾×Öµä

ÒýÓÃ
´Ê¿âÔõôÉú³ÉÄØ£¿
Êý¾Ý¿â ºÇºÇ

ÓÃmap ¼üÖµ¶ÔÓ¦

Èç¹ûÓÃÊý¾Ý¿ ......

javaÖеÄ×¢½â¿ÉÒÔÓÐÄÄЩ£¿ - Java / Java EE

È磺 @superwaring("unchecked");
Õâ¸öÀïÃ涼¿ÉÒÔÈ¡ÄÄЩֵ°¡£¬»¹ÓÐÀàËÆµÄ @superwaring±êÇ©ÓÐÄÄЩ°¡
ûÓùý¡£¡£

¿´jeeµÄapi
javax.persistenceÀï
@superwaring("unchecked");Ö»ÊǺöÂÔ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ