Review request for 8139508 Debug option does not work in appletviewer

Alexander Scherbatiy alexandr.scherbatiy at oracle.com
Mon Oct 19 13:33:08 UTC 2015


On 10/13/2015 5:00 PM, Alan Bateman wrote:
>
> On 13/10/2015 14:33, Alexander Scherbatiy wrote:
>>
>> Hello,
>>
>> Could you review the fix:
>>   bug: https://bugs.openjdk.java.net/browse/JDK-8139508
>>   webrev: http://cr.openjdk.java.net/~alexsch/8139508/webrev.00
>>
>>   This is the fix for the appletviewer which can't start the debugger 
>> with the jake build.
>>
>>   - jdk.jdi module exports com.sun.tools.example.debug.tty 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?

    I do not have the full answer for this. At least the appletviewer 
uses the same debugger as jdb and it could be removed together with jdb 
once it becomes  obsolete.
>
> 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 example).
>
> 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.

     Could you review the updated fix: 
http://cr.openjdk.java.net/~alexsch/8139508/webrev.01
     I have built it with the latest jake updates which include 
"-addmods ALL-SYSTEM" option in appletviewer and now it works in the 
same way with JDK and JRE as it works with JDK build which does not 
include modularization feature.

   Thanks,
   Alexandr.
>
> 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.
>
> -Alan
>



More information about the jigsaw-dev mailing list