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

JavaÖÐʹÓÃÐźÅÁ¿——Semaphore

 Ö÷Ïß³ÌÖУº
InitThread initThread=new InitThread(new Semaphore(0));//³õʼ»¯Ò»¸ö×ÓỊ̈߳¬´«Ò»¸ö³õֵΪ0µÄÐźÅÁ¿¸øËü
Display.getDefault().asyncExec(initThread);
try {//´Ë´¦»á¹ÒÆð£¬Ö±µ½×ÓÏß³ÌÍê³É¹¤×÷£¬ÐÞ¸ÄÁËÐźÅÁ¿µÄÖµ£¬Ö÷Ï̲߳Żá¼ÌÐø
initThread.getSemaphore().acquire();
} catch (InterruptedException e1) {
insertConsoleText("Êý¾Ý»ñȡʧ°Ü……\n");
}
×ÓÏß³Ì
class InitThread implements Runnable{
private Semaphore semaphore;
public InitThread(Semaphore semaphore){
this.semaphore=semaphore;
}

public Semaphore getSemaphore() {
return semaphore;
}
@SuppressWarnings("unchecked")
public void run() {
dataDos= (List<DataObject>)gui.getDataTableViewer().getInput();
anaDos=(List<DataObject>)gui.getMetaTableViews().get(viewerName).getInput();
excelCode=gui.getExcelCode().getText();
semaphore.release();
}


Ïà¹ØÎĵµ£º

java ÄÚ´æÕ¼ÓÃ1

±¾ÎÄÊôÓÚתÔØ£¬ÔÚ±¾ÏµÁеĵڶþ²¿·Ö»áÌÖÂÛ¸ü¼Ó¸´ÔÓµÄÇé¿ö¡£
ÏÂÃæµÄÂÛÊöÕë¶Ô32λϵͳ£¬¶Ô64λϵͳ²»ÊÊÓ㬺óÐð¾­³£ÄãдÁËÒ»¸ö³ÌÐò£¬Ò»²âÊÔ£¬¹¦ÄÜûÎÊÌ⣬һ¿´ÄÚ´æÕ¼ÓÃÒ²²»¶à£¬¾Í²»È¥¿¼ÂÇÆäËüµÄ¶«Î÷ÁË¡£µ«¿ÉÄܳÌÐòʹÓÃÁËÒ»¸öʲôÊý¾Ý½á¹¹£¬»áµ±Êý¾Ý¹æÄ£±ä´óʱ£¬ÄÚ´æÕ¼Óü¤Ôö¡£
»ù±¾&&¹Ø¼üµÄÎÊÌâÊÇ£¬JavaÀï¸÷ÖÖ¶«¶«Õ ......

Java data ×ܽá

1.¼ÆËãijһÔ·ݵÄ×î´óÌìÊý
Calendar time=Calendar.getInstance();
time.clear();
time.set(Calendar.YEAR,year); //year Ϊ int
time.set(Calendar.MONTH,i-1);//×¢Òâ,Calendar¶ÔÏóĬÈÏÒ»ÔÂΪ0
int day=time.getActualMaximum(Calendar.DAY_OF_MONTH);//±¾Ô·ݵÄÌìÊý
×¢£ºÔÚʹÓÃset·½·¨Ö®Ç°£¬±ØÐëÏÈ ......

Java Socket

×î½üÑо¿ÏÂsocket,ctrl+vÁËÏÂÍøÉϵĶ«Î÷:
   ÊÂʵÉÏÍøÂç±à³Ì¼òµ¥µÄÀí½â¾ÍÊÇÁ½Ì¨¼ÆËã»úÏ໥ͨѶÊý¾Ý¶øÒÑ¡£¶ÔÓÚ³ÌÐòÔ±¶øÑÔ£¬È¥ÕÆÎÕÒ»ÖÖ±à³Ì½Ó¿Ú²¢Ê¹ÓÃÒ»ÖÖ±à³ÌÄ£ÐÍÏà¶Ô¾Í»áÏԵüòµ¥µÄ¶àÁË¡£Java SDKÌṩһЩÏà¶Ô¼òµ¥µÄApiÀ´Íê³ÉÕâЩ¹¤×÷£¬Socket¾ÍÊÇÆäÖÐÖ®Ò»¡£
¡¡¡¡¶ÔÓÚJava¶øÑÔ¡£ÕâЩApi´æÔÚÓëJava.netÕâ¸ö ......

Java Ö®Á¬½ÓÊý¾Ý¿â£¨×ܽᣩ


-------------------------------oracle--------------------------------
Çý¶¯£ºoracle.jdbc.driver.OracleDriver
URL£ºjdbc:oracle:thin:@<machine_name><:port>:dbname
×¢£ºmachine_name£ºÊý¾Ý¿âËùÔڵĻúÆ÷µÄÃû³Æ£»
      port£º¶Ë¿ÚºÅ£¬Ä¬ÈÏÊÇ1521
   &nbs ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ