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

JavaʵÏÖXMPP·¢ËͽÓÊÕÏûÏ¢ºÍÎļþ¹¦ÄÜ

package test;
import java.io.File;
import org.jivesoftware.smack.Chat;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.MessageListener;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smackx.filetransfer.FileTransfer;
import org.jivesoftware.smackx.filetransfer.FileTransferListener;
import org.jivesoftware.smackx.filetransfer.FileTransferManager;
import org.jivesoftware.smackx.filetransfer.FileTransferRequest;
import org.jivesoftware.smackx.filetransfer.IncomingFileTransfer;
import org.jivesoftware.smackx.filetransfer.OutgoingFileTransfer;
/**
 * ÑÝʾXMPP·¢ËͽÓÊÕÏûÏ¢ºÍÎļþµÄ¹¦ÄÜ
 *
 * @author Íõ½Ü
 * @date 2010-1-14 16:59:24
 */
public class XMPPTest {
 private static void handleTransferRequest(FileTransferRequest request) {
  File file = new File(request.getFileName());
  IncomingFileTransfer transfer = request.accept();
  try {
   transfer.recieveFile(file);
  } catch (XMPPException e) {
   e.printStackTrace();
  }
 }
 /* ·¢ËÍÎļþ */
 public static void sendFile(FileTransferManager transferManager,
   String user, File file, XMPPConnection connection) throws Exception {
  OutgoingFileTransfer transfer = transferManager
    .createOutgoingFileTransfer(user);
  long timeOut = 100000;
  long sleepMin = 3000;
  long spTime = 0;
  int rs = 0;
  transfer.sendFile(file, "Send file!");
  rs = transfer.getStatus().compareTo(FileTransfer.Status.complete);
  while (rs != 0) {
   rs = transfer.getStatus().compareTo(FileTransfer.Status.complete);
   spTime = spTime + sleepMin;
   if (spTime > timeOut) {


Ïà¹ØÎĵµ£º

java Ḭ̈߳²È«

Servlet/JSP¼¼ÊõºÍASP¡¢PHPµÈÏà±È£¬ÓÉÓÚÆä¶àÏß³ÌÔËÐжø¾ßÓкܸߵÄÖ´ÐÐЧÂÊ¡£ÓÉÓÚServlet/JSPĬÈÏÊÇÒÔ¶àÏß³ÌģʽִÐеģ¬ËùÒÔ£¬ÔÚ±àд´úÂëʱÐèÒª·Ç³£Ï¸Öµؿ¼ÂǶàÏ̵߳ݲȫÐÔÎÊÌ⡣Ȼ¶ø£¬ºÜ¶àÈ˱àдServlet/JSP³ÌÐòʱ²¢Ã»ÓÐ×¢Òâµ½¶àḬ̈߳²È«ÐÔµÄÎÊÌ⣬ÕâÍùÍùÔì³É±àдµÄ³ÌÐòÔÚÉÙÁ¿Óû§·ÃÎÊʱûÓÐÈκÎÎÊÌ⣬¶øÔÚ²¢·¢Óû§ÉÏÉýµ ......

javaÖÐʹ´°¿Ú¾ÓÖÐÏÔʾ

Èç¹ûҪʹÖ÷´°¿Ú ¾ÓÖÐÒ»°ãʹÓÃÏÂÃæµÄ·½·¨£º
import javax.swing.*;
import java.awt.*;
public class ToCenter
{
  public ToCenter(JFrame frame)
   {
       //---------------------------ÉèÖô°¿Ú¾ÓÖÐ---------------------------------------------------- ......

ÓÃRobotдJava´úÀí

ÓÃRobotдJava´úÀí
Rational RobotÊÇͨ¹ý¼ÖÆÓû§²Ù×÷½øÐй¦ÄÜ£¬ÐÔÄܺͼæÈÝÐÔ²âÊÔµÄ×Ô¶¯»¯²âÊÔ¹¤¾ß¡£Í¨¹ý»Ø·Å¼Öƽű¾½øÐй¦ÄܺͿɿ¿ÐÔ²âÊÔ¡£±¾ÎÄÖ÷Òª½éÉÜRational RobotÕë¶Ôjava³ÌÐòºÍappletsÈçºÎ½øÐй¦ÄܲâÊÔ¡£
Rational Robotµ±Ç°°æ±¾Ö§³ÖÓÃÒÔÏÂÀà¿â¿ª·¢µÄJava³ÌÐòºÍapplet³ÌÐò£º
lJava Foundation Classes(JFCs)
l ......

Java Web»ù´¡£ºµÚ¶þʮһ½² Ajax½»»¥µÄ»ù±¾¹ý³Ì

±¾ÎÄÄÚÈÝÕª×Ô£º¡¶Java Web¿ª·¢½Ì³Ì——ÈëÃÅÓëÌá¸ßƪ£¨JSP+Servlet£©¡·
½»»¥µÄ»ù±¾¹ý³Ì°üÀ¨£º
l         ´´½¨XMLHttpRequest¶ÔÏó£»
l         ·¢ËÍÇëÇó£»
l         ´¦ÀíÏìÓ¦¡£
´ ......

diyÃæÏòÇëÇóµÄjava¿ò¼Ü

Õâ¸ö¿ò¼ÜÒ²ÊÇΪgoogle app engine×¼±¸µÄ¡£µ±Ê±¸Ð¾õÖ±½ÓÔÚgaeÉÏsevletÌ«·³ÈËÁË£¬¾Í·â×°¸ö¼òÒ׵Ŀò¼Ü¡£Ê¹ÓõÄʱºòÖ»ÐèÒªÅäÖÃweb.xmlÖÐDispacherSevletºÍpackage.propertiesÖеÄpackage.path£¨Ä¬ÈÏɨÃèµÄ°ü£©¼´¿É
gaeÀý×Ó£ºhttp://orzblogs.appspot.com/Home.htm
´óѧµÄʱºòºÜBS java£¬Ñ§ÁËÖ®ºó¾ÍÈÓµôÁË£¬ÏÖÔÚ¹¤×÷Á˲ſªÊ¼ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ