JDK-8160881 : Remove jvisualvm from JDK9
  • Type: Bug
  • Component: tools
  • Sub-Component: visualvm
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2016-07-06
  • Updated: 2022-11-14
  • Resolved: 2017-01-22
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 9
10Fixed 9 b154Fixed
Related Reports
Duplicate :  
Relates :  
Sub Tasks
JDK-8180002 :  
Description
jvisualvm won't launch for me on JDK 9. I've tried on linux and solaris. Tried JDK 9 b118 and b125.

I get the jvisualvm spash screen and the process then exits. If I run with --help flag I see this output to terminal : 

scoffey@scoffey-Latitude-E6420:~$ ./jdk-9/bin/jvisualvm --help
Usage: /home/scoffey/jdk-9/lib/visualvm/platform/lib/nbexec {options} arguments

General options:
  --help                show this help
  --jdkhome <path>      path to Java(TM) 2 SDK, Standard Edition
  -J<jvm_option>        pass <jvm_option> to JVM

  --cp:p <classpath>    prepend <classpath> to classpath
  --cp:a <classpath>    append <classpath> to classpath
Exception in thread "main" java.lang.SecurityException: setContextClassLoader
	at jdk.internal.misc.InnocuousThread.setContextClassLoader(java.base@9-ea/InnocuousThread.java:104)
	at org.netbeans.ModuleManager.updateContextClassLoaders(ModuleManager.java:430)
	at org.netbeans.ModuleManager.<init>(ModuleManager.java:125)
	at org.netbeans.core.startup.ModuleSystem.<init>(ModuleSystem.java:70)
	at org.netbeans.core.startup.ModuleSystem.<init>(ModuleSystem.java:64)
	at org.netbeans.core.startup.CLICoreBridge.usage(CLICoreBridge.java:68)
	at org.netbeans.CLIHandler.showHelp(CLIHandler.java:123)
	at org.netbeans.CLIHandler.checkHelp(CLIHandler.java:177)
	at org.netbeans.CLIHandler.initialize(CLIHandler.java:529)
	at org.netbeans.CLIHandler.initialize(CLIHandler.java:345)
	at org.netbeans.MainImpl.execute(MainImpl.java:154)
	at org.netbeans.MainImpl.main(MainImpl.java:46)
	at org.netbeans.Main.main(Main.java:39)

Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/57ef255b367b User: lana Date: 2017-01-25 21:47:12 +0000
25-01-2017

URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/57ef255b367b User: henryjen Date: 2017-01-22 14:45:44 +0000
22-01-2017

To my understanding the fix is to remove jvisualvm from jdk9.
13-01-2017

May not be relevant anymore considering https://blogs.oracle.com/java-platform-group/entry/visual_vm_in_jdk_9
05-12-2016

VisualVM 1.3.9 with JDK 9 support was just released at https://visualvm.github.io .
07-10-2016

There is a lot of incompatibilities in JDK 9. We are working on new version of VisualVM, which will work with JDK 9.
19-07-2016

could be related to https://netbeans.org/bugzilla/show_bug.cgi?id=258808
14-07-2016