Comments (12)
sjk is looking for file lib/tools.jar
relative to your JDK directory. tools.jar
is required to do all JVM discovery and attachment magic.
from jvm-tools.
thans for your reply.Maybe it's about version.When i upgrade jdk8 to 9,it work well.
from jvm-tools.
jdk9 doesn't include tools.jar, it includes required classes as part of standard runtime
from jvm-tools.
$ java -jar sjk-0.12-SNAPSHOT.jar ttop -p 6344 -n 20 -o CPU
Java home points to C:\Program Files\Java\jre1.8.0_181 make sure it is not a JRE path
Failed to add tools.jar to classpath
java.lang.ClassNotFoundException: com.sun.tools.attach.VirtualMachine
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at org.gridkit.lab.jvm.attach.AttachAPI.<clinit>(AttachAPI.java:45)
at org.gridkit.lab.jvm.attach.AttachManager.<clinit>(AttachManager.java:73)
at org.gridkit.jvmtool.JmxConnectionInfo.getMServer(JmxConnectionInfo.java:78)
at org.gridkit.jvmtool.cmd.ThreadTopCmd$TTop.run(ThreadTopCmd.java:92)
at org.gridkit.jvmtool.cli.CommandLauncher.start(CommandLauncher.java:133)
at org.gridkit.jvmtool.SJK.main(SJK.java:11)
java.lang.NoClassDefFoundError: com/sun/tools/attach/VirtualMachine
at org.gridkit.lab.jvm.attach.AttachManager$AttachManagerInt.getVmList(AttachManager.java:166)
at org.gridkit.lab.jvm.attach.AttachManager$AttachManagerInt.getProcesssName(AttachManager.java:155)
at org.gridkit.lab.jvm.attach.AttachManager$AttachManagerInt.internalGetDetails(AttachManager.java:150)
at org.gridkit.lab.jvm.attach.AttachManager.getDetails(AttachManager.java:95)
at org.gridkit.jvmtool.JmxConnectionInfo.getMServer(JmxConnectionInfo.java:78)
at org.gridkit.jvmtool.cmd.ThreadTopCmd$TTop.run(ThreadTopCmd.java:92)
at org.gridkit.jvmtool.cli.CommandLauncher.start(CommandLauncher.java:133)
at org.gridkit.jvmtool.SJK.main(SJK.java:11)
Caused by: java.lang.ClassNotFoundException: com.sun.tools.attach.VirtualMachine
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 8 more
I am sure I had correct set the JAVA home, and the path is C:\Program Files\Java\jdk1.8.0_181
, how can I get this error message? Please help.
from jvm-tools.
Try where java
(which
on Linux). tools.jar
is searched relative to java
binary (not JAVA_HOME variable).
from jvm-tools.
Try
where java
(which
on Linux).tools.jar
is searched relative tojava
binary (not JAVA_HOME variable
I can successful run above cmd 'java -jar sjk-0.12-SNAPSHOT.jar ttop -p 6344 -n 20 -o CPU' in a Linux server, while failed in Windows server(using git-cmd to execute the cmd). And I am happy pass to install the JDK1.8, not sure what happened.
from jvm-tools.
Your PATH variable should point JDK/bin not JRE/bin
from jvm-tools.
I am also confuse why it print my Java home to a JRE path? Not make sense.
BTW, the guy @941112341 changed to JAVA9 to avoid this.
from jvm-tools.
please execute where java
from jvm-tools.
from jvm-tools.
I see it point to jdk1.7, not 1.8
from jvm-tools.
where java
should report java.exe from JDK on first line (ideally it should report single line)
from jvm-tools.
Related Issues (20)
- Ansible role (if anybody need it)
- Bundle.properties in the right folder?
- ttop not working HOT 1
- Heap Interface ThreadSafe? HOT 1
- can we have something similar to jvmtop? HOT 1
- cpu profiling accuracy HOT 1
- retained size of objects issue HOT 6
- java.rmi.UnmarshalException: error unmarshalling return HOT 3
- sjk cannot connect to MBean server with adopt openjdk 11 HOT 1
- Does SSA use asyncgetcalltrace or JVMTI getCallTrace to walkthrough Java stack trace HOT 2
- Add more security to MXPR HOT 5
- Inconsistent library versions notice.
- Unable to parse visualvm nps generated by visualvm 2.0.1 HOT 4
- Inconsistent indentation style HOT 1
- In mx command, get multiple attributes HOT 1
- Vulnerable Dependency: jcommander 1.30
- 使用./coat 命令执行*.sh文件中文乱码
- Wrong usage of Java home HOT 1
- Downloads ask for username/password HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jvm-tools.