Questions tagged as 'jvm'

2
answers

How does the G1 (Garbage First Collector) work?

In the JEP-248 discussion of the G1 definition ( Garbage First Collector as the default Garbage Collector on Java 9 . In this period, I've been hearing a lot of G1 quotes, but very little material has deeper details or comparisons, for examp...
asked by 25.07.2015 / 05:00
2
answers

Java memory heap

I would like to explain in a simple way what is the heap of JVM memory? I researched Google but had no clear enough answer.     
asked by 13.10.2014 / 19:29
3
answers

Why calling System.gc does not guarantee execution of the garbage collector?

Why does not the developer have full control over the garbage collector ? I understand that the role of GC is to automatically manage memory but why even using some method like System.gc is there no guarantee that the GC will run?   ...
asked by 22.12.2015 / 05:23
1
answer

What does "Run in the JVM" mean?

Languages like Scala, Kotlin, Clojure and others "run on the JVM". What does this mean? What does the JVM provide for them? How much are "dependent" on the JVM? Do they only run on the JVM? Do these languages generate a ....
asked by 08.08.2017 / 02:16
1
answer

Difference between method and constructor?

Reading the notes of a friend I came across the following statement: "method does not allocate space in memory". Is this statement correct? Maybe it's not the main difference between them, but it's true to say that constructors allocate space...
asked by 18.12.2015 / 17:20
4
answers

How many strings are created in the codes below?

How many String s does the JVM actually create during the runtime of the code snippets below? 1 : String s1 = "s1"; 2 : String s2 = new String("s2"); 3 : String s3 = "s3"; String s4 = s3 + "s4"; 4 : String s5 = "s5...
asked by 21.02.2017 / 18:17
1
answer

What is GraalVM?

What is it different from the JVM? And why did they create it? What advantage to using it? Can you use it in mobile? Is Oracle official? Ready for use? Do you have any restrictions?     
asked by 28.08.2018 / 16:39
2
answers

What makes an object eligible to be allocated on the stack?

Link to the article: link   "The programming language (Java) does not offer the possibility to let the programmer decide if an object should be generated in the stack.   But in certain cases it would be desirable to allocate an object on   ...
asked by 04.04.2016 / 23:27
1
answer

How to Run JavaScript on the Java 8 Nashorn Engine Programmatically

From Java 8 we have a new Engine for running JavaScript, this is Nashorn. What Java SE platform classes are involved in engine discovery and scripting? How to execute JavaScript through the Java classes themselves in this new interpreter?...
asked by 26.06.2015 / 16:16
1
answer

Message "Could not reserve enough space for object heap" in the JVM

So I wanted to know what the limitation is for memory allocation to the JVM depending on the operating system and processor architecture. If you configure it, lower the maximum value of the perm-size to a lower value, can you further increase th...
asked by 25.08.2014 / 19:30