Review request for 8139508 Debug option does not work in appletviewer

Alan Bateman Alan.Bateman at
Tue Oct 13 14:00:37 UTC 2015

On 13/10/2015 14:33, Alexander Scherbatiy wrote:
> Hello,
> Could you review the fix:
>   bug:
>   webrev:
>   This is the fix for the appletviewer which can't start the debugger 
> with the jake build.
>   - jdk.jdi module exports to 
> java.desktop module
>   - appletviewer is run with -addmods jdk.jdi option
>   - sun.applet.Main adds a read edge to the jdk.jdi module
I wonder how often appletviewer -debug is used these days. Would anyone 
notice if that option was removed?

The issue with "-addmods jdk.jdi" is that appletviewer won't start on a 
runtime that doesn't have module jdk.jdi (try it with a JRE build for 

If -debug is really needed going forward then possible approaches to 
consider are:

1. A special appletviewer launcher that handles -debug and translates it 
to "-addmods jdk.jdi" by setting the corresponding system property.

2. Change it to "-addmods ALL-SYSTEM". The "ALL-SYSTEM" token doesn't 
exist at this time but there are cases where the initial module is a 
container that launches other applications that might needs have 
dependences of any of the system modules. If appletviewer is running 
random applets then I expect it will need this anyway.

There is a 3rd option, to have the appletviewer launcher not use -m, but 
that only works by accident and I'm sure in time that it will be caught 
as an error.


More information about the jigsaw-dev mailing list