I am making some revisions from the lecture slides and it says a constructor is executed in the following way: If the constructor starts with this, recursively execute the indicated constructor, then go to step 4. Invoke the explicitly or implicitly indicated superclass constructor (unless this class is java.lang.Object). Initialise the fields of the object in the order in which
Tag: jvm
Java – Get a list of all Classes loaded in the JVM
I would like to get a list of all the classes belonging to a certain package as well as all of their children. The classes may or may not be already loaded in the JVM. Answer Well, what I did was simply listing all the files in the classpath. It may not be a glorious solution, but it works reliably
Java heap terminology: young, old and permanent generations?
I’m trying to understand What the concepts of young, old and permanent generations are in the Java heap terminology, and more specifically the interactions between the three generations. My questions are: What is the young generation? What is the old generation? What is the permanent generation? How does the three generations interact/relate to each other? Answer This seems like a
How can I tell if I’m running in 64-bit JVM or 32-bit JVM (from within a program)?
How can I tell if the JVM in which my application runs is 32 bit or 64-bit? Specifically, what functions or properties I can used to detect this within the program? Answer You retrieve the system property that marks the bitness of this JVM with: Possible results are: “32” – 32-bit JVM “64” – 64-bit JVM “unknown” – Unknown JVM
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 a minor-major-minor GC event In particular the [CMS: 10899K->9379K(12448K), 0.2675281 secs] at the 23.492 event. Does this display the tenured space just labeled as CMS?
Is *this* really the best way to start a second JVM from Java code?
This is a followup to my own previous question and I’m kind of embarassed to ask this… But anyway: how would you start a second JVM from a standalone Java program in a system-independent way? And without relying on for instance an env variable like JAVA_HOME as that might point to a different JRE than the one that is currently
What are Reified Generics? How do they solve Type Erasure problems and why can’t they be added without major changes?
I’ve read Neal Gafter’s blog on the subject and am still unclear on a number of points. Why is it not possible to create implementations of the Collections API that preserve type information given the current state of Java, the JVM and existing collections API? Couldn’t these replace the existing implementations in a future version of Java in a way