天道酬勤,学无止境

jvm

JMap.java - Timed out while attempting to connect to debug server - SwDbgSrv.exe

I'm trying to run and debug the utilies from sun.jvm.hotspot.tools and sun.jvm.hotspot.utilities (like JMap.java) in order to understand better what is going on. Unfortunately I get stuck very early with the following error message and don't even get to debug a lot: Attaching to process ID 5144, please wait... Error attaching to process: Timed out while attempting to connect to debug server (please start SwDbgSrv.exe) It seems like for whatever reason the tools are trying to connect to a "debug server" running on port 27000. In the doc of the sun.jvm.hotspot.tools.HeapDumer.java I found the

2022-01-18 21:48:34    分类:问答    java   jvm   jvm-hotspot   heap-dump   jmap

how many java virtual machine extst on computer [duplicate]

This question already has answers here: what java virtual machine will do while executing multiple java applications (3 answers) Closed 8 years ago. I don't understand how many jvm exist on my computer. One or more? For example. I open eclipse, jboss and another java program. How many jvm exist in my computer? 3 or 1?

2022-01-18 18:15:58    分类:问答    java   jvm

JVM issues with a large in-memory object

I have a binary that contains a list of short strings which is loaded on startup and stored in memory as a map from string to protobuf (that contains the string..). (Not ideal, but hard to change that design due to legacy issues) Recently that list has grown from ~2M to ~20M entries causing it to fail when constructing the map. First I got OutOfMemoryError: Java heap space. When I increased the heap size using the xms and xmx we ran into GC overhead limit exceeded. Runs on a Linux 64-bit machine with 15GB available memory and the following JVM args (I increased the RAM 10G->15G and the heap

2022-01-18 12:51:43    分类:问答    java   jvm   out-of-memory   heap-memory

How long does the JVM allow shutdown hooks to run before calling halt?

Follow up from previous question If you've read the previous question an alternative title may be: How often should my daemon check to see if it's been interrupted?

2022-01-18 11:29:54    分类:问答    java   multithreading   jvm   shutdown-hook

Eclipse cannot find javaw.exe

When i start eclipse i get this problem: The location of javaw.exe in my computer is C:\Program Files\Java\jre7\bin. I have tried change the path environment variable then i get different error like:

2022-01-18 11:15:14    分类:问答    java   eclipse   jvm

Are the two JVM instances making confusion to remotely debug

To remotely debug my application running in tomcat7 over ubuntu server I set the following variables; export CATALINA_HOME=/usr/share/tomcat7 export CATALINA_BASE=/var/lib/tomcat7/ export JPDA_ADDRESS=8090 export JRE_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64 then I went to tomcat home folder /usr/share/tomcat7/bin and write the following line to run tomcat in debug mode. \#./catalina.sh jpda start then I try to remotely connect, I got Connection Refused. I checked with netstat -ln both 80 and 8090 ports were listening, then I stop tomcat using service tomcat7 stop , then my 80 port stops

2022-01-17 23:33:00    分类:问答    java   linux   eclipse   tomcat   jvm

Putting JVM arguments in a file to be picked up at runtime

I'm building a jar of my current application, which required several JVM arguments to be set. Is there a way of setting these JVM arguments in a file rather than on the command line? I've done some hunting and it looks like I might be able to do something witha java.properties file, possibly by setting a java-args, but I can't find any reference to the format for doing this. Am I barking up the wrong tree? Is this possible and if so how? If not is there some other way to specify the JVM arguments?

2022-01-17 11:21:40    分类:问答    java   jvm   jvm-arguments

What performance benefits does Oracle's commercial Hotspot JVM have over OpenJDK?

As described in this question: OpenJDK vs Java HotspotVM Oracle's commercial Hotspot JVM is essentially OpenJDK, plus several commercial-client-only features. But - do these extra features actually contribute to performance on single machines and/or small clusters, with consumer-off-the-shelf hardware only? Or are they only relevant to large corporations with certain organizational needs and huge systems with custom hardware? I'm specifically asking about "Java Flight Recorder, Application Class Data Sharing and Cooperative Memory Management" mentioned as the main commercial features in the

2022-01-17 04:58:02    分类:问答    java   jvm   jvm-hotspot

How to list (java) annotations on Kotlin data class fields?

I am using Firestore's Java-based annotation for marking fields and methods for mapping document fields to Java class elements: @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD, ElementType.FIELD}) public @interface PropertyName { String value(); } I am using it on a field in a Kotlin data class, which compiles fine: data class MyDataClass( @PropertyName("z") val x: Int ) In IntelliJ and Android Studio, I can see it show up in the decompiled class dump: public final data class MyDataClass public constructor(x: kotlin.Int) { @field:com.google.cloud.firestore.annotation

2022-01-17 01:46:03    分类:问答    reflection   kotlin   annotations   jvm

Why do Java class file versions start from 45?

According to the JVM specification: Oracle's Java Virtual Machine implementation in JDK release 1.0.2 supports class file format versions 45.0 through 45.3 inclusive. JDK releases 1.1.* support class file format versions in the range 45.0 through 45.65535 inclusive. For k ≥ 2, JDK release 1.k supports class file format versions in the range 45.0 through 44+k.0 inclusive. https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-4.html I'm wondering, why did they start versioning from 45 and not, say, from 1 or 0?

2022-01-16 14:32:08    分类:问答    java   jvm