jdk-tools

Missing Library com.sun.tools.attach

纵然是瞬间 提交于 2021-02-06 08:43:19
问题 I've tried to follow this tutorial, but I have problem with imports. I got: The import com.sun.tools cannot be resolved in line import com.sun.tools.attach.VirtualMachine; I've tried to look for some info on Sun/Oracle website, but I have not found anything helpful. I am developing on JDK 1.6.0_31. 回答1: tools.jar needs to be added to the IDE's library path and the program's classpath. The tools.jar file is found in the JDK's lib directory. For example, if the JDK were installed into C:

Missing Library com.sun.tools.attach

谁说我不能喝 提交于 2021-02-06 08:43:01
问题 I've tried to follow this tutorial, but I have problem with imports. I got: The import com.sun.tools cannot be resolved in line import com.sun.tools.attach.VirtualMachine; I've tried to look for some info on Sun/Oracle website, but I have not found anything helpful. I am developing on JDK 1.6.0_31. 回答1: tools.jar needs to be added to the IDE's library path and the program's classpath. The tools.jar file is found in the JDK's lib directory. For example, if the JDK were installed into C:

How to extract the file jre-9/lib/modules?

[亡魂溺海] 提交于 2019-12-18 11:08:50
问题 In JRE-9/lib directory (at least on Windows), there is a new file called modules whose size is about 107 MB. Is it possible to extract that file or maybe list java modules within it? I can see that a new tool called jmod is available at jdk-9/bin/jmod.exe , but that is for reading .jmod files which is located at jdk-9/jmods and it cannot read the file modules . 回答1: The modules file is a container file. It's internal to the JDK and the format is not documented (it may change at any time). For

Which API does Java's jps tool use internally?

本小妞迷上赌 提交于 2019-12-06 04:48:43
问题 I need to recreate the functionalities of the jps tool programmatically. I need to find out all Java running processes along with their id so I can attach to that process (similar to what JConsole does). I thought the VirtualMachine API would help, but did not get expected result when I run the following public class ProcessList { public static void main(String[] args){ List<VirtualMachineDescriptor> vms = VirtualMachine.list(); for(VirtualMachineDescriptor vm : vms){ System.out.println (vm

How to extract the file jre-9/lib/modules?

荒凉一梦 提交于 2019-11-30 02:01:42
In JRE-9/lib directory (at least on Windows), there is a new file called modules whose size is about 107 MB. Is it possible to extract that file or maybe list java modules within it? I can see that a new tool called jmod is available at jdk-9/bin/jmod.exe , but that is for reading .jmod files which is located at jdk-9/jmods and it cannot read the file modules . The modules file is a container file. It's internal to the JDK and the format is not documented (it may change at any time). For troubleshooting purposes, the jimage tool in the bin directory can be used to list or extract the contents.