We are about to switch to a new forum software. Until then we have removed the registration on this forum.
m using processing 2. code runs fine without browser but when i export it as applet and trying to run in browser then nothing is displayed nor i got any error. pls help.. its urgent. :(
Answers
If you expect help with this then you need to provide more information.
Did you create the sketch in Java mode?
Are you using any contributed libraries (what import statements do you have)?
When attempting to display in browser were you using JavaScript mode?
What were you using to export the applet?
Processing 2+ doesn't export as applet anymore!
For that you either use Processing 1.5.1 or use an existing utility which accomplishes that!
For Java mode sketches using the default (Java2D) renderer there is the Applet Exporter and Signer tool which works with Processing 2.1
yes m using export in java mode with processing 2.0 with applet signer and export tool
i have following import statements processing.papplet; processing.pimage;
Are you using the P2D or P3D renderer?
If you are working in Processing IDE then the import statements are not required unless you have created your own class in a .java tab, try running your sketch without them.
m using processing IDE all other apps are running in browser but following code doesnt run in browser nor show any error
the problem was due to following error in java console. but how to slove it?? The file "./image.jpg" is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.
Are you using proper directives? http://processingjs.org/reference/pjs directive/
There are three things to try
1) The size() statement should be the first on in setup() so change it to
2) You might also try changing line 3 to
llegeixImatge(iName);
3) In your sketch folder create a new folder called data and put the image in there.
I tried all the above solution but still getting same error in java console that image is missing or inaccessible.
The solution is
and make sure the image is in a folder called data inside the sketch folder.