Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Okay, so I am working on a card matching game in java for my computer science assignment and it all was going perfectly, until I wanted to open the applet in a page. In eclipse it works just fine..

I open the page and I get the error "Security Exception. Your Security settings have blocked your application." I didn't use to get this before I updated to the new java version. I uploaded the app on a site, in case anyone wanted to check out if they got any errors, but surprise! It works just fine when on a site.

http://sergius.webatu.com/game.html -> works as I except it to. but if I just open the file game.html with all the files in its folder, it just gets blocked and won't start. I didn't block it or anything.

The thing is, I won't have access to the internet, so I can't tell them "hey go to that site, it only works there!"

Notes: Ignore the Romanian mambo jumbo. It asks for a name when it starts.

Using: Java Plug-in 10.21.2.11 Using JRE version 1.7.0_21-b11 Java HotSpot(TM) Client VM

share|improve this question
add comment

1 Answer 1

you probably need to sign your jar file. Signed jars execute with higher privileges by default than unsigned ones. when the software is running on the desktop it uses the local users privledges and can write to files, but when placed on a site, fail to do much of anything on the local system. since you said you were executing via eclipse, it sounds like your code has been changed and the original signature is no longer valid.

http://docs.oracle.com/javase/tutorial/deployment/jar/signing.html

share|improve this answer
    
That´s the problem! When I run it on desktop, it won´t work. It works on the site or in eclipse :D I will look more into jar signing, although I am not sure what that even means! xD –  Ssurge Apr 23 '13 at 20:55
    
signing an executable just means that you apply a cryptographic signature to the file that certifies that it was signed by a specific person, and that the contents of the file have not changed since that signing took place. when MS signs an executable, if someone were to tamper with that exe the signature validation would fail and you would know that the exe is not from MS. –  Frank Thomas Apr 24 '13 at 11:36
    
I still have no idea how to do anything. I looked up signing, but yeah, no idea. My file is a .class file...How do I sign it? –  Ssurge Apr 25 '13 at 17:29
    
in eclipse, you can export your project as a .jar. it also provides a wizard for helping you sign the package. –  Frank Thomas Apr 25 '13 at 19:57
    
heres a video tutorial for exporting a jar from eclipse: youtube.com/watch?v=RbhJ9sTMTD8 –  Frank Thomas Apr 25 '13 at 20:21
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.