µÚ¶þÕ Java Project´î½¨
н¨javaÏîÄ¿£¬ÐèÒª½¨Á¢ÈçͼËùʾµÄ°ü½á¹¹£¨ÕâͼÊǺóÃæ²¹Éϵģ¬ËùÒÔÀïÃæÓн¨ºÃµÄÀࣩ£º
µã»÷ÏîÄ¿£¬ÓÒ¼üÑ¡Ôñ-¡·ÊôÐÔ-¡·Ìí¼Ó×Ô¶¨Òå¿â£º
¼á³ÖÒÔ×îÉÙ°üÔÔò£¬ÀýÈ磺
Íê³ÉÈçÏÂͼËùʾ£º
ÏîÄ¿½á¹¹´óÖÂÈçÏ£º
¶ÔBookService½øÐвâÊÔ£¬ ÕâÀïʹÓÃJunit4£¬Ð½¨Test Case£¬ÏÔʾÈçÏ£º
Ìí¼ÓJUnit4ËùÒÀÀµµÄ°ü¼´¿É¡£
SpringTest´úÂëÈçÏ£º
public class SpringTest {
@Test
public void springTest(){
ApplicationContext ctx =
new ClassPathXmlApplicationContext("beans.xml");
BookService bookService =
(BookService)ctx.getBean("bookService");
bookService.listBook();
}
}
ÔËÐнá¹ûÈçÏ£º
ÄÇô£¬´ó¼Ò˼¿¼Ò»Ï£¬ÊÇÈçºÎ×öµ½µÄÄØ£¿
Ê×ÏÈ£º½«srcÎļþ¼Ð£¬¼ÓÈëbuild path£º
Æä´Î£ºbeans.xmlÌí¼ÓBookServiceµÄÉùÃ÷£º
<bean id="bookService" class="com.netease.lee.service.impl.BookServiceImpl"/>
×îºó£ºÔËÐÐJunit Test
public class BookServiceImpl implements BookService {
@Override
public void listBook() {
System.out.println("Õ¹ÏÖÊé¼®Áбí");
}
}
Ïà¹ØÎĵµ£º
ÏÈÀ´Á˽âÒ»ÏÂÁ´±íģʽµÄÔÀí£º
Ê×ÏÈдһ¸öJavaBean£¬ÄÚÈÝÊÇÒªÌí¼ÓµÄÔªËغ͸ÃÔªËصĽڵ㡣
public class NodeBean implements Serializable
{
private Object data; //ÔªËر¾Éí
private NodeBean next; //ÏÂÒ»¸ö½Úµã
&n ......
java¼ÆËãʱ¼ä²î
ÎÄÕ·ÖÀà:Java±à³Ì
±ÈÈ磺ÏÖÔÚÊÇ2004-03-26 13£º31£º40
¹ýÈ¥ÊÇ£º2004-01-02 11£º30£º24
ÎÒÏÖÔÚÒª»ñµÃÁ½¸öÈÕÆڲ²îµÄÐÎʽΪ£ºXXÌìXXСʱXX·ÖXXÃë
·½·¨Ò»£º
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try
{
Date d1 = df.parse("2004-03-26 13:31:40");
......
JAVAËÄÖÖ»ù±¾ÅÅÐò,°üÀ¨Ã°ÅÝ·¨,²åÈë·¨,Ñ¡Ôñ·¨,SHELLÅÅÐò·¨.ÆäÖÐÑ¡Ôñ·¨ÊÇðÅÝ·¨µÄ¸Ä½ø,SHELLÅÅÐò·¨ÊÇ ²åÈë·¨µÄ¸Ä½ø.ËùÒÔ´Ó¸ù±¾ÉÏÀ´Ëµ¿ÉÒÔ¹éÄÉΪÁ½ÖÖ²»Í¬µÄÅÅÐò·½·¨:¼´:²åÈë·¨£¦Ã°ÅÝ·¨¡£
Ò»¡¢ ²åÈë·¨
¡¡¡¡±éÀúÅÅÐò¼¯ºÏ£¬Ã¿µ½Ò»¸öÔªËØʱ£¬¶¼Òª½«Õâ¸öÔªËØÓëËùÓÐËü֮ǰµÄÔªËرéÀú±È½ÏÒ»±é£¬È÷ûºÏÅÅÐò˳ÐòµÄÔªËØ°¤¸öÒƶ¯µ½µ±Ç°· ......
ͨ³£Çé¿öÏ£¬ÎÒÃÇÔÚ±àдjavaÎļþʱ£¬»áÓÐÒýÓõ½×ÔÒѶ¨ÒåµÄһЩÀ࣬Èç¹û°´Í¨³£µÄjavac *.javaµÄÐÎʽÀ´±àÒë»á³öÏÖÕÒ²»µ½·ûºÅµÄ´íÎó¡£
ÒÔÏÂÌṩÁËÁ½ÖÖ·½·¨£¬ÒÔ¹©²Î¿¼
¼ÙÈçÔÚd:\web\wshÏÂÓÐa.javaºÍb.javaÁ½¸öÎļþ£¬ÔÚb.javaÎļþÖÐÓÐÒýÓÃÁËa.java¡£ÏÂÃæÊDZàÒëµÄ·½·¨
·½·¨Ò»:
½øÈëd:\web\wshÏ£º javac a.java
È»ºóÍ˳öwshÄ ......