We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am working only since a short time with Processing. I always get this error message:
Usage: PApplet <appletname>
For example I am using these 2 Java-files in a project:
Main.java:
`package de.hpi.javaide.firststeps;
import processing.core.PApplet;
public class Main {
public static void main(String[] args) {
PApplet.main(new String[]{"--present", "de.hpi.javaide.firststeps.Game"});
}
}
`
Game.java:
package de.hpi.javaide.firststeps;
import processing.core.PApplet;
@SuppressWarnings("serial")
public class Game extends PApplet {
@Override
public void setup() {
noStroke();
fill(255, 10, 10);
rectMode(CORNER);
rect(5, -100, 20, 10);
}
@Override
public void draw() {
}
}
These files come from a course of OpenHPI. Last year processing worked without any problem. Now I get the above shown error code when using any java file using process.
I am using eclipse neon, java version "1.8.0_161" and core.jar (version 3)
Any help appreciated! Thanks in advance for your help!
Answers
I suspect the problem is that the source code you are working with is written for Processing 2. With Processing 3 and Eclipse Neon you Game class should look like this
Thank You very much for Your answer. I suspected this also as a cause of my problem. But the solution of the problem was, taht when clicking 'Run' in eclipse You have to configure 'Run' and select 'Main.java'. When clicking 'Run' 'PApplet.java' is used, for what reason ever. Doing so using 'stup()' and not 'settings()' it works nevertheless. Thanks for Yout quick support. I have learned some new things.