开发者

Java Applet - Signing applet class instead of applet jar

I have a java applet which accesses a file on the file system of the client-side. Fo开发者_StackOverflow中文版r that I created a jar for my applet and then signed it and now everything works fine.

Question: Is there any way by which I can sign the applet class itself instead of first creating a jar and then sign it?

The reason why I want to do it:

  • because I am launching my webapp from eclipse itself (on the tomcat inside the Eclipse) and then accessing the applet in an external browser and the web page loads the applet jar and not the applet class so I am unable to debug it.

  • every time I make changes in the applet class, I need to build the jar and then sign it and then re-pulish the app to the tomcat server for the changes to be reflected. This itself takes a lot of time.


You certainly can debug an applet launched in an external browser in eclipse.

In your applet control panel, in the java tab, under runtime environment parameters

add

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888

(where you can pick whatever address you like)

then in eclipse create a new debug configuration, that is remote java application and enter the port (8888) as entered above.

When the applet is running, start the debug session.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜