Problem launching application on Linux
in
Integration and Hardware
•
7 months ago
Hello everybody,
I have developed an application in eclipse in Windows using the processing libraries.
I have a processing class which contains the following:
- package test3;
- import processing.core.PApplet;
- public class Test3 extends PApplet {
- public void setup() {
- size(280,200);
- text("test", 10, height/2);
- noLoop();
- }
- static public void main(String[] passedArgs) {
- String[] appletArgs = new String[] { "--full-screen", "--bgcolor=#666666", "--stop-color=#cccccc", "test3.Test3" };
- }
- }
I have export this application : Project -> Processing Export (Output : Application)
My application work's fine on windows but when I launch the application on Linux
- java -cp lib/core.jar:lib/Test3.jar Test3
I have an error :
- Exception in thread "main" java.lang.NoClassDefFoundError : Test3
- Caused by: java.lang.ClassNotFoundException : Test3
- ...
- Could not find the main class: Test3. Program will exit
To verify that i can execute a processing application on linux, I have write too an application on windows with the IDE processing and after export, I have launch it on linux and it's work fine.
It seems that is my export on eclipse which don't work but I don't understand why.
After the export I have these files :
- application.linux
- lib
- Test3.jar
- source
- test3
- Test3.java
- Test3
And Test3 :
#!/bin/sh
APPDIR=$(dirname "$0")
java -Djava.library.path="$APPDIR" -cp "lib/Test3.jar"test3.Test3
1