Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Java Sec. Levels and Running my .Jar File


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Malabyte   Members   -  Reputation: 589

Like
0Likes
Like

Posted 03 August 2013 - 10:40 AM

Hey, I got this weird problem with trying to run the Applets that I created. In short I'm simply unable to run them.

 

I have created a working Java code and an HTML page that runs the Applet "window" without problems. But I got a problem getting blocked by Javas security level (High). I then proceed to set this to Medium (in the Java Control Panel) but, the minute I restart the Applet, I keep getting blocked. When I revisit the Java Control Panel, I notice that the security level has been reset to High. In effect, I not only seem unable to change my security level, but I would also like to know how I can run my Applet even if the security level is high.

 

____________________

 

Application Blocked by Security Settings

 

Name: net.malabyte.MinefrontApplet

 

Location: file:/C:/Malabyte/Games/

 

Your security settings have blocked a local application from running

____________________

 

 

What's going on? My HTML and Java code has been copied verbatim with zero errors off of TheCherno on Youtube (from his serious on 3D Game Programming) and he's got no issues with it himself. I also have a direct .Jar file compiled and it runs without problems. I run Win7 and got Java 1.7.0_15-b03.

 

Thanks in advance.


Edited by Malabyte, 03 August 2013 - 10:52 AM.

- Awl you're base are belong me! -

- I don't know, I'm just a noob -


Sponsor:

#2 Bracket   Members   -  Reputation: 240

Like
0Likes
Like

Posted 03 August 2013 - 11:00 AM

I've run into similar situations before, mostly when writing a file upload tool for a client (it ran as an applet that collected vast quantities of images from photographers, did post-processing on them, and uploaded them to the customer's content manager). Any time I tried to use anything more than simple writing to the screen (such as accessing sockets for the upload), my applet was blocked.
I found two solutions, both of which were needed for reliable functionality:

  • Make sure that the browser's Java plugin is up-to-date.
  • Digitally sign your applet.

You can use a self-generated cert at no cost; users will see a "this application was signed by <your name>, trust it?" type prompt when it runs, but until you're ready for a public release that's fine. There's a decent tutorial on the signing process here: http://www-personal.umich.edu/~lsiden/tutorials/signed-applet/signed-applet.html

 

I'd recommend putting the signing process into your build-chain. I use NetBeans (which in turn uses ant), so it was relatively painless to do so for me - and it's a lot easier to build and sign in one click!



#3 Malabyte   Members   -  Reputation: 589

Like
0Likes
Like

Posted 03 August 2013 - 11:13 AM

Alright, thanks for the tips. I'll look into it. :D


- Awl you're base are belong me! -

- I don't know, I'm just a noob -





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS