Hi-
I ran the "hello world" app without swt at cmd to println and it printed out the msg, so it can see my class in the jar. The syntax below is complaining about swt. It is interesting that I tried a few things:
1.) redindex the repository
2.) go to window show view and rebuild index. At first my jars weren't showing, and now they are.
3.) I started fresh with a new
Maven project because the other one might be tainted, as I was newer at this.
I did a echo %M2_REPO% and it printed out the right location.
I did a manifest display with jar -tf my-app2-0.0.3-SNAPSHOT.jar
I ran install with no reportable errors.
C:\Users\mtdew3q\workspace\my-app2\target>jar -tf my-app2-0.0.3-SNAPSHOT.jar
META-INF/
META-INF/MANIFEST.MF
com/
com/thirdshiftcoder/
com/thirdshiftcoder/derbyApp/
City.hbm.xml
com/thirdshiftcoder/derbyApp/City.class
com/thirdshiftcoder/derbyApp/Foo.class
com/thirdshiftcoder/derbyApp/Table_Demo.class
META-INF/maven/
META-INF/maven/com.thirdshiftcoder.derbyApp/
META-INF/maven/com.thirdshiftcoder.derbyApp/my-app2/
META-INF/maven/com.thirdshiftcoder.derbyApp/my-app2/pom.xml
META-INF/maven/com.thirdshiftcoder.derbyApp/my-app2/pom.properties
C:\Users\mtdew3q\.m2\repository>
java -cp my-app2-0.0.3-SNAPSHOT.jar com.thirdshi
ftcoder.derbyApp.Table_Demo
Exception in
thread "main" java.lang.NoClassDefFoundError: org/eclipse/swt/widge
ts/Layout
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Layout
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: com.thirdshiftcoder.derbyApp.Table_Demo. Program
will exit.
my pom is here:
located in .m2
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>c:/Users/mtdew3q/.m2/repository</localRepository>
<interactiveMode>false</interactiveMode>
<usePluginRegistry>false</usePluginRegistry>
<offline>true</offline>
</settings>
The path to the offending jar generating a msg. when I try to run my program absolute path to SWT is c:\Users\mtdew3q\.m2\repository\swt\swt\4.3.0\swt-4.3.0.jar. Of note, there was never really a version when that jar came from the web. It just said swt.jar. That was the right version, but from the web the version wasn't included in the file name.
I am at my wits end. I can't get maven to recognize that SWT is in the local repository. If I can't include it with build_path, how in the world can I get it to recognize it is HERE in the local repo? I am also confused because it says maven dependencies in my project but it seems to be doing nothing.
When I run this as a java project from within eclipse a shell with a tbl shows with my data from derby displayed.
I know I said I'd wait to post, but I have some time off for election day and tried to give it another whirl. I have fun doing this, but I need a little break through on this one to keep me going.
If I can get this to recognize the local repo, I will think this is the coolest thing since cold sliced pizza.
thanks A LOT for helping, if you can,
jim