2013-01-13 3 views
3

나는 Java Swing GUI를 만들었고 웹 사이트에 올려 놓으 려하고있다. lwjgl_jar 폴더에 html 파일을 넣었고 그걸 풀어서 AppletLoader를 찾을 수 없다는 것에 대해 my previous problem하지만 지금은 새로운 오류가 발생했습니다 :내 Jar 파일에 서명하기

Permissions for Applet Refused. Please accept the permissions dialogue to allow the applet to continue the loading process. 

"이번에 실행"으로 오류 메시지가 나타납니다. 그래서 나는 온라인으로 검색했고 내 문제에 대한 해결책은 내 jar 파일에 서명되지 않았다는 것을 알았습니다. Slick과 lwjgl 파일을 사용하고 있다는 것을 고려하면 이상합니다. 내 서명이 있어야하는 racegame.jar이 있습니다. 애플릿은 서명을해야 할 수도 있습니다, 그래서 this guide to signing jars 다음 :

을하고 마지막 단계에 도착하고 입력 : jarsigner -keystore myKeystore racegame.jar myself 내 racegame.jar에 서명 만이 말했다 :

jarsigner: unable to open jar file: racegame.jar 

이 오류는 또한 다른 병 발생 파일로 시도해보십시오.

jar 파일을 열고 서명하지 않는 이유는 무엇입니까? 다른 모든 단계는 가이드에 표시된 위치와 정확히 동일하게 테스트되고 테스트되었습니다.

+0

http://docs.oracle.com/javase/1.4.2/docs/tooldocs/windows/jarsigner.html 그냥 비교하십시오. – vels4j

+0

이 [document] (http://gagandeepbali.uk.to/gaganisonline/swing/downloads/signJARfiles.txt)를 살펴보십시오. 도움이 될만한 자료가있을 수 있습니다. 내 컴퓨터가 작동 중일 때만 링크가 활성화됩니다 (ON 상태). –

+0

Gagandeep에게 감사드립니다. 내 문제를 해결하는 데 도움이되었으므로 내 질문에 대답하여 답변을 선택할 수있게하십시오. –

답변

1

예전에 How to sign the JAR Files에 관한이 기사를 인터넷에서 발견했는데, 어떤 내용으로 인해 도움이 될 수 있습니다. 보십시오 :

Sign All Applet JAR files 

Applets are back! And now applets can do more than ever before thanks to 
signed JAR files. By signing your JARs, you can get access to the filesystem 
and other resources that were previously off-limits, provided the user 
grants your applet those privileges. And signing JAR files is now very easy 
thanks to tools bundled with the JDK. However, be certain to sign all JAR files 
used by your Java applet. If you sign the JAR file with your main applet class, 
your applet will launch. If it later uses classes from another JAR file, though, 
you can run into trouble. If the newly-loaded class tries a restricted operation 
and its JAR file isn't signed, your applet will fail at that point with a 
security exception. Rather than waiting for this and debugging it when it occurs, 
save yourself the trouble and sign all of your JAR files up front. 

You can create your own certificate using tools provided by the JDK. 
keytool -genkey -alias mykey lets you create your own certificate. Be sure to 
specify an expiration date far in the future with -validity 1000. The default is 
only 6 months. 

Sign your JAR files with jarsigner my.jar mykey (where my.jar is the name of 
the jar file to sign). 

Deploy all of your JAR files to a folder on your web server, add an HTML page 
with the applet tag, and let the world enjoy your new applet with powerful 
permissions. 

keytool -genkey -v -key store mycompany.keystore -alias myalias_goes_here -keyalg RSA -keysize 2048 -validity 10000 
관련 문제