質問

このトピックは1つの形式で覆われていますが、他のスレッドのどれも助けを助けることができませんでした。私の問題はこの投稿と非常によく似ています、私は機能を追加したJungグラフを作りましたが、どれでも役に立ちました:

JAPPLETはHTMLページで実行されません

私はJappletに変換されたJavaアプリケーションを持っていました。 JappletはEclipseのアプレットビューアでうまく機能しますが、Webページで開くとうまくいきません(IE、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>
.

code="bptester.class"をjava.lang.ClassNotFoundException:bptester.class:code="prerna.blueprint.main.bptester.class"を使用している場合は、何もないエラーを与えない起こる。 (Prerna / Blueprint / Main / Bptester.classは、My SRCフォルダのファイルパスです)。私のJavaプロジェクトをRunnable Jarファイルとしてエクスポートしましたが、これは正しいですか?私はすべて同じ手順をしたときにうまく機能した単純なJappletを作成しましたが、BPTERTER.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