Hello Guest

[FIXED] Jre6u19 security popup

  • 28 Replies
  • 37226 Views
*

Offline kappa

  • *****
  • 1319
Re: Jre6u19 security popup
« Reply #15 on: August 22, 2010, 11:59:22 »
hmm, odd, can you try if http://www.lwjgl.org/applet/ works for you.

Bit difficult to tell further without looking at the applet, have you got it uploaded somewhere?

also are you still on JRE6u19? or have you updated to JRE6u21?
« Last Edit: August 22, 2010, 12:03:40 by javalwjgl »

Re: Jre6u19 security popup
« Reply #16 on: August 22, 2010, 14:20:23 »
This is insanely weird but I guess you know why :)

I solved it and figured out what it was. I had a parameter:
    <param name="al_logo" value="pictures/appletlogo.png">

If I use the default lwjgl picture (instead of my own) it works great and no popup appears.

Any idea how to solve it? It's nice to have my own logo there because I made my own loading screen look exactly the same so it seems like you're just loading one component.

Mike

*

Offline kappa

  • *****
  • 1319
Re: Jre6u19 security popup
« Reply #17 on: August 22, 2010, 14:28:34 »
are your logo's insides jars? try put them outside the jar if so.

Re: Jre6u19 security popup
« Reply #18 on: August 22, 2010, 18:25:47 »
The logo is outside the jar. It doesn't matter if I point it to "pictures/appletlogo.png" or "mylogo.png", I still get the warning.

*

Offline kappa

  • *****
  • 1319
Re: Jre6u19 security popup
« Reply #19 on: August 22, 2010, 18:47:05 »
hmm, I can reproduce this locally, loading an unsigned image causes java to throw a mixed jar warning.

* javalwjgl shakes fist at Oracle.

This means the classloader is blocking any resources that aren't signed.

guess you'll just have to work with the LWJGL logo's or sign your own jars for now.

I'll see if can find a solution to this for LWJGL 2.6.
« Last Edit: August 22, 2010, 18:52:52 by javalwjgl »

*

Offline bobjob

  • ****
  • 394
  • LWJGL: WOW SO GOOD
Re: Jre6u19 security popup
« Reply #20 on: August 23, 2010, 16:22:22 »
Code: [Select]
public Image getImage(String s) {
try {
URL url = new URL(getCodeBase(), s);
if (url == null) {
System.out.println("Image not in jar");
url = getClass().getResource("/"+s);
}
Image image = null;
try {
image =  ImageIO.read(url);
} catch (Exception e) {
url = getClass().getResource("/"+s);
image = super.getImage(url);
}

// wait for image to load
MediaTracker tracker = new MediaTracker(this);
        tracker.addImage(image, 0);
        tracker.waitForAll();
       
        return image;
} catch (Exception e) {
e.printStackTrace();
/* */
}
return null;
}
this is a fix, except that it looks outside the jar first. Im sure there is a better solution as this is rushed, but this works at least.

1 idea is an optional boolean tag in the paramaters for "custom image" otherwise look in jar.

yet im sure there is a better way
Code: [Select]
getClass().getResource("/"+s); was causing the popup

*

Offline bobjob

  • ****
  • 394
  • LWJGL: WOW SO GOOD
Re: Jre6u19 security popup
« Reply #21 on: August 23, 2010, 16:30:29 »
I think getImage should remove:
getClass().getResource("/"+s);

and should only be called if:
    <param name="al_logo" value="appletlogo.png">
or
    <param name="al_progressbar" value="appletprogress.gif">
is used.

otherwise the line:
 getClass().getResource("/"+s);
should be called.


*

Offline kappa

  • *****
  • 1319
Re: Jre6u19 security popup
« Reply #22 on: August 23, 2010, 16:41:03 »
ah awesome stuff bobjob, looks like you found the cause of the problem.

will test it out tonight.

Re: Jre6u19 security popup
« Reply #23 on: August 23, 2010, 17:07:03 »
Cool, you guys rock! :-D

*

Offline kappa

  • *****
  • 1319
Re: Jre6u19 security popup
« Reply #24 on: August 23, 2010, 18:17:06 »
ok great job everyone, especially bobjob.

oh and thx Mickelukas for finding yet again another bug :)

This problem is now fixed and a patch has been applied to the nightly builds of lwjgl.

Hopefully a LWJGL 2.6 release shouldn't be too far off, since OpenGL 4.1 support was added recently

*

Offline bobjob

  • ****
  • 394
  • LWJGL: WOW SO GOOD
Re: Jre6u19 security popup
« Reply #25 on: August 23, 2010, 18:25:55 »
your welcome, always a good feeling getting a bug fixed.

Re: [FIXED] Jre6u19 security popup
« Reply #26 on: February 03, 2011, 20:44:14 »
Just a quick check regarding the fix.

I'm using the 2.6 files that are used by the applet example and I added the line:
<param name="al_logo" value="pictures/appletlogo.png">

(where picture is a folder on the webserver relative to where the jar file is) and I still get the security window. Is it because the fix isn't in the applet example or because I'm using the parameter wrongly?

Mike

*

Offline kappa

  • *****
  • 1319
Re: [FIXED] Jre6u19 security popup
« Reply #27 on: February 03, 2011, 22:18:07 »
Can you try with the LWJGL nightly build #1042+, there was some tweaking with this area of code recently so might be fixed (for real this time :)).
« Last Edit: February 03, 2011, 22:20:12 by kappa »

Re: [FIXED] Jre6u19 security popup
« Reply #28 on: February 04, 2011, 11:16:45 »
Works like a charm, thanks :)

Mike