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 › Processing as part of a standalone Java app
Page Index Toggle Pages: 1
Processing as part of a standalone Java app (Read 957 times)
Processing as part of a standalone Java app
May 27th, 2008, 6:45pm
 
Hello Forum,

I ran into this site (http://www.aharef.info/static/htmlgraph/?url=http%3A%2F%2Fwww.google.com) that uses Processing to make a visual representation of an HTML page. I want to use this code in a standalone app that I have written but I'm having difficulty porting it.
I'm not interested in using the Processing development environment nor in programming in this language. I just want to know which libraries I need to include in my classpath in order to use Processing and what classes I need to import to get to all the funky method calls that the code is making.. Basically how I turn code like this:

void setup() {
 size(750, 750);
 // if you want to run it locally from within processing, comment the two following lines, and define urlPath as http://www.whateveryoursite.com
 String urlFromForm = param("urlFromForm");
 urlPath += urlFromForm;
 smooth();
 framerate(24);
 strokeWeight(2);
 ellipseMode(CENTER);
 physics = new ParticleSystem( 0, 0.25 );
 centroid = new Smoother3D( 0.0, 0.0, 1.0,0.8 );
 initialize();
 this.getDataFromClient();
}

into plain old normal Java.

Thanks for your help.

Jurgen
Re: Processing as part of a standalone Java app
Reply #1 - May 27th, 2008, 8:50pm
 
I guess you just need to link processing.core library to your project and have fun with processing.core.PApplet.

To see how the code in translated into "plain old normal Java", just put your code in Processing's IDE, do File > Export Application and have a look to the .class file in the source folder.

Page Index Toggle Pages: 1