I'm hitting this as well. Here is how to reproduce:

USER@HOST /c/Vorburger-MVO-PERSONAL/MIFOS/MIFOS-4919_ExectuableWAR/javaee/appasm/target/appassembler/bin (master)
$ ./app
Exception in thread "main" java.lang.NoClassDefFoundError: com/mycompany/app/App

Caused by: java.lang.ClassNotFoundException: com.mycompany.app.App
        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: com.mycompany.app.App.  Program will exit.

USER@HOST /c/Vorburger-MVO-PERSONAL/MIFOS/MIFOS-4919_ExectuableWAR/javaee/appasm/target/appassembler/bin (master)
$ uname -a
MINGW32_NT-6.1 W8441 1.0.12(0.46/3/2) 2010-02-05 01:08 i686 unknown

This is because, like you are doing for Cygwin in the generated shell script, you'd have to "switch paths to Windows format before running java".

This appears to be a familiar problem, here is some further reading I stumbled upon while researching this a bit out of curiosity:

I'll attach a partial attempt at addressing, which doesn't fully work yet, I'm giving up and hoping somebody else can complete this. What's missing is dealing with the CLASSPATH, it's even possible that converting the CLASSPATH is the only thing that's needed and the other conversion are automatically done by MINGW32 (but then why would Ant's launcher do them explicitly?)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to