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

Java Àà·¾¶

¹ÜÀí Java Àà·¾¶£¨UNIX ºÍ Mac OS X£©
ÍøÖ·£º     http://www.ibm.com/developerworks/cn/java/j-classpath-unix/
×÷ÕßµÄÍøÕ¾£ºhttp://www.cafeaulait.org/
×ܽ᣺
²»¹ÜÀà·¾¶Óжàô¼¬ÊÖ£¬Äú¶¼¿ÉÒÔͨ¹ýһЩ¼òµ¥µÄ¹æÔò¶ÔËü¼ÓÒÔ¹ÜÖÆ£¬ÓÈÆäÊÇÒª¼ÇסÈçϵÄһЩԭÔò£º
½«Àà·Åµ½°üÖС£
Ñϸñ×ñÊØ°üºÍÀàµÄÃüÃûÔ¼¶¨ºÍ´óСдԼ¶¨¡£
È·±£°üµÄ²ã´Î½á¹¹ÓëĿ¼µÄ²ã´Î½á¹¹Æ¥Åä¡£
×ÜÊÇ¶Ô javac Ó¦Óà -d
Ñ¡Ïî¡£
²»ÒªÔÚ jre/lib/ext ÄÚ·ÅÈκζ«Î÷¡£
²»ÒªÔÚ jre/lib/endorsed ÄÚ·ÅÈκζ«Î÷¡£
²»Òª½« .java ÎļþÓë .class Îļþ·ÅÔÚͬһ¸öĿ¼¡£
²»Òª½«ÈκΠ.java »ò .class Îļþ·ÅÔÚµ±Ç°µÄ¹¤×÷Ŀ¼¡£
$ javac -d bin -sourcepath src
-classpath /Users/elharo/classes:/Users/elharo/lib/junit.jar
src/com/elharo/gui/MainFrame.java
±àÒëMainFrame.java Îļþ¡£°Ñ.class Îļþ·Åµ½bin Ŀ¼ÖУ¬µ½src Ŀ¼ÖÐÑ°ÕÒ.java Îļþ£¬Àà·¾¶ÓÃ-classpath Ö¸¶¨¡£


Ïà¹ØÎĵµ£º

javaÁ¬½Ó¸÷ÖÖÊý¾Ý¿â·½Ê½ËÙ²é±í

javaÁ¬½Ó¸÷ÖÖÊý¾Ý¿â·½Ê½ËÙ²é±í1£®Oracle8/8i/9iÊý¾Ý¿â£¨thinģʽ£©Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
String url="jdbc:oracle:thin:@localhost:1521:orcl"; //orclΪÊý¾Ý¿âµÄSID
String user="test";
String password="test";
Connection conn= DriverManager.getConnection(url,u ......

javaÖÐKeytoolµÄʹÓÃ×ܽá

ÒÔÇ°Óùý¼¸´ÎÕâ¸ö¶«¶«£¬µ«Ã¿´Î¶¼ÖØвéѯһ´Î¡£±¾ÎÄԭʼ³ö´¦ÊÇÕâÀï
¡£
£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­£­
Keytool
ÊÇÒ»¸öJava
Êý¾ÝÖ¤ÊéµÄ¹ÜÀí¹¤¾ß
,Keytool
½«ÃÜÔ¿£¨key£©ºÍÖ¤Ê飨certificates£©´æÔÚÒ»¸ö³ÆΪkeystoreµÄÎļþ ......

JavaÖÐÈçºÎ»ñȡϵͳ·¾¶

File.separatorChar ·µ»ØÒ»¸ö×Ö·û£¬±íʾµ±Ç°ÏµÍ³Ä¬ÈϵÄÎļþÃû·Ö¸ô·û£¬ÔÚWindowsÖÐΪ"\",unixÖÐΪ"/"¡£
File.separator ÓëÇ°ÕßÏàͬ£¬µ«½«·Ö¸ô·û×÷Ϊ×Ö·û´®ÀàÐÍ·µ»Ø¡£
pathSeparatorChar ·µ»ØÒ»¸ö×Ö·û£¬±íʾµ±Ç°ÏµÍ³Ä¬ÈϵÄ·¾¶Ãû·Ö¸ô·û£¬ÔÚWindowsÖÐΪ";",unixÖÐΪ":"¡£
File.pathSeparator ÓëÇ°ÕßÏàͬ£¬µ«½«·Ö¸ô·û×÷Ϊ×Ö· ......

»ñµÃµ±Ç°¼ÆËã»úÈ«²¿IPµÄÒ»¸öjavaС³ÌÐò

import java.net.InetAddress;
//±¾³ÌÐòʵÏÖÁË»ñÈ¡±¾µØIPµØÖ·
public class IP {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
InetAddress localHost;
InetAddress []ip;
try{
localHost=InetAddress.getLocalHost();
ip=InetAddr ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ