We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › exported winapplication: could not find main class
Page Index Toggle Pages: 1
exported winapplication: could not find main class (Read 2778 times)
exported winapplication: could not find main class
Sep 2nd, 2009, 1:44am
 
Greetings

I exported a small processing script into a win application. (PDE, File->Export Application)

When I start the resulting exe i get an error message: Could not find the main class. Program will exit! This is comes from the JVM.

JDK6 is installed.

I have only little insight into Java, but I tried a batch to start the win application that sets classpath:
Code:
set classpath=C:\Programme\Java\jdk1.6.0_16\lib;D:\sketch_sep02a\application.windows\lib\core.jar;D:\sketch_sep02a\application.windows\lib\sketch_sep02a.jar
sketch_sep02a.exe


That does not work. Can anyone help?

Starting an exported applet via java -jar sketch_sep02a.jar works.
Re: exported winapplication: could not find main class
Reply #1 - Sep 2nd, 2009, 7:32am
 
Just tried (Processing 1.0.5, Windows XP Pro SP3), works fine...
You have not tried to put the resulting .exe somewhere else, haven't you? The exe file is just boiler plate code which needs the jar files in the lib directory.
Re: exported winapplication: could not find main class
Reply #2 - Sep 6th, 2009, 1:34am
 
I'm having the same problem, both for Applet, and for .exe exports.

When I try to run index.html or the .exe the screen stays white and nothing loads.
When I run the actual .jar, an error message appears, saying
"Could not find the main class. Program will now exit."

Re: exported winapplication: could not find main class
Reply #3 - Sep 6th, 2009, 2:59am
 
I don't have this problem, the sketch runs with either:
java -cp Test.jar Test
or
java -jar Test.jar
Processing 1.0.5 on Windows XP
Re: exported winapplication: could not find main class
Reply #4 - Sep 10th, 2009, 12:34am
 
PhiLho  wrote on Sep 2nd, 2009, 7:32am:
Just tried (Processing 1.0.5, Windows XP Pro SP3), works fine...
You have not tried to put the resulting .exe somewhere else, haven't you The exe file is just boiler plate code which needs the jar files in the lib directory.


Processing 1.0.6
Windows XP SP3 and JDK6

I kept the directory structure intact and still the problem occurs.

When I export my program into a web application it works just fine.

Same problem when I use Processing 1.0.7
Page Index Toggle Pages: 1