javaÃüÁîÐÐÏÂÔËÐÐclassÎļþ
½ñÌìÅöµ½ÁËÒ»¸öºÜ±ä̬µÄÎÊÌ⣬дÁËÒ»¸öºÜ¼òµ¥µÄHelloWord.java£¬ÄÚÈÝÈçÏ£º
package com.yanjiuyanjiu;
public class HelloWorld {
public static void main(String args[]) {
System.out.println("Hello World!");
}
}
ÔÚeclipseÖÐÔËÐÐÊÇ¿ÉÒԵģ¬µ«ÊÇÔÚÃüÁîÐÐÏÂÔËÐÐ×ÜÊÇʧ°Ü¡£ÎҵŤ³ÌλÖÃΪ d:\workspace\HelloWorld\¡£
³¢ÊÔÁ˺ܶà´Î£¬ÈçÏÂ
d:\workspace\HelloWorld\bin\com\yanjiuyanjiu\>java HelloWorld
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld (wrong name: com/yanjiuyanjiu/HelloWorld)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: HelloWorld. Program will exit.
Exception in thread "main"
d:\workspace\HelloWorld\bin\com\yanjiuyanjiu\>java -classpath .; HelloWorld
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld (wrong name: com/yanjiuyanjiu/HelloWorld)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Sourc
Ïà¹ØÎĵµ£º
ÔÚµ±½ñÕâ¸öʱ´ú,ÒªÏëÄܹ»ºÜºÃµÄÉú´æ,¾ÍµÃÓÐ×ã¹»µÃʵÁ¦,ÓÐÄܹ»¿¿µÄסµÄ¼¼Êõ,ÔÚ´óѧѧÁËÁ½Äê°ëµÄÈí¼þ¹¤³Ìרҵ,ÓÐÁ˺ܶàµÄÌå»á,ѧÁ˺ܶàûÓÐÓõĶ«Î÷,ÓÐһЩËäÈ»ÊǺÜÓÐÓÃ,µ±ÊÇÓÖ²»ÊÇÒ»Á½ÄêÄÚÄÜÓõÄÉϵÄ֪ʶ,ËùÒÔÎҾ͵Ã×Ôѧ,ѧʲôÄØ?ѧÓÐʹÓõö«Î÷,Äܹ»ÎªÈÕºóµÄ¹¤×÷ÓõÄÉϵÄ֪ʶ,Õâô³¤Ê±¼äµÄÌå»áºó,ÎÒ·¢Ï ......
JAVAÈÝÆ÷
¡¡¡¡½âÊÍÒ»£º
¡¡¡¡ÈÝÆ÷£¨Container£©
¡¡¡¡Spring ÌṩÈÝÆ÷¹¦ÄÜ£¬ÈÝÆ÷¿ÉÒÔ¹ÜÀí¶ÔÏóµÄÉúÃüÖÜÆÚ¡¢¶ÔÏóÓë¶ÔÏóÖ®¼äµÄÒÀÀµ¹Øϵ£¬Äú¿ÉÒÔʹÓÃÒ»¸öÅäÖÃÎļþ£¨Í¨³£ÊÇXML£©£¬ÔÚÉÏÃ涨ÒåºÃ¶ÔÏóµÄÃû³Æ¡¢ÈçºÎ²úÉú£¨Prototype ·½Ê½»òSingleton ·½Ê½£©¡¢Äĸö¶ÔÏó²úÉúÖ®ºó±ØÐëÉ趨³ÉΪij¸ö¶ÔÏóµÄÊôÐԵȣ¬ÔÚÆô¶¯ÈÝÆ÷Ö®ºó£¬ËùÓÐ ......
¡¡JavaÈí¼þÓÐMIDP2.0ºÍMIDP1.0Á½ÖÖ¡£Òò´Ë£¬ÎÒÃÇÔÚ°²×°JavaÈí¼þʱ£¬Ê×ÏÈÐèÒª¸ù¾ÝÈí¼þÌṩµÄÐÅÏ¢ÅжÏÈí¼þÊÇ·ñÊʺÏ×Ô¼ºµÄÊÖ»ú£¬´Ó¶ø±ÜÃâ°²×°Ö®ºóÎÞ·¨Ê¹ÓõÄÇé¿ö·¢Éú¡£ ´ËÍ⣬ÓÐЩÈí¼þ¿ÉÄÜ»áÓëÊÖ»úÄÚÒѾ°²×°µÄÈí¼þÓгåÍ»£¬ÔÚ°²×°Ç°Ò²Ó¦×Ðϸ¿´Çå³þÏà¹Ø˵Ã÷¡£
¡¡¡¡°²×°³£¼ûÎÊÌâ½â´ð
¡¡¡¡Ö¢×´1£º°²×°Íê³ÉºóÈ´×Ô¶¯É¾³ý£¬»òÏÔʾÎÞ ......
Part 2£ºWeb²ã¹¦ÄÜÔöÇ¿
ÔÚJavaEE6ÖУ¬Web²ãÓÐÏÔÖøµÄ¹¦ÄÜÔöÇ¿¡£ÈçÉÏÎÄËùÊö£¬JavaaEE6ƽ̨µÄÄ¿±êÖ®Ò»¾ÍÊÇÔöÇ¿Æä¿ÉÀ©Õ¹ÐÔ£¬¶øÓë¿ÉÀ©Õ¹ÐÔÏà¹ØµÄÁ½¸ö¹Ø¼ü¼¼Êõ±ãÊÇ£ºWebƬ¶Ï£¨web fragments£©¡¢¹²Ïí¿ò¼Ü¿É²å°ÎÄÜÁ¦£¨shared framework pluggability£©£¬¶øÕâÁ½¸öÐÂÌØÐÔÊÇÓÉservlet3.0¼¼Êõ×é¼þÌṩµÄ¡£Servlet 3.0, JSR 315
ÊÇserv ......
¢Ù¼Ì³ÐTimerTask£¬ÖØдrun·½·¨
package bamboo.task;
import java.util.TimerTask;
public class TimeTaskTest extends TimerTask{
@Override
public void run() {
System.out.println("hi");
}
}
¢Úͨ¹ýtimerÀ´ÉèÖÃij¸öʱ¼äÀ´µ÷Ó㬻òÕßÊÇÏà¸ô¶à³¤Ê±¼äµ÷ÓÃ
package bamboo.test;
......