LoginSignup
0
0

More than 1 year has passed since last update.

【Processing-java】Usage: PApplet [options] <class name> [sketch args]と表示されたら。

Last updated at Posted at 2022-01-25

実行コマンド

スケッチフォルダは気にしないで。。

$ processing-java --sketch=`pwd`\\$1 --force --run

エラー文

そもそもErrorなのか?と思うようなUsageが表示された。原因不明。
「なにもしてないのに」と思ったときは何かしている。

Usage: PApplet [options] <class name> [sketch args]
See the Javadoc for PApplet for an explanation.
Finished.
Could not run the sketch (Target VM failed to initialize).
For more information, read revisions.txt and Help → Troubleshooting.
Could not run the sketch.

main関数

あるclassにてmainと名付けたクラスメソッドを実装していた。つまり、以下のような構造。

void setup(){
    hoge = new Hoge();
}
void draw(){
    hoge.main();
}

これがまずかったっぽい。mainを別の名前(display)に変えたら動いた。

反省

mainとかそういう名づけはしない。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0