如何使 Eclipse(SWT 程序)能夠使用 XP 系統外觀?

Eclipse_Turn_On_XP_Skin.txt

如何使 Eclipse(SWT 程序)能夠使用 XP 系統外觀?

Q: How do I make SWT show the Windows XP skins?
A: In order for an application to show the Windows XP skins, there must be a manifest file located in the same place as the executable that launches the application. Here is a sample manifest file to download.
The name of the manifest file must match the name of the executable. In the case of eclipse, the executable is javaw.exe and the manifest file must have the name javaw.exe.manifest. The manifest file must be in the jre\bin folder for the VM you use to launch Eclipse. Note: the eclipse.exe executable does not launch Eclipse; eclipse.exe displays a splash screen and then invokes the Java VM.

http://www.eclipse.org/swt/javaw.exe.manifest

或者下載這個:

javaw.exe.manifest.rar 1KB

在 Windows XP 系統下, 一般我們用的 Eclipse 的按鈕就是像 Windows 2000 下面那樣的方塊按鈕, 不能使用 XP 的系統外觀主題, 如何讓 Eclipse 也能顯示現代的 XP 外觀呢, 例如有的用戶喜歡的蘋果桌面主題呢?
長話短說就是放這個鏈接所指的文件 javaw.exe.manifest 到 javaw.exe 所在的目錄下, 具體可能位置爲:
c:\windows\system32\ (如果你安裝的時候選擇了 JRE, 這裏將有一個 java.exe 和 javaw.exe);
c:\Program Files\Java\JRE1.xxx\bin\ (同上);
c:\jdk1.4.2\jre\bin\ (只安裝了 JDK).
已經測試過了, Eclipse 3.0.1, Eclipse 3.1, Eclipse 3.2, 都可以顯示最新的系統外觀了.

同樣的技術, 只要重命名 javaw.exe.manifest 到其它文件名, 例如 myexe.exe.manifest, 就能使一些原來不能顯示 XP 外觀的老式程序顯示新的 XP 外觀了. 目前實驗成功的有: TurboLaunch, Gel 等.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章