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: 2017-05-17
  • 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 :  
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)

To my understanding the fix is to remove jvisualvm from jdk9.

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

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

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

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