0

I'm using an applet. I want to pass some java arguments to the JVM when browser start the applet but some of arguments were ignored and some don't

Here is my applet tag

<APPLET CODE="com.example.HelloApplet"  archive="HelloApplet.jar" >
<PARAM name="java_arguments" value="-verbose:gc" >
</APPLET>

after running the applet in browser i can see the -verbose:gc in jconsole but if i change the applet tag

<APPLET CODE="com.example.HelloApplet"  archive="HelloApplet.jar" >
<PARAM name="java_arguments" value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=1044" >
</APPLET>

and run the applet again in browser i can't see the value in jconsole... where is the problem? Thanks

Amir
  • 652
  • 9
  • 19
  • Maybe it is a security thing that the applet itself cannot turn on the debugging gateway (some java_arguments are filtered out, that could be one). Maybe you can set these options in a client-side control panel instead. If what you really want to do is attach a debugger to an applet, look at http://stackoverflow.com/questions/15013378/set-default-jvm-parameters-to-be-used-for-applet-launch and http://stackoverflow.com/questions/868111/how-do-you-debug-java-applets?noredirect=1&lq=1 – Thilo Aug 20 '16 at 06:11
  • @GhostCat I am too – Amir Aug 20 '16 at 06:14
  • @Thilo I saw th link, but the problem is i want to use different arguments for different applets, so i can't set the arguments in control panel – Amir Aug 20 '16 at 06:16
  • You want to attach to multiple applets at the same time? I see how setting the debug ports would be difficult... Can they all be run in the same JVM (thus sharing the debugger port)? Maybe you want to rephrase your question to that: "How can I attach a debugger to multiple applets at once?" – Thilo Aug 20 '16 at 06:19
  • yes i have two applets and i want to attach both of them in same time. but if i set debug parameters in control panel the same ports will used. – Amir Aug 20 '16 at 06:28

0 Answers0