分类: Java
2009-12-19 15:47:42
SWT 版本的选择:
Mac OSX (Mac/Cocoa) - This 32-bit port needs a Java 5 VM and runs on Leopard (OS X v10.5).
Mac OSX (Mac/Cocoa/x86_64) - This 64-bit port needs a Java 5 or Java 6 VM and runs on Leopard.
Mac OSX (Mac/Carbon) - This 32-bit port needs a Java 1.4 or Java 5 VM and runs on both Tiger (OS X v10.4) and Leopard.
安装:
$ mkdir ~/java
$ mkdir ~/java/swt
$ cp swt*.zip ~/java/swt
$ cd ~/java/swt
$ unzip swt*.zip
$ ls
$ about.html about_files src.zip swt-debug.jar swt.jar
使用:
$ javac -cp ~/java/swt/swt.jar:. filename.java
$ java -XstartOnFirstThread -cp ~/java/swt/swt.jar:. filename
简化使用过程:
$ sudo cp ~/java/swt/swt.jar /Library/Java/Extensions/
$ javac filename.java
$ java -XstartOnFirstThread filename
SWT 的不同版本