Skip to content
Advertisement

Launching Processing.org App on Linux with Java Xmx

I have an application created with Processing.org and am trying to run it on Linux. Shortly into the app I get a Heap Size error. I am trying to run the app from the command shell with the line java -Xmx512m myAppNameHere but when I do this, I get a message that says “Exception in thread “main” java.lang.NoClassDefFoundError: myAppNameHere/exec” Then it says “Could no find the main class: myAppNameHere. Program will exit”

So… is there a special way to call the app when running this command? I tried myApp.java, myApp.exe, myApp.pde… Any ideas would be greatly appreciated.

Advertisement

Answer

Are you saying it runs but crashes with a heap size error, so you’ve changed the command line by adding in -Xmx512M and now you are getting a NoClassDefError?

You have probably not added your Xmx option into the command line correctly, ie you have set the command line specifically to java -Xmx512M appName, without setting the classpath and whatever other million command line switches are required to make the app run.

Short answer is you haven’t told java where to find the app class files so it cant run them. Add -cp someJar.jar (or the directory if you have class files lying around) to your command line

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement