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

JAVA²Ù×÷windows¹²ÏíĿ¼

1 Ïà¹Ø֪ʶ½éÉÜ
1.1 SMB
      MicrosoftÍøÂçÅäÖÃÖÐÖ÷Òª²ÉÓÃSMBÐÎʽʵÏÖÎļþ¹²ÏíºÍ´òÓ¡·þÎñ£¬SMB£¨·þÎñÆ÷ÏûÏ¢¿é£©ÊÇÒ»ÖÖ¿Í»§¶Ë/·þÎñÆ÷Îļþ¹²ÏíЭÒé¡£IBMÓÚ20ÊÀ¼Í80Äê´úÄ©ÆÚ¿ª·¢ÁË·þÎñÆ÷ÐÅÏ¢¿é£¨SMB£©£¬ÓÃÓڹ淶¹²ÏíÍøÂç×ÊÔ´£¨ÈçĿ¼¡¢Îļþ¡¢´òÓ¡»úÒÔ¼°´®Ðж˿ڣ©µÄ½á¹¹¡£ÕâÊÇÒ»ÖÖÇëÇó/ÏìӦЭÒé¡£ÓëFTPЭÒéÖ§³ÖµÄÎļþ¹²Ïí²»Í¬£¬SMBЭÒéÖеĿͻ§¶ËÒªÓë·þÎñÆ÷½¨Á¢³¤ÆÚÁ¬½Ó¡£Ò»µ©½¨Á¢Á¬½Ó£¬¿Í»§¶ËÓû§¾Í¿ÉÒÔ·ÃÎÊ·þÎñÆ÷ÉϵÄ×ÊÔ´£¬¾ÍÈçͬ×ÊԴλÓÚ¿Í»§¶ËÖ÷»úÉÏÒ»Ñù¡£
      ´ÓWindows 2000ϵÁÐÈí¼þ¿ªÊ¼£¬MicrosoftÐÞ¸ÄÁËÈí¼þµÄ»ù´¡½á¹¹£¬Ê¹ÆäÊÊÓÃSMBЭÒé¡£¶øÔÚÒÔÇ°µÄMicrosoft²úÆ·ÖУ¬SMB·þÎñÐèҪʹÓ÷ÇTCP/IPЭÒé×åÀ´Ö´ÐÐÓòÃû½âÎö¡£´ÓWindows 2000¿ªÊ¼£¬MicrosoftµÄËùÓвúÆ·¶¼²ÉÓÃDNSϵͳ¡£ÓÉ´Ë£¬TCP/IPЭÒé×å¿ÉÒÔÖ±½ÓÖ§³ÖSMB×ÊÔ´¹²Ïí¡£
      SMBЭÒéÖй涨ÁËÎļþϵͳ·ÃÎʺͿͻ§ÈçºÎÇëÇóÎļþµÄ·½Ê½ÒÔ¼°SMBЭÒé½ø³Ì¼äͨÐŵķ½Ê½¡£ËùÓеÄSMBÏûÏ¢¶¼²ÉÓÃÒ»ÖÖ¸ñʽ¡£¸Ã¸ñʽ²ÉÓù̶¨´óСµÄÎļþÍ·£¬ºó¸ú¿É±ä
´óСµÄ²ÎÊýÒÔ¼°Êý¾Ý×é¼þ¡£
1.2 jcifs
     Jcifs
pan>ÊÇÒ»¸öÓÃJAVA¿ª·¢µÄSMB¿Í»§¶Ë¿â£¬ÀûÓÃjcifs¿ÉÒÔ²Ù×÷windows¹²ÏíÎļþ£¬¿ÉÒԵõ½ÓòÓû§£¬ÊµÏÖµ¥µãµÇ¼£¬×îа汾Ϊ£º1.3.12£¬¹Ù·½ÍøÖ·£ºhttp://jcifs.samba.org/
2. ´úÂëʵÏÖ
¿´´úÂ룬²»Ëµ»°¡£
2.1 ´Ó¹²ÏíĿ¼ÏÂÔØÎļþ
  /**
* Description: ´Ó¹²ÏíĿ¼¿½±´Îļþµ½±¾µØ
* @Version1.0 Sep 25, 2009 3:48:38 PM by ´Þºì±£´´½¨
* @param remoteUrl ¹²ÏíĿ¼ÉϵÄÎļþ·¾¶
* @param localDir ±¾µØĿ¼
*/
public static void smbGet(String remoteUrl,String localDir) {
InputStream in = null;
OutputStream out = null;
try {
SmbFile remoteFile = new SmbFile(remoteUrl);
if(remoteFile==null){
System.out.println("¹²ÏíÎļþ²»´æÔÚ");
return;
}
String fileName = remoteFile.getName();
File localFile = new File(localDir+File.separator+fileName);
in = new BufferedInputStream(new SmbFileInputStream(remoteFile));
out = new BufferedOutputStream(new FileOutputStream(localFile));
by


Ïà¹ØÎĵµ£º

oracleµ÷ÓÃjava³ÌÐòÁ¬sqlserver2005

1¡¢ÔÚoracleµÄsys-sysdbaϵǽ
дһ¸öjava source³ÌÐòÁ´½Ósqlserver2005£º
create or replace and compile java source named test as
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
public class excutesql1
{
    public static String entry ......

java¸÷°æ±¾ÏÂÔصØÖ·

 ×î½ü×öjava¿Í»§¶Ë jre+installanywhere+jar ´ò°ü·¢²¼.exe°²×°¿Í»§¶Ë¡£´ò°ü³öÀ´ÎÞÄÎjreÌ«´óbeta°æ³ÌÐòÖ»Óм¸°Ùk ¿ÉÊÇjre´ò°üÏÂÀ´Óн«½ü30M£¬ÔÚÍøÉÏËÑË÷¾«¼ò°æ¿Í»§¶Ë£¬¿ÉÊǰ汾ȷʵ̫¾«¼òÁËÓÐЩÀàûÓУ¬¶øÕâ°æ±¾ÓÖºÍ×Ô¼º×°µÄ°æ±¾Óв»Í¬£¬ÔÚÍøÉÏÕÒÑ°°ëÌì²»µÃjreµÄ¾É°æ±¾×îºóÖÕÓÚÕÒµ½£¬ÕâÀïÌṩµØÖ·£¨java¸÷°æ±¾ÏÂÔصØÖ·£ ......

javaÖеõ½µ±Ç°Â·¾¶µÄ·½·¨


¹éÄÉһЩÍøÉÏÈ¡JAVA·¾¶µÄ·½·¨£º
×¢Ã÷£ºÈç¹û´ÓANTÆô¶¯³ÌÐò£¬this.getClass().getResource("")È¡³öÀ´µÄ±È½Ï¹Ö£¬Ö±½ÓÓÃJAVAÃüÁîÐе÷ÊԾͿɳɹ¦¡£
µÃµ½classpathºÍµ±Ç°ÀàµÄ¾ø¶Ô·¾¶µÄһЩ·½·¨
»ñµÃCLASSPATHÖ®Íâ·¾¶µÄ·½·¨£º
URL base = this.getClass£¨£©.getResource£¨""£©£» //ÏÈ»ñµÃ±¾ÀàµÄËùÔÚλÖã¬Èç/home/popeye/ ......

JAVAÀàȨÏÞ

1¡¢ClassÀàµÄ·ÃÎÊȨÏÞ£º
public£º¿ÉÒÔ¹©ËùÓеÄÀà·ÃÎÊ¡£
ĬÈÏ(°ü·ÃÎÊȨÏÞ)£ºÄ¬ÈÏ¿ÉÒÔ³ÆΪfriendlyµ«ÊÇ£¬javaÓïÑÔÖÐÊÇûÓÐfriendlyÕâ¸öÐÞÊηûµÄ£¬ÕâÑù³ÆºôÓ¦¸ÃÊÇÀ´Ô´ÓÚc++¡£Ä¬ÈϵķÃÎÊȨÏÞÊÇ°ü¼¶·ÃÎÊȨÏÞ¡£
      ¼´Èç¹ûдÁËÒ»¸öÀàûÓÐд·ÃÎÊȨÏÞÐÞÊηû£¬ÄÇô¾ÍÊÇĬÈϵķÃÎÊȨÏÞ£¬ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ