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

Java SE6 ϵͳÍÐÅÌСӦÓùþ

 /**
* @(#)MyTray.java
*
*
* @author Xie Xiaojin
* @version 1.00 2009/11/9
*/
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class MyTray implements ActionListener {
private MenuItem item1;
private MenuItem item2;
private MenuItem item3;
private String tip = "лС½øÓÚ\n2009Äê11ÔÂ9ÈÕ\nÁ賿2£º52";
public MyTray(){
if(SystemTray.isSupported()){
SystemTray tray = SystemTray.getSystemTray();
PopupMenu popup = new PopupMenu();
item1 = new MenuItem("ÎҵIJ˵¥");
item2 = new MenuItem("¹ØÓÚ");
item3 = new MenuItem("Í˳ö");
item2.addActionListener(this);
item3.addActionListener(this);
popup.add(item1);
popup.add(item2);
popup.add(item3);
TrayIcon icon = new TrayIcon(getIcon("rss.png").getImage(), tip, popup);
icon.displayMessage("ϵͳÌáʾ", tip, TrayIcon.MessageType.INFO);
try{
tray.add(icon);
} catch(AWTException ex){
System.err.println("ÎÞ·¨ÏòÕâ¸öÍÐÅÌÌí¼Óв˵¥Ïî");
}
} else{
System.out.println("ÎÞ·¨Ê¹ÓÃϵͳÍÐÅÌ");
}
}
public static void main(String[] args){
new MyTray();
}
public ImageIcon getIcon(String url){
return new ImageIcon(getClass().getResource(url));
}
public void actionPerformed(ActionEvent e){
if(e.getSource() == item2){
JFrame f = new JFrame("ϵͳÍÐÅÌ");
JLabel label = new JLabel(tip);
f.getContentPane().add(label);
f.setSize(300, 200);
f.setLocationRelativeTo(null);
f.setVisible(true);
}
if(e.getSource() == item3){
System.exit(0);
}
}
}


Ïà¹ØÎĵµ£º

Java¼àÌýÆ÷ѧϰ ͳ¼Æµ±Ç°ÔÚÏßÈËÊý

 javax.servlet.http.HttpSession Õâ¸öÀàÊǺܳ£Óõģ¬Ã¿µ±ÎÒÃÇä¯ÀÀÍøÕ¾£¬²»ÂÛÓÐûÓеǽ£¬¶¼»á²úÉú1¸ösession£¬Ëü¼Ç¼Á˺Íä¯ÀÀÕßÏà¹ØµÄÊý¾Ý£»
ÏÂÃæ½éÉÜsessionµÄ2¸ö¼àÌýÆ÷½Ó¿Ú£º
1£©javax.servlet.http.HttpSessionBindingListener;
ʵÏÖÕâ¸ö½Ó¿ÚµÄÀ࣬ÿµ±±»´æ·Åµ½session»ò´ÓsessionÖÐÒÆ³ý¶¼»á³ö·¢½Ó¿ÚÖÐÏàÓ¦µ ......

javaÈëÃÅʵÀý classpathÓëpath ÉèÖÃ

JavaºÜÓÕÈË£¬µ«¶ÔÓÚ¸Õ¿çÈëJavaÃż÷µÄ³õѧÕßÀ´Ëµ£¬±àÒë²¢ÔËÐÐÒ»¸öÎޱȼòµ¥µÄJava³ÌÐò¼òÖ±¾ÍÊÇÒ»¸ö¶ñÃΡ£Ã÷Ã÷³ÌÐòû´í£¬µ«¸÷ÖÖ¸÷ÑùÈÃÈËÃþ²»×ÅÍ·ÄԵĴíÎóÐÅÏ¢ÕæµÄÈÃÄã°Ù˼²»µÃÆä½â£¬Ðí¶àÔÚJavaÃÅ¿ÚÅÇ»²Á˺ܾõijõѧÕß¾ÍÕâÑù·ÅÆúÁËѧϰJavaµÄ»ú»á£¬ºÜÊÇ¿Éϧ¡£±ÊÕßÒ²¾­Àú¹ýÕâ¸öÎÞ±ÈÍ´¿àµÄ½×¶Î£¬¸Ð¾õµ½±àÒëÄѵÄÎÊÌâ¾Í³öÔÚclasspat ......

java jsp servletÖеľø¶Ô·¾¶ÓëÏà¶Ô·¾¶(×ªÔØ)

 
1.»ù±¾¸ÅÄîµÄÀí½â
¾ø¶Ô·¾¶£º¾ø¶Ô·¾¶¾ÍÊÇÄãµÄÖ÷Ò³ÉϵÄÎļþ»òĿ¼ÔÚÓ²ÅÌÉÏÕæÕýµÄ·¾¶£¬(URLºÍÎïÀí·¾¶)ÀýÈ磺
C:xyz est.txt ´ú±íÁËtest.txtÎļþµÄ¾ø¶Ô·¾¶¡£http://www.sun.com/index.htmÒ²´ú±íÁËÒ»¸öURL¾ø¶Ô·¾¶¡£
Ïà¶Ô·¾¶£ºÏà¶ÔÓëij¸ö»ù׼Ŀ¼µÄ·¾¶¡£°üº¬WebµÄÏà¶Ô·¾¶£¨HTMLÖеÄÏà¶ÔĿ¼£©£¬ÀýÈ磺ÔÚ
Ser ......

javaµÚ8Ìì´úÂ루¼¯ºÏÀࣩ

/************Student.java begin***************/
 import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
public class Student {
 private String name;
 private String password;
 public String getName() {
  return name;
 }
 public ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ