Personal tools
You are here: Home ブログ matsuyama Linux的SWTプログラミング
Document Actions


gentoo portageのSWTはx86_64で問題がある(org.eclipse.swt.gtk.OS.memmoveがないとおこられる)ようなので -> Other downloads -> SWT Binary and Source -> Linux (x86_64/GTK-2)をダウンロードして以下のようにインストール。

% su
% unzip -d /usr/local/

compile and run a test program.

import org.eclipse.swt.widgets.*;

public class Test {
    public static void main(String[] args) {
        Display display = new Display();
        Shell shell = new Shell(display);
        shell.setText("Test Shell");
        shell.setSize(200, 200);;
        while (!shell.isDisposed()) {
            if (!display.readAndDispatch())
% export CLASSPATH=$CLASSPATH:/usr/local/swt-M20060629-1905-gtk-linux-x86_64/swt.jar
% export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/swt-M20060629-1905-gtk-linux-x86_64/
% javac
% java Test

You may also be happy to read following useful documents (notably org.eclipse.swt.widgets in official).

Nihongo unatenakunatta. Koredakara GUI application ha iya nanda.

The URL to Trackback this entry is:
Add comment

You can add a comment by filling out the form below. Plain text formatting.

This helps us prevent automated spamming.
Captcha Image

Copyright(C) 2001 - 2006 Ariel Networks, Inc. All rights reserved.