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

JavaÎļþ²Ù×÷´óÈ«

ÎļþµÄ½¨Á¢/¼ì²éÓëɾ³ý
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.io.*"%>
<html>
<head>
<title>ÎļþµÄ½¨Á¢¡¢¼ì²éÓëɾ³ý</title>
</head>
<body>
<%
String path=request.getRealPath("");
//out.println(path);
File f=new File(path,"File.txt");
//out.println(f);
//out.println(f.exists());
if(f.exists()){//¼ì²éFile.txtÊÇ·ñ´æÔÚ
f.delete();//ɾ³ýFile.txtÎļþ
out.println(path + "\\File.txt ´æÔÚ£¬ÒÑɾ³ý¡£");
}else{
f.createNewFile();//ÔÚµ±Ç°Ä¿Â¼Ï½¨Á¢Ò»¸öÃûΪFile.txtµÄÎļþ
out.println(path + "\\File.txt ²»´æÔÚ£¬Òѽ¨Á¢¡£");//Êä³öÄ¿Ç°ËùÔÚµÄĿ¼·¾¶
}
%>
Ŀ¼µÄ½¨Á¢/¼ì²éÓëɾ³ý
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.io.*"%>
<html>
<head>
<title>Ŀ¼µÄ½¨Á¢/¼ì²éÓëɾ³ý</title>
</head>
<body>
<%
String path=request.getRealPath("");
path=path + "\\Sub";//½«Òª½¨Á¢µÄĿ¼·¾¶
File d=new File(path);//½¨Á¢´ú±íSubĿ¼µÄFile¶ÔÏ󣬲¢µÃµ½ËüµÄÒ»¸öÒýÓÃ
if(d.exists()){//¼ì²éSubĿ¼ÊÇ·ñ´æÔÚ
d.delete();
out.println("SubĿ¼´æÔÚ£¬ÒÑɾ³ý");
}else{
d.mkdir();//½¨Á¢SubĿ¼
out.println("SubĿ¼²»´æÔÚ£¬Òѽ¨Á¢");
}
%>
</body>
</html>
ÈçºÎÔÚJSPÖд¦ÀíÐéÄâĿ¼
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.io.*"%>
<html>
<head>
<title>JSPÖÐÈçºÎ´¦ÀíÐéÄâĿ¼</title>
</head>
<body>
È¡µÃÐéÄâĿ¼¶ÔÓ¦µÄ´ÅÅÌ·¾¶<br>
WebÕ¾µãÖ÷Ŀ¼µÄλÖÃΪ<font color=#ff0000><%=request.getRealPath("/")%></font><br>
JSPÍøÒ³ËùÔÚµÄĿ¼λÖÃ<font color=#ff0000><%=request.getRealPath("./")%></font><br>
JSPÍøÒ³ËùÔÚĿ¼ÉÏÒ»²ãĿ¼µÄλÖÃ<font color=#ff0000><%=request.getRealPath("../")%></font><br>
</body>
</html>
ÎļþÊôÐÔµÄÈ¡µÃ
<%@ page contentType="text/html;charset=gb2312"%>
<%@ page import="java.util.Date,java.io.*"%>
<html>
<


Ïà¹ØÎĵµ£º

JavaÖÐGraphicsÓ÷¨


import java.awt.Color;
import java.awt.Graphics;
import java.awt.Graphics2D;
 
import javax.swing.JFrame;
import javax.swing.JPanel;
 
public class MyFrame extends JFrame {
 
         /**
       &nb ......

·Ç³£¾­µäµÄjavaÃæÊÔ

ÃæÊÔ¹Ù£ºÊìϤÄÄÖÖÓïÑÔ
ӦƸÕߣºJava¡£
ÃæÊÔ¹Ù£ºÖªµÀʲô½ÐÀàô
ӦƸÕߣºÎÒÕâÈËʵÔÚ£¬¹¤×÷ŬÁ¦£¬²»ÖªµÀʲô½ÐÀÛ
Ãæ
ÊÔ¹Ù£ºÖªµÀʲôÊÇ°ü?
ӦƸÕߣºÎÒÕâÈËʵÔÚ? ƽ³£²»´ø°ü Ò²²»Óù«Ë¾×¼±¸ÁË
ÃæÊÔ¹Ù£ºÖªµÀʲôÊǽӿÚÂð?
ӦƸÕߣºÎÒÕâ¸öÈ˹¤
×÷ÈÏÕæ¡£´ÓÀ´²»ÕÒ½è¿Ú͵ÀÁ
ÃæÊÔ¹Ù£ºÖªµÀʲôÊǼ̳Ðô
ӦƸÕߣºÎÒ ......

java socketºÍ¶àỊ̈߳¨Thread£©ÊµÀý

1. socketͨÐÅ£ºÓпͻ§¶ËºÍ·þÎñ¶ËµÄsocket´úÂë¡£ 
2. ¶àỊ̈߳º¿Í»§¶ËºÍ·þÎñ¶Ë¸÷ÓÃÒ»Ï̷߳¢ËÍÐÅÏ¢£»·þÎñ¶ËÁíÓÐÒ»¼àÌýỊ̈߳¬ÓÃÓڰѳ¬Ê±µÄÐÅϢɾ³ý¡£ 
    ÕâÀïÓ¦Óõ½ÁËͬ²½£¬Ê¹Á½¸öÏ߳̿ÉÒÔ²Ù×÷ͬһ¸ömap¡£ 
´úÂ룺£¨ÀàÈ«ÔÚͬһ¸ö°üÄÚ£© 
server¶Ë£º 
Java´úÂë < typ ......

Java°æÅöײÇòÓÎÏ·

×¼±¸Öð²½ÕûÀíÒ»ÏÂÊÖÖеĵÚÈý·½JavaÓÎÏ·´úÂ룬½«ÄÜÓõIJ¿·ÖÈÚÈëµ½LGameÀïÈ¥£¬Ã»ÓÐÄÜÓò¿·ÖµÄ¾ÍÖ±½Óɾµô¡£
ÎÞÂÛ³ÌʽÄÑÒ×ÈçºÎ£¬Ò²ÊÇÔ­×÷ÕßÒ»·¬ÐÄѪ£¬²»Ó¦½«ËüÃÇÆúÈç±ÖÂÄ£¬ËùÒÔÎÒ½«Ò»Ò»ÕûÀíºó·¢²¼µ½ÍøÉϱ£Áô£¨±ÜÃâʧ´«……£©£¬Ò²·½±ãÓÐÐèÒªµÄÅóÓѲο¼Ê¹Óá£
ÏÂÃæÉÏ´«µÄÊÇÒ»¸öJava°æÅöײÇòÓÎÏ·£¬ÓÎÏ·ÄÚÈݷdz£¼òµ¥£ ......

Linux Java»·¾³ÅäÖð²×°

Ò»¡¢°²×°JDK
°²×°°üÃûΪ£ºjdk-1_5_0_18-linux-i586.rpm.bin
°²×°²½Ö裺
1. ÒÔrootÉí·ÝµÇ¼Linux²Ù×÷ϵͳ
2. ½«jdk-1_5_0_18-linux-i586.rpm.bin°²×°°üÉÏ´«µ½/tmpĿ¼ÏÂ, ¼ì²âÈ·±£jdk-1_5_0_18-linux-i586.rpm.binÓпÉÖ´ÐÐȨÏÞ£»
Èç¹ûjdk-1_5_0_18-linux-i586.rpm.binûÓпÉÖ´ÐÐȨÏÞ£¬¿ÉʹÓÃÒ»ÏÂÃüÁîÌí¼Ó
#c ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ