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 & HelpPrograms › Problems with displaying executable jar file
Pages: 1 2 
Problems with displaying executable jar file (Read 1986 times)
Problems with displaying executable jar file
Mar 31st, 2007, 8:03pm
 
Hello,

I've made several works in processing and have always been able to export the applets succesfully and show it online succesfully. Although with my recent work when i exported it, the jar file only shows a grey screen. It has the right size that i've set up in my sketch but nothing else works.
In my sketch itself i can play it perfectly fine and i can open the .exe file in the windows application perfectly as well. Something is just wrong with my jar file although i did nothing out of the ordinary. The only thing i did different this time is that i've used a data file to make my work and a soundlibrary but i do not see how this could be a problem of displaying the jar file if i can play it perfectly in my sketch itself.

This is the first time i worked with a data file and a soundlibrary so maybe there is something i had to do different that i'm not aware of, or could it be a bug?
I'm really clueless on this one, any help would be appreciated
Re: Problems with displaying executable jar file
Reply #1 - Mar 31st, 2007, 9:00pm
 
If you are doing something that's not allowed in an applet, like accessing the local file system or accessing the line in of the sound card, you'll get a security exception, which will crash the applet if you aren't catching it. Open up the java console and then run the applet in your web browser, you should see what exception you are getting.
Re: Problems with displaying executable jar file
Reply #2 - Apr 2nd, 2007, 1:05am
 
I'm sorry but i dont understand what you mean with open up the java console. I uploaded the java file to the server as well if that's what you mean
Re: Problems with displaying executable jar file
Reply #3 - Apr 2nd, 2007, 2:12am
 
When you are running an applet in a web page you should see a little coffee cup icon in the bottom right corner of your screen, we all the other little icons next to the clock (this is assuming you are on win xp). If you right click on the coffee cup there should be a 'open console' option. This will open a new window that shows messages from java programs. Anything that shows in the bottom part of the PDE when you run a sketch there, like any println commands and exceptions, will show up in the Java console.

Hope that helps.
Re: Problems with displaying executable jar file
Reply #4 - Apr 4th, 2007, 12:06pm
 
Thanks for the help but i don't think this is it. You can't see it on any computer. This really seems a mystery to me but i assume it has to be in a way that i perhaps saved the applet, tho i did everything as i always do.
Re: Problems with displaying executable jar file
Reply #5 - Apr 4th, 2007, 12:55pm
 
a link to the applet that's not working would be really helpfull with debugging your problem ..

F
Re: Problems with displaying executable jar file
Reply #6 - Apr 5th, 2007, 2:39pm
 
Ah sorry, http://www.audiovisuelevorming.be/6avv/1/lieve/wildwest/processingsite.html

I found the source example here on the forum (there's a refference to it in my source, tho in dutch) But as i've said in another post, this was for a project of school but we had to look for examples we could use and the teacher is aware that i asked for help on the forums (the deadline is over anyway but i still couldnt figure out the problem and cant get over it untill i can solve it)
Re: Problems with displaying executable jar file
Reply #7 - Apr 5th, 2007, 3:14pm
 
Your sketch uses jsyn. On a webpage, people have to have installed the jsyn plugin themselves before it'll work.
Re: Problems with displaying executable jar file
Reply #8 - Apr 6th, 2007, 6:03pm
 
Great!
Ah it's so simple, thanks for all your help it's working now. Wohooo!
Re: Problems with displaying executable jar file
Reply #9 - Jun 1st, 2007, 2:28pm
 
Hi, I've searched for how to use libraries with web app but couldn't find anything. I might not know the right keywords. I found some staff on the processing site about exporting and bugs with OPENGL but nothing really clear.

I'm using the Opengl and Ess libraries on a pc ( XP ). My applet doesn't work on the internet. Is there something special to do if you want to use special libraries on the net ( like with director ). I read something about signed applets ( http://www.tree-axis.com/Ess/signed_applets.htm ) on the ESS website but didn't really understand how to do it. I imagine it's something about allowing the applet to use staff that browsers find dangerous.

Here is the applet:
http://sosobering.free.fr/processing/Souffle

Thanks for your answers.

Update: I change size (screen.width/2,screen.height/2)  by size (800,600) and also change it in all variables using the screen thing. Now I'v got the right size and the browser ask me for the trust thing. So far so good, but then nothing, just stop there.

ps: excuse my english I'm french.

Looking forward to earing from someone ( means help )
Re: Problems with displaying executable jar file
Reply #10 - Jun 1st, 2007, 7:56pm
 
The console tells me this ( about 10 times ):


Exception in thread "AWT-EventQueue-3" java.security.AccessControlException: access denied (javax.sound.sampled.AudioPermission record)

at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)

at java.lang.SecurityManager.checkPermission(Unknown Source)

at com.sun.media.sound.JSSecurityManager.checkRecordPermission(Unknown Source)

at com.sun.media.sound.DirectAudioDevice$DirectDL.implOpen(Unknown Source)

at com.sun.media.sound.AbstractDataLine.open(Unknown Source)

at krister.Ess.Ess.startInput(Ess.java:356)

at krister.Ess.AudioInput.start(AudioInput.java:90)

at ballon2souffle3bweb.setup(ballon2souffle3bweb.java:34)

at processing.core.PApplet.handleDisplay(PApplet.java:1281)

at processing.opengl.PGraphicsOpenGL$1.display(PGraphicsOpenGL.java:221)

at com.sun.opengl.impl.GLDrawableHelper.display(GLDrawableHelper.java:78)

at javax.media.opengl.GLCanvas$DisplayAction.run(GLCanvas.java:281)

at com.sun.opengl.impl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:194)

at javax.media.opengl.GLCanvas.maybeDoSingleThreadedWorkaround(GLCanvas.java:258)

at javax.media.opengl.GLCanvas.display(GLCanvas.java:130)

at javax.media.opengl.GLCanvas.paint(GLCanvas.java:142)

at sun.awt.RepaintArea.paintComponent(Unknown Source)

at sun.awt.RepaintArea.paint(Unknown Source)

at sun.awt.windows.WComponentPeer.handleEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

I think I'm going to ask directly to Krister Olsson from his website and also to some friends.
I will post the result if I found out.

cheers
Re: Problems with displaying executable jar file
Reply #11 - Jun 2nd, 2007, 2:39am
 
If you try to get an AudioInput in an applet and the applet isn't signed, it will cause that security exception. Go reread the signed applets page on the Ess website, it'll make sense eventually. Wink (I was also baffled by that at first.)
Re: Problems with displaying executable jar file
Reply #12 - Jun 2nd, 2007, 5:12am
 
I can't find out this one. No extra libraries, no files, and I still get a grey box.  Mac OS X 10.4.9,  java 1.4.2

it's a "blob" that follows the mouse. click to drop food, which makes the blob larger if it runs over it.

CODE:

/**
*Come on, work will ya?
*/


int i, siz = 600, num = 0, r = 10;
boolean FLAG;
float theta0 = 0, theta, x = width/2, y = height/2;
food f[] = new food[10];

void setup()
{
 size(siz,siz);
 background(0);
 smooth();
 noStroke();
 randomSeed(second());
 PFont fontA = loadFont("Ziggurat-HTF-Black-32.vlw");
 textFont(fontA, 14);
 rectMode(CENTER);
 frameRate(40);
}

void draw()
{
 //partial scren erase
 fill(0);
 ellipse(x,y,r+2,r+2);

 //turning rate + correction
 theta = atan2((mouseY - y),(mouseX - x));
 if ((theta - theta0)>PI)
   theta0 = theta0 + (-TWO_PI + theta - theta0)/15;
 else if ((theta - theta0)<-PI)
   theta0 = theta0 + (TWO_PI + theta - theta0)/15;
 else
   theta0 = theta0 + (theta - theta0)/30;
 if (theta0 > PI)
   theta0 = theta0 - TWO_PI;
 if (theta0 < -PI)
   theta0 = theta0 + TWO_PI;

 //move
 x = x + (3*cos(theta0));
 y = y + (3*sin(theta0));

 //inputs


 //draw
 stroke(255);
 for( i = 0; i < num; i++) {    
   if (f[i].hitTest(f[i].x,f[i].y,x,y))
     FLAG = true;
   if (FLAG)
   {
     if (i < (num - 1))
     {
       f[i] = f[i+1];
       rect(f[i].x, f[i].y, 5, 5);
     }
     else
     {
       num = num - 1;
       r = r + 1;
     }
   }
   else
   {
     rect(f[i].x, f[i].y, 5, 5);
   }
 }
 FLAG = false;
 fill(255);
 ellipse(x,y,r,r);
 //  line(x,y,x+15*cos(theta0),y+15*sin(theta0));
 noStroke();
}

void mousePressed() {
 if (mouseButton == LEFT)
 {
   if (num < 10)
   {
     f[num] = new food();
     num = num + 1;
   }
 }
 else if(mouseButton == RIGHT)
 {
   fill(0);
   ellipse(x,y,r+2,r+2);
   fill(255);
   x = width - mouseX;
   y = height - mouseY;      
 }
}

class food {
 float x, y;

 food()
 {
   x = mouseX;
   y = mouseY;
 }

 food(food f)
 {
   x = f.x;
   y = f.y;
 }  

 boolean hitTest(float a, float b, float c, float d)
 {
   if ((sqrt(sq(c - a) + sq(d - b))) < r/2)
     return true;
   return false;
 }
}
Re: Problems with displaying executable jar file
Reply #13 - Jun 2nd, 2007, 6:06pm
 
ddf wrote on Jun 2nd, 2007, 2:39am:
If you try to get an AudioInput in an applet and the applet isn't signed, it will cause that security exception. Go reread the signed applets page on the Ess website, it'll make sense eventually. Wink (I was also baffled by that at first.)


Sorry but still don't get what Krister is saying. Do I have to put those lines in my code, in processing. Sorry I'm complete new to java. Going to try it in my code.
Re: Problems with displaying executable jar file
Reply #14 - Jun 2nd, 2007, 7:35pm
 
Still don't get it. I think I might need to download a soft to create a certificate. I though I had to do it from the java console but no. Even If I saw various certificate that I've "trust" before.


lost.....
Pages: 1 2