锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
鍦≒lugin Content灞炴ч〉涓璚ould you like to create a rich client application閫夋嫨Yes
鍒涘緩鍚戝涓彁渚涗簡鍑犱釜妯℃澘錛屽彲浠ヨ妭鐪佸緢澶氬伐浣溿?br />鍏跺疄涓涓狤clipse鐨凱lugin欏圭洰錛屾渶鍏抽敭鐨勫氨鏄欏圭洰鏍圭洰褰曚笅鐨?br />plugin.xml錛宲lugin.properties錛宐uild.properties錛孧ETA-INF/MANIFEST.MF
濡傛灉璇ユ彃浠舵槸鍋氫負(fù)product鍙戝竷鐨勶紝閭h繕浼?xì)鏈変竴涓?"浜у搧鍚?product"聽 鏂囦歡
褰撳垱寤哄ソ浜嗕竴涓彃浠墮」鐩悗錛屽啀鎵ц鏂板緩鑿滃崟涓殑Plug-in Development-->Product Configuration錛屽彲浠ヤ負(fù)璇ユ彃浠墮」鐩漿鍖栦負(fù)涓涓駭鍝併?br />褰撹榪愯涓涓彃浠舵椂錛屾湁涓鐐歸渶瑕佹敞鎰忕殑灝辨槸錛屽鏋滈」鐩腑鐢ㄥ埌浜嗗閮ㄧ殑jar鐨勮瘽錛岄渶瑕佸憡璇塃clipse璇ユ彃浠舵墍鐢ㄥ埌鐨刯ar鐨勪綅緗紝
涓烘錛岃浣跨敤Plug-in Manifest Editor鎵撳紑plugin.xml鏂囦歡錛?br />鍦˙uild灞炴ч〉涓紝鐢ˋdd Library鏂板鏈」鐩嚜宸辯殑jar
鍦≧untime灞炴ч〉涓紝鍙充笅瑙掔殑Classpath閲岋紝娣誨姞鍏ユ墍鐢ㄥ埌鐨勫閮ㄧ殑jar錛屾敞鎰忚繖浜沯ar蹇呴』瑕佸湪欏圭洰涓嬨傚啀浣跨敤鏂板緩鎸夐挳錛屽鍔犳湰欏圭洰鐢熸垚鐨刯ar
java浠g爜:聽 |
聽 聽 聽 聽 聽 聽 display = new Display(); 聽 聽 聽 聽 聽 聽 shell = new Shell(display , SWT.NULL); 聽 聽 聽 聽 聽 聽 shell.setMaximized(false); 聽 聽 聽 聽 聽 聽 shell.setBackground(display.getSystemColor(SWT.COLOR_BLACK)); 聽 聽 聽 聽 聽 聽 shell.setText("Example"); 聽 聽 聽 聽 聽 聽 shell.setBounds(0 , 700 , 1024 , 68); 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 //濮嬬粓鏈鍓?/span> 聽 聽 聽 聽 聽 聽 OS.SetWindowPos(shell.handle , OS.HWND_TOPMOST, 0 , 700 , 1024 , 68 , SWT.NULL); 聽 聽 聽 聽 聽 聽 //閫忔槑紿椾綋 聽 聽 聽 聽 聽 聽 OS.SetWindowLong(shell.handle , OS.GWL_EXSTYLE , OS.GetWindowLong(shell.handle , OS.GWL_EXSTYLE)^0x80000); 聽 聽 聽 聽 聽 聽 TCHAR lpLibFileName = new TCHAR (0, "User32.dll", true); 聽 聽 聽 聽 聽 聽 int hInst = OS.LoadLibrary(lpLibFileName); 聽 聽 聽 聽 聽 聽 if(hInst != 0){ 聽 聽 聽 聽 聽 聽 聽 聽 String name = "SetLayeredWindowAttributes\0"; 聽 聽 聽 聽 聽 聽 聽 聽 byte[] lpProcName = newbyte[name.length()]; 聽 聽 聽 聽 聽 聽 聽 聽 for(int i=0; i<lpProcName.length; i++){ 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 lpProcName [i] = (byte) name.charAt(i); 聽 聽 聽 聽 聽 聽 聽 聽 } 聽 聽 聽 聽 聽 聽 聽 聽 int fun = OS.GetProcAddress(hInst , lpProcName); 聽 聽 聽 聽 聽 聽 聽 聽 if(fun != 0){ 聽 聽 聽 聽 聽 聽 聽 聽 聽 聽 OS.CallWindowProc(fun , shell.handle , 0,50,1); 聽 聽 聽 聽 聽 聽 聽 聽 } 聽 聽 聽 聽 聽 聽 聽 聽 OS.FreeLibrary(hInst); 聽 聽 聽 聽 聽 聽 } |