문제

이 주제는 한 형태 또는 다른 형태로 덮여 있지만 다른 스레드는 도움이 될 수 없었습니다. 내 문제는이 게시물과 매우 유사합니다. 기능이 추가 된 Jung Graph를 만들고 있지만 솔루션 중 어느 것도 도움이되지 않았습니다.

HTML 페이지에서 실행되지 않습니다

Japplet로 변환 된 Java 응용 프로그램이있었습니다. JAPPLET은 Eclipse의 애플릿 뷰어에서 잘 작동하지만 웹 페이지에서 열려고 할 때 작동하지 않을 것입니다 (즉, Firefox 및 Chrome를 시도했습니다). 내 HTML 페이지와 동일한 디렉토리에 모두 아카이브 폴더가 있습니다. HTML 페이지를로드하면 아무 것도 없을 것입니다.

여기에 내 HTML 코드가 있습니다 :

<html>
<title>Applet</title>
<head>

</head>
<body>

<applet code="prerna.blueprint.main.BPTester.class" 
        archive="applet1.jar"
        width="800" height="800">
</applet>

</body>
</html>
.

코드="bptester.class"를 사용하려고 할 때 java.lang.ClassNotFoundException : bptester.class.class를 사용하지만 코드="prerna.blueprint.main.bptester.class"를 사용하면 오류가 없습니다. 일어난다. (PRRERNA / BLUENPRINT / MAIN / BPTESTER.CLASS가 내 SRC 폴더의 파일 경로입니다). Java 프로젝트를 실행 가능한 JAR 파일로 내 보냅니다. 나는 같은 단계를 모두 똑같이했을 때 괜찮은 간단한 japplet을 만들었지 만 bptester.class에서는 작동하지 않습니다.

bptester.class 코드를 게시 해야하는 경우 가능합니다.

웹 페이지에서 JAPPLET을 볼 수없는 이유를 이해하지 못하면 도움이 크게 감사드립니다.

도움이 되었습니까?

해결책

What ended up working for me was adding every single jar I used in the japplet to the HTML archive tag then had to sign every jar. I then had an issue with accessing my database within the applet1.jar so I just put an absolute path for its location.

다른 팁

java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)

The applet needs to be digitally signed (by you) and trusted (by the end user, when prompted) before it can obtain such information. Given this applet is being deployed using a traditional applet element (i.e. not using web start), all jars need to be signed.

You need to sign every jar. You can sign all the jars with the jarsigner utility. Example:

jarsigner.exe "nameofthejar.jar" "alias"

Remove .class from the end. You either use a file path with slashes and .class at the end or you only use periods and no .class at the end.

Try turning on tracing in the java control panel. It will then produce a log file in the following path that may help: %USERPROFILE%\AppData\LocalLow\sun\java\Deployment\log

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top