Most voted "jvm" questions
This tag should be used when the question refers to some resource, information or problem related to the JAVA virtual machine. The JAVA Virtual Machine - JVM - allows a set of software programs and data structures, use a virtual machine model for the execution of other computer programs and scripts, a program that loads and runs the Java applications, converting bytecodes into machine executable code.
Learn more…43 questions
Sort by count of
-
39
votes2
answers1301
viewsHow does the G1 (Garbage First Collector) work?
In the JEP-248 the definition of G1 has been discussed (Garbage First Collector) as the standard Garbage Collector on Java 9. In this period, I have heard many quotes about the G1, but very little…
java performance memory-management jvm garbage-collectorasked 9 years, 4 months ago Reginaldo Soares 2,256 -
18
votes3
answers1132
viewsWhen to use finalizers and garbage collection in Java?
When to use the methods System.gc() and finalize()? I read that it is very useful in object orientation to destroy memory objects that are not being referenced and to finish tasks, but I see few…
-
17
votes2
answers6315
viewsHeap of Java memory
I would like a simple explanation of what heap memory of JVM? I searched on Google but had no clear enough answer.
-
17
votes3
answers959
viewsWhy does calling System.gc not guarantee running the Garbage Collector?
Why the developer does not have full control over the Garbage Collector? I understand that the role of GC is to automatically manage the memory but why even using some method like the System.gc…
-
16
votes2
answers418
viewsHow does a Java Virtual Machine written in Java work?
Seeing the Jikes RVM I was curious to know how this works (in theory), but only found material in English. I am correct in assuming that the JVM today is done in C/C++, which in turn is done in…
-
13
votes1
answer265
viewsWhat does "Run on the JVM" mean?
Languages such as Scala, Kotlin, Clojure and others "run on JVM". What does that mean? What the JVM provides for them? The extent to which they are "dependent" on the JVM? They only run on the JVM?…
-
11
votes1
answer118
viewsWhat are "bridge" methods in Java?
I recently had a problem with methods bridge, what occasional in an excellent answer by Victor Stafusa. But now I realize I don’t know why that method bridge have been created, nor what it means to…
-
9
votes3
answers977
viewsHow to know the size of an object in memory?
I’m not after a method/operator sizeof because I already understand that JAVA doesn’t have it, but I need some way to measure at least on average how much memory an object spends, even if it is…
-
8
votes2
answers168
viewsWhat makes an object eligible to be allocated in the stack?
Article link: http://www.vogella.com/tutorials/JavaPerformance/article.html#Escape%20Analysis "The Programming language(Java) does not Offer the possibility to Let the Programmer decides if an…
-
8
votes4
answers220
viewsHow many Strings are created in the codes below?
How many Strings the JVM actually creates during the execution time of the code snippets below? 1: String s1 = "s1"; 2: String s2 = new String("s2"); 3: String s3 = "s3"; String s4 = s3 + "s4"; 4:…
-
8
votes1
answer446
viewsWhat is the Graalvm?
What is it different from JVM? And why did you create it? What is the advantage of using it? Can use on mobile? Are you an official of Oracle? Are you ready to use? Do you have any restrictions?…
-
7
votes2
answers1375
viewsWhat’s the difference between On heap and Off Heap in Java - JVM Memory
I would like an explanation determining the characteristics of On heap and Off heap Memory in Java. We know that Thread Stacks, the code of our application and the Buffers NIO are all allocated Off…
-
6
votes1
answer1924
viewsMessage "Could not reserve enough space for Object heap" in JVM
So I wanted to know the limitation for memory allocation to the JVM depending on the operating system and processor architecture. If, as you set it, you lower the maximum value of the perm-size to a…
-
6
votes1
answer361
viewsHow to Run Javascript in Java 8’s Nashorn Engine Programmatically
From Java 8 we have a new engine for Javascript execution, this is Nashorn. Which Java SE platform classes are involved in engine discovery and script execution? How to run Javascript through the…
-
6
votes1
answer64
viewsHow does the creation of a proxy work under the table?
I’ve had a lot of fun creating interface proxies in Java. For example, the following proxy was required on Sqldroid to run version 5.2.4 of Flyway (and also to catch the path of the file created by…
-
5
votes1
answer608
viewsJVM. What is the difference between Metaspace and permgen?
What is the difference between Metaspace and permgen? I’ve been trying for a while to understand, I could help?
-
4
votes2
answers323
viewsHow to disable JVM domain name resolution (hostnames)?
An application is trying to access a remote EJB. Regardless of whether the configuration uses the address servidor.empresa.com.br or an IP to access the service, an error occurs:…
-
4
votes1
answer138
viewsNashorn Project, javascript + java?
I found the approach interesting after studying more deep bytecode instruction Invokedynamic. But I have doubts about design and practical use. The javac natively will understand the javascript…
-
4
votes1
answer438
viewsWhat is the Java Constant pool?
I am reading the Java Virtual Machine Specification to go a little deeper and I didn’t fully understand what the Constant pool table is. For example, when speaking da run-time Constant pool…
-
3
votes1
answer2884
viewsHow to disable automatic Java update?
How to disable the 64-bit Java 7 update? I entered the Java control panel and the update tab does not appear. Note: I cannot update my version.
-
3
votes1
answer120
viewsAre methods and builders the same?
Some sources say that constructor is a special type of method, while others say constructors are not methods. Some say, too, that although they are different the JVM treats them the same way. After…
-
3
votes2
answers83
viewsObjects eligible for the AG
I have the following certification issue on the Garbage Collector: 1: public class Rabbit { 2: public static void main(String[] args) { 3: Rabbit one = new Rabbit(); 4: Rabbit two = new Rabbit(); 5:…
-
2
votes1
answer151
viewsHow to see memory consumed by the web application?
I have a web application with Spring running, I would like to know how to see the memory consumed by the same.
-
2
votes1
answer271
viewsJVM instrumentation. Know how many times a method was called during program execution
I have a processing application for batch, currently she is multithreads, I need to know how many times we are running the save method. Would anyone have any idea? Because I need to increase the…
-
2
votes1
answer115
viewsRelationship between Hotspot and JVM, JDK/Openjdk?
What is Java Hotspot and what is its relationship with JVM and JDK/Openjdk?
-
2
votes2
answers172
viewsDoes the garbage collector really exist? Why then is there a memory leak in runtimes that use it?
I’ve heard of memory leakage in Oracle.DataAccess.dll and in large applications developed for runtimes with garbage collector. If the garbage collector exists in those runtimes, why there is memory…
-
2
votes0
answers98
viewsWhat is the difference between JVM, JRE and JDK
I have been researching and still do not understand very well the difference between them, mainly between the JRE and JDK. The JVM would be like the heart of Java, and besides I heard that it…
-
2
votes1
answer258
views -
1
votes1
answer919
viewsHow to limit heap size in a JVM 8?
Until jvm 7 the -Xmx parameter limited the heap size, but today in jvm 8 this is not happening. Today I use the -Xmx200m parameter and my application even consumes 1.5GB in heap, I use a lot of…
-
1
votes1
answer123
viewsLog4j with multiple Jvms
Context In the project I am (production environment) has a server that is installed with 4 java applications, being: 1 application deployed Jetty 1 application in Tomcat 2 jar generated with Spring…
-
1
votes2
answers224
viewsJconsole: Java Monitoring and Management Console
Jconsole Hi, I read that this tool monitors JVM processes. However, when executing the tool appears this form (see image). As for these parameters, what do they mean? I don’t remember configuring…
-
1
votes1
answer232
viewsIs it possible to recover src from a deployed . WAR file?
I’m working with a lot of legacy applications here. One of them (in production) needs to be edited because it has no log. I decompiled, but I have no idea how to reassemble in this situation. I…
-
1
votes1
answer1683
viewsThe difference between the Classpath environment variable and the . classpath files of JAR projects
when we install JDK, we create an environment variable called CLASSPATH, which has as its value the JAVA_HOME variable, which in turn has the address of jdk, which contains all libraries for Java…
-
1
votes3
answers412
viewsLack of Java memory even though the computer has available memories
The Java Virtual Machine "JVM" can run out of memory even if the physical machine has available memory?
-
1
votes0
answers27
viewsFinishing a java object variable with null - Will it be removed from memory?
public class TesteMemoria { public static void main(String... x){ ASayboltFurolViscosity objeto; for (Double i = 30.0; i < 40.0; i++){ objeto = new AlgoritmoASTMD2161_v1999_SSF(i,…
-
0
votes1
answer18
viewsProblem in JVM heap size when migrating from Solr 5.0 to Solr 5.1
I have an instance of Solr 5.0.0 in production with the following JVM heap size configuration: SOLR_JAVA_MEM="-Xms2g -Xmx2g" When I migrated to Solr 5.1.0 with the same configuration and started the…
-
0
votes0
answers35
viewsProblem with Java
When I try to open a BAT file, with the following code: @ECHO OFF SET PASTA_BASE=%~dp0 START CMD /C %PASTA_BASE%\client.js -a DESE -p Terminal -x The following error message appears: "Could not…
-
0
votes1
answer167
viewsHow does JVM, Java, JDK and JRE work?
Java can compile to .exe? Does every operating system, such as Windows, Macos, Linux, etc. already come with JVM installed to interpret the program made in Java? Or when compiling the program b.exe…
-
0
votes0
answers17
viewsHow to use a specific jvm
Hello, I am currently trying to reproduce result in information recovery task and the model I am playing is in java, a language I am not used to. To run the model, I need to use the bundled JVM…
-
0
votes2
answers314
viewsJVM crashing at random
# # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fc501ddca87, pid=2944, tid=0x00007fc4c41ab700 # # JRE version: Java(TM) SE Runtime Environment…
-
0
votes2
answers41
viewsKotlin+Springboot [Beginner] I can’t create Post method
I didn’t even want to go to Stack in such a simple problem, but it’s already dragging on for days and I managed to implement the GET method with a certain ease, I’m learning Kotlin and java, I’m not…
-
-2
votes1
answer125
viewsDo I need to download JVM to run a java program on my PC since I’m not a developer?
Do I need to download JVM to run a java program on my PC since I’m not a developer, that is, I will only need JVM to run this program? Better yet, how do programs made in java run on people’s…
-
-4
votes0
answers16
viewsName of the variable in looping
I need to display the name of the variable in which it contains the value that is inside the range... in case the variable name 'value2'. Is there a way to find the name of this variable for display…