ÔÚLinux²¿ÊðÏîĿʱ£¬jdkµÄÎÊÌâ
Ò»°ãÔÚlinuxÉϲ¿ÊðÏîĿʱ£¬Ö±½Ó°ÑÔÚwindowÉϱàÒë³öÀ´µÄjarÎļþ²¿ÊðÉÏÈ¥£¬ÔÙÔËÐоͿÉÒÔÁË£¬µ«ÊǽñÌìÅöµ½µÄÎÊÌâ £º
Exception in thread "main" java.lang.NoClassDefFoundError: DataServer
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
Caused by: java.lang.ClassNotFoundException: DataServer not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:/root/test/jar/dom4j-1.6.1.jar,file:/root/test/jar/jaxen-1.1-beta-6.jar,file:/root/test/jar/log4j-1.2.15.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
ÔÒò£º²»ÊÇ°æ±¾µÄÔÒò£¬ËäÈ»ÔËÐÐʱ»·¾³ºÍ±àÒëʱ»·¾³°æ±¾²»Ò»ÖÂͨ³£»áµ¼ÖÂһЩÎÊÌ⣬µ«ÎÒ¾õµÃ²»ÊÇÄãÕâ¸öÎÊÌâµÄ¹Ø¼üËùÔÚ¡£¹Ø¼üÊÇClassÎļþµÄ¸ñʽ²»Äܱ»Ê¶±ð
ÿһ¸öJAVA ClassÎļþµÄÇ°4¸ö×Ö½Ú±»³ÆΪËûµÄħÊý£¨magic number£©£º0XCAFEBABE¡£Ä§ÊýµÄ×÷ÓÃÔÚÓÚ£¬¿ÉÒÔÇáËɵطֱæ³öJava ClassÎļþºÍ·ÇJava ClassÎļþ¡£ÔÚClassÎļþµÄ½ÓÏÂÀ´µÄ4¸ö×Ö½Ú°üº¬Ö÷¡¢´Î°æ±¾ºÅ¡£µ±ÄãÓÃjavac ±àÒëÒ»¸öjavaÔ´³ÌÐòΪJava ClassÎļþµÄʱºò£¬Javac »á°ÑÆäÖ÷¡¢´Î°æ±¾Ð´ÈëclassÎļþÖ¸¶¨µÄλÖÃÖС£µ±ÄãÓÃjava ClassFileÔËÐÐÄãµÄJava ClassÎļþµÄʱºò£¬ÔËÐÐʱ»áÅжϸÃClassµÄÖ÷¡¢´Î°æ±¾
»ùÓÚÏòϼæÈݵÄÔÔò£¬ÄãÓõͰ汾µÄjavac±àÒëµÄClassÎļþ¿ÉÒÔÔڸ߰汾µÄÔËÐÐʱ»·¾³ÖÐÔËÐУ»µ«ÊÇ·´¹ýÀ´£¬ÄãÓø߰汾µÄjavac±àÒëµÄClassÎļþ²»¿ÉÒÔÔڵͰ汾µÄÔËÐÐʱ»·¾³ÖÐÔËÐУ¬¼´Ê¹ÄãûÓÐÓõ½µÍ°æ±¾²»Ö§³ÖµÄ¸ß°æ±¾Ð¼ÓÈëµÄÌØÐÔ£¬JavaÔËÐÐʱ»á¸øÓû§ÌṩÏêϸµÄ´íÎ󱨸棬ÄÚÈÝÓ¦¸ÃÊÇNotSupportedVersionÖ®ÀàµÄ£¨Çë²Î¿¼Java APIµÄ˵Ã÷£©
1. ÓÃ1.5.0.7±àÒëʱ»·¾³±àÒ룬ÓÃ1.5.0.7ÔËÐÐʱ»·¾³ÔËÐÐ
-bash-3.00$ pwd
/home/a/u/wuqingping/testpro
-bash-3.00$ more HelloWorld.java
public class HelloWorld
{
public static void main(String args[]) throws Exception
{
Ïà¹ØÎĵµ£º
¼ò½é
ÕâƪÎÄÕÂÖ÷Òª¼Ç¼ÎÒÔÚÊÔͼ½â¾öÈçºÎ¾¡¿ÉÄܾ«È·µØÔÚij¸öÌض¨µÄʱ¼ä¼ä¸ôÖ´ÐÐijÏî¾ßÌåÈÎÎñʱµÄ˼·Àú³Ì£¬²¢ÔÚºóÆÚ¶ÔÏà¹ØµÄAPI½øÐеĹéÄɺÍ×ܽᣬÒÔ±¸²Î¿¼¡£
ÎÊÌâÒý³ö
ºÜ¶àʱºò£¬ÎÒÃÇ»áÓÐÀàËƓÿ¸ô¶à³¤Ê±¼äÖ´ÐÐijÏîÈÎÎñ
”µÄÐèÇó£¬Õ§¿´Õâ¸öÎÊÌâ²¢²»Äѽâ¾ö£¬ÊµÔò²¢²»ÈÝÒ×£¬ÓкܶàÒþº¬Ìõ¼þÐèÒª¿¼ÂÇ£¬Ö ......
ת×Ôhttp://blog.163.com/ericxia_gnikam/blog/static/969208792008102545614453/
ÔÚLinux kernelµÄÔ´´úÂëÖУ¬¾³£Äܼûµ½if(likely(x))»òif(unlikely(x))Ö®ÀàµÄÓ÷¨£¬ÆäÈ·Çк¬ÒåÐèҪ˵Ã÷һϣ¬ÒÔ±ã¸üºÃµÄÀí½âkernelµÄÔ´´úÂë¡£
likelyÓëunlikelyÕâÁ½¸öºêÔÚlinux/compiler.hÖеĶ¨ÒåÈçÏ£º
#define likely ......
Ê×ÏÈ°²×°±ØÐèµÄ¿ª·¢
°ü
sudo apt-get install gcc g++ libgcc1 libg++ make gdb
°²×°MYSQLµÄCÓïÑÔ¿ª·¢°ü
sudo apt-get install libmysql++-dev libmysql++2c2a libmysqlclient15-dev libmysqlclient15off
°ÑlibÎļþ¿½±´µ½¹«ÓÃ
sudo cp /usr/lib/mysql/* /usr/lib/
½¨Á¢Ò»¸öÐÂÎļþtest.cpp
vim test.cpp
ÊäÈëÄÚÈÝ
......
Ò»¡¢ ʲôÊÇϵͳµ÷ÓÃ
ÔÚLinuxµÄÊÀ½çÀÎÒÃǾ³£»áÓöµ½ÏµÍ³µ÷ÓÃÕâÒ»ÊõÓËùνϵͳµ÷Ó㬾ÍÊÇÄÚºËÌṩµÄ¡¢¹¦ÄÜÊ®·ÖÇ¿´óµÄһϵÁеĺ¯Êý¡£ÕâЩϵͳµ÷ÓÃÊÇÔÚÄÚºËÖÐʵÏֵģ¬ÔÙͨ¹ýÒ»¶¨µÄ·½Ê½°Ñϵͳµ÷ÓøøÓû§£¬Ò»°ã¶¼Í¨¹ýÃÅ(gate)ÏÝÈë(trap)ʵÏÖ¡£ÏµÍ³µ÷ÓÃÊÇÓû§³ÌÐòºÍÄں˽»»¥µÄ½Ó¿Ú¡£
¶þ¡¢ ϵͳµ÷ÓõÄ×÷Ó ......