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 › creating jars and compliling classes
Page Index Toggle Pages: 1
creating jars and compliling classes (Read 1521 times)
creating jars and compliling classes
Aug 24th, 2005, 9:48pm
 
I'm trying to complie a class but keep getting a can't resolve error for all PConstant refs.

Are there any pointers for compiling a class with resources, including processing.core.*; etc. into a jar file other than the howto.txt?

Using a mac os x 10.3.9 (which is nearly a 10.4 but not quite, grrrr!)



Re: creating jars and compliling classes
Reply #1 - Aug 24th, 2005, 11:06pm
 

Seems that the best way for me to get it working is to hit the export button and then strip the extraneous stuff out of the .jar file and then .zip it back up.

Does the job, anyway! (Probably how it's intended and I'm just a bit slow)
Re: creating jars and compliling classes
Reply #2 - Aug 27th, 2005, 3:33pm
 
anything you put in a subfolder called "data" can be read by openStream or loadStrings or loadImage or anything like that. so just test with that and then include it in your .zip or .jar that you create at the end.

as for PConstants, add "implements PConstants" to any class definition that you want to have work with PConstants. so for instance:

public class Shape implements PConstants {
 // all the constants will work inside here
}
Page Index Toggle Pages: 1