electronic_cat
Registered
I am trying to help a friend test a Java program he has which works on XP. I am new to the Mac, and am using my spouse's computer which runs Leopard. The program was built in eclipse using swt and Postgres libraries. On the PC the structure is
dkvBrowser.jar
lib (folder)
and to run it on the PC you just double click. or from cmd, you say
java.exe -jar dkvBrowser.jar
I downloaded the latest OSX swt.jar from eclipse.org, dated 6/25/07
These are the things I have tried:
from terminal,
java -jar dkvBrowser.jar
this gave me "Segmentation fault"
I read about this some, and decided I needed a different swt.jar. I got the version for OSX dated 1/14/2006.
With this, I got
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/events/DragDetectListener
I then moved the jar files in lib to the top level, and added a class path:
java -jar -classpath . DKVBrowser.jar org.dkv.DKVBrowser
this gave:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Layout
I also tried listing all the jars in the classpath and got a similar message.
(org.dkv.DKVBrowser is the main class name on the manifest in eclipse)
Then I tried building it in JarBuilder. I input the three jar files. The build seemed okay, but when I tried to run it, I got "the application swt quit unexpectedly"
Can anyone suggest something to try?
dkvBrowser.jar
lib (folder)
swt.jar
postgresql-8.2-506.jdbc3.jar
postgresql-8.2-506.jdbc3.jar
and to run it on the PC you just double click. or from cmd, you say
java.exe -jar dkvBrowser.jar
I downloaded the latest OSX swt.jar from eclipse.org, dated 6/25/07
These are the things I have tried:
from terminal,
java -jar dkvBrowser.jar
this gave me "Segmentation fault"
I read about this some, and decided I needed a different swt.jar. I got the version for OSX dated 1/14/2006.
With this, I got
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/events/DragDetectListener
I then moved the jar files in lib to the top level, and added a class path:
java -jar -classpath . DKVBrowser.jar org.dkv.DKVBrowser
this gave:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Layout
I also tried listing all the jars in the classpath and got a similar message.
(org.dkv.DKVBrowser is the main class name on the manifest in eclipse)
Then I tried building it in JarBuilder. I input the three jar files. The build seemed okay, but when I tried to run it, I got "the application swt quit unexpectedly"
Can anyone suggest something to try?