Latest Questions tagged Jvm

Browse all latest questions tagged Jvm

Published 26 Oct, 2022
Java - Is java byte-code always forward compatible?

I understand that the byte code generated by version JDK X is guaranteed to work on JVM Y, provided Y >= X. Does this hold good for all versions of JDK/JVM? i.e Is it fair to expect class files gener...

Published 19 Sep, 2022
Java - JVM getObjectSize example

I have some trouble on getting the size of an object in JVM. JDK 5 offer an interface Instrumentation to calculate through premain() function, but I do not know how to use it. Can anybody help me?

Published 06 Sep, 2022
Java - Kubernetes Pod memory usage does not fall when jvm runs garbage collection

I'm struggling to understand why my Java application is slowly consuming all memory available to the pod causing Kubernetes to mark the pod as out of memory. The JVM (OpenJDK 8) is started with the fo...

Published 07 Sep, 2022
Java - Definition of Java's CMS GC log lines?

Examining a Java runtime with CMS (Concurrent-Mark-Sweep) GC enabled, what is the definition of the CMS space in the logs below? Shall I assume it is the tenured space? I see the following lines of...

Published 02 Aug, 2022
Python - Steps to reduce time delay due to GC allocation failure in azure databricks

I'm executing a print "Hello World" Job in azure databricks python notebook on a spark cluster. Every time the Job is run it takes more than 12 seconds to execute which is expected to take less than 1...

Published 05 Sep, 2022
Java - Increase heap size in java for weka

I'm trying to increase the heap size in java for weka which keeps crashing. I used the suggested line: > java -Xmx500m -classpath but I get the following error: -classpath requires class path...

Published 20 Aug, 2022
Java - Error: Could not find or load main class –Xmx1G

This is crazy; has anyone ever seen this before? java –Xmx1G –Xms1G –XX:+UseG1GC -XX:+PerfDisableSharedMem -jar service-1.0-SNAPSHOT.jar Error: Could not find or load main class –Xmx1G I can do thi...

Published 14 Sep, 2022
Java - Heap size is greater than -Xmx

I set the initial and maximum Java heap size to 256MB using -Xms256m and -Xmx256m JVM options. The GC log (using -XX:+PrintHeapAtGC) states that the heap size is 251904K (246MB), which is smaller than...

Published 18 Aug, 2022
Java - How does string interning work in Java 7+?

So, I realize the questions I'm about to ask relate to a topic that has been beaten to death time and time again, however, even after reading all of the answers and documentation I could find, I'm sti...

Published 16 Apr, 2022
Javascript - Why the JVM cannot be used in place of WebAssembly?

As far as I understood, JavaScript cannot be compiled ahead of time because of it's dynamic nature. So Interpretation and just in time compilation happens at run time, that affects JavaScript performa...

Published 05 Sep, 2022
Java - Is the Java Heap Memory contiguous?

I've seen people comment about Java Heap memory being contiguous and people say the contrary. Well, can someone give me a final answer and explain this question? Also, is there some kind of data struc...

Published 05 Sep, 2022
Java - How can I access Java heap objects without a reference?

I would like to get a reference to all objects in the Java heap, even if I don't immediately have a reference to those objects in my active thread. I don't need non-referenced objects (those "queued"...

Published 01 Sep, 2022
Java - Re launch JVM with bigger heap space

I want to be able to execute the .Jar file, and if the heap space isn't set big enough, it should launch a new JVM with the same .Jar file, but set with a bigger heap space, and then close the first J...

Published 27 Aug, 2022
Java - JFrame.dispose() vs System.exit()

What is the difference between these two methods - System.exit() and JFrame.dispose()? If we want to close a Java Swing application when a button is clicked, which method should I use?

Published 20 Aug, 2022
Java - CATALINA_OPTS vs JAVA_OPTS - What is the difference?

I was trying to find out the difference between Apache Tomcat variables - CATALINA_OPTS and JAVA_OPTS in SO and surprised to see that there is no question/answer posted here yet. So I thought of shar...