Cannot load 64-bit SWT libraries on 32-bit JVM ( replacing SWT file )

Eclipse is launching your application with whatever JRE you defined in your launch configuration. Since you’re running the 32-bit Eclipse, you’re running/debugging against its 32-bit SWT libraries, and you’ll need to run a 32-bit JRE. Your 64-bit JRE is, for whatever reason, your default Installed JRE. To change this, first make sure you have a … Read more

Java Desktop application: SWT vs. Swing [closed]

Pros Swing: part of java library, no need for additional native libraries works the same way on all platforms Integrated GUI Editor in Netbeans and Eclipse good online tutorials by Sun/Oracle Supported by official java extensions (like java OpenGL) Cons Swing: Native look and feel may behave different from the real native system. heavy components … Read more

How to draw a tree representing a graph of connected nodes?

You might consider any of these: JHotDraw, cited here, a meta-library for creating custom graph editors. Prefuse visualization library, illustrated here and here. Batik, which implements SVG rendering. JGraph demo and user manual. GraphStream, illustrated here. JFreeChart XYBubbleRenderer A JTree, suggested here, with a custom TreeIcon. A custom renderer, with x based on a fraction … Read more

Invalid Thread Access Error with Java SWT

It is thrown because your listener code is called from outside the SWT Display thread. You run code on the display thread like this: Display.getDefault().syncExec(new Runnable() { public void run() { // … } }); or, asynchronously: Display.getDefault().asyncExec(new Runnable() { public void run() { // … } });

Create cross platform Java SWT Application

I’ve just run into the same problem. I haven’t tried it yet, but I plan to include versions of swt.jar for all platforms and load the correct one dynamically in the start of the main method. UPDATE: It worked. build.xml includes all jars: <zipfileset dir=”/home/aromanov/workspace/foo/lib” includes=”swt_linux_gtk_x86.jar”/> <zipfileset dir=”/home/aromanov/workspace/foo/lib” includes=”swt_macosx_x86.jar”/> <zipfileset dir=”/home/aromanov/workspace/foo/lib” includes=”swt_win32_x86.jar”/> <zipfileset dir=”/home/aromanov/workspace/foo/lib” includes=”swt_linux_gtk_x64.jar”/> … Read more