java cannot run processing, quits with the following error: Error: Could not find or load main class

Here is my MWE:

import java.lang.*;
import processing.core.PApplet;

public class test extends PApplet{

    public static void main(String[]args){
        PApplet.main("test");
    }

    public void settings(){
        size(500, 500, P2D);
    }

    public void setup(){
        background(255);
    }

    public void draw(){
        ellipse(mouseX, mouseY, 50, 50);
    }
}

I compile it with,

javac -classpath processing-3.3.7/core/library/core.jar test.java

It compiles without any warnings, or erros. But when I try to run it,

java test

I get the error,

Error: Could not find or load main class

What to do? I also tried adding class path when running, but it didn't help.

Tagged:

Answers

Sign In or Register to comment.