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 & HelpSyntax Questions › *.jar and *.java files
Page Index Toggle Pages: 1
*.jar and *.java files (Read 763 times)
*.jar and *.java files
Dec 16th, 2009, 10:04am
 
hello,

as i read in a previous post, when i export my sketch, the folder that pops up contains , one *.jar, one *.java among others.

i supose everything is included in the *jar file, but if i don't have the *.java in the same folder, an error will ocur.

why? does the *.jar needs the *.java to run.
what is being executed there, the *.jar or the *.java?


Exception: java.lang.ClassNotFoundException: mysketch.class
ocurs if e move the *.java, but i look into the *.jar file and mysketch.class is there.

can someone explain it to me?

it's being a little hard to me the understand how these files work.

thanks.

EDIT: can i export has one *.jar file only? including the *.java in the *.jar file?
Re: *.jar and *.java files
Reply #1 - Dec 17th, 2009, 1:47am
 
Mmm, I am pretty sure that the .java and .pde files are here only for documentation purpose. They are certainly not required.
I suggest to re-do your experimentation, and if you still have the same problem, describe here the exact steps you do.
Re: *.jar and *.java files
Reply #2 - Dec 17th, 2009, 11:05am
 
sorry PhiLho, you're right.

after some time thinking about this, i made all my tests one more time, but cleaning the browser cache between every test. doing that the result seems to be as you say.

i'm not 100% sure about that was the reason for the those errors. do you think it's possible? the browser using old cached files (1mn old, maybe seconds old) instead of the updated files?

thanks for this one PhiLho.

EDIT: if this is the problem, using the php or html header on the index file NO-CACHE , can prevent this?
Re: *.jar and *.java files
Reply #3 - Dec 17th, 2009, 11:43am
 
Java indeed cache all the jar files, as they can be quite big so it is better not to download them each time user need them.
It has no reliable way to tell if a jar have been updated: some servers doesn't give reliable information about this. I am not sure if headers can change the behavior.
So, part of the routine task of testing an applet is to empty the cache each time you update the jar.
Re: *.jar and *.java files
Reply #4 - Dec 17th, 2009, 12:14pm
 
damn, now it's clear as water.......

work in progress again.......
Page Index Toggle Pages: 1