We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › Running a sketch from a java file
Page Index Toggle Pages: 1
Running a sketch from a java file (Read 1930 times)
Running a sketch from a java file
Mar 14th, 2010, 6:36pm
 
I've made a sketch that I'm pleased with for an assignment but a requirement is that the marker will only run the program from a java file called "menu", all they're going to do is type "java menu" from the command line. I've tried numerous things and so far nothing has worked so any help would be greatly appreciated. Thanks for your time
Re: Running a sketch from a java file
Reply #1 - Mar 15th, 2010, 7:09am
 
You can try this:
- name your sketch menu.pde
- export it as applet
- open with an archive viewer the generated menu.jar
- extract the menu.class and provide it (or just recompile the generated menu.java)

But that class file will still need the core.jar (or the .class files in the processing folder).
Re: Running a sketch from a java file
Reply #2 - Mar 17th, 2010, 6:42am
 
Thanks very much, I'll give that a try
Re: Running a sketch from a java file
Reply #3 - Mar 17th, 2010, 6:47am
 
Works a treat, can't believe I didn't think of it, thanks again
Page Index Toggle Pages: 1