0

I have a simple, single-file Java program that functions on it's own just fine, but it's command line only. I wanted to try using Processing to give it an interface and some animations.

Is that possible?

I have .pde with a .java in the same folder so that when I open my sketch I can see the .java in another tab. In my sketch file I threw in some basic setup() and draw(), but when I run it I get an InstantiationException. Has anyone tried something like this successfully?

1
  • By the way, I'm referring to Processing.org Processing. processing.org Commented Apr 29, 2012 at 2:19

1 Answer 1

1

Just ran a basic test and all compiles fine with Processing 1.5.1 :

void setup(){
  new Test();
}
//Test.java in separate tab
class Test{
  Test(){   System.out.println("Hello!"); }
}
Sign up to request clarification or add additional context in comments.

2 Comments

The problem I was having (I believe) stemmed from attempting to call a class in my .java file with the same name as my .pde ...Sigh. Oh, well. I changed the name and it worked like a charm. Thank you for the response, though. An up-vote and a check for you, sir.
Thank you very much kind sir :) Btw, the Processing 'IDE' is ok for quick'n'dirty sketches, but at the moment it's more like an enhanced text editor than an IDE, so for larger projects I don't recommend it. One other thing it does is pack all your 'tabs' into a single Java PApplet that gets compiled. If you're comfortable with Java and eclipse I recommend giving the Proclipsing plugin a try. Goodluck !

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.