Questions tagged [jvm]
A Java virtual machine (JVM) is a virtual machine that can execute Java bytecode. It is the code execution component of the Java platform.
76 questions
1vote
2answers
235views
Implementation of variables in JVM / Java
I know that a lot of interpreted higher level languages like to abstract a lot of things and therefore cannot directly be compared with lower level constructs. For example in some languages primitive ...
0votes
1answer
2kviews
Java: Is there a performance difference between variable assignment vs. inline usage?
Is there any performance detriment to assigning variables vs using them inline. I'm guessing this WOULD be worse if a method was returning primitive and I was 'boxing' it (e.g. method returning int, ...
-1votes
2answers
2kviews
How to access version of a Java application programmatically when running from an IDE?
As far as I understand, the best practice for programmatic access to the version of a Java application is to: Specify version via build system (e.g. in Gradle). Include the version string as a ...
1vote
4answers
3kviews
Does the JVM compile bytecode into machine code and run it or does it just run bytecode directly?
Java source code is compiled into bytecode for the JVM. But, how does JVM convert bytecode into machine code? Does it re-compile bytecode into machine code and then run it? Or does it simply just run ...
0votes
2answers
2kviews
Why are some languages called platform dependent if I can always share the source code?
I was reading about erlang when I read that it is platform-independent, using BEAM as the VM, now I understand that a VM compiles the byte code to machine code and this makes that language machine-...
50votes
4answers
10kviews
Why are there multiple different implementations of JVM?
While going over a java book I came across this phrase: Different JVMs can run threads in profoundly different ways. While it's completely understandable to me that code can behave differently ...
8votes
1answer
267views
To show the difference between system VMs and JVMs
I am trying to draw diagrams that show the difference between system virtual machines and Java virtual machines. The first two images looks correct to me. But I don't know how to draw the third. ...
0votes
1answer
137views
Do I have do use HashTables/Maps/Hashmaps in this algorithm?
I am doing the Ransom Note algorithm in Hackerrank. The thing is I am not using maps and all the tests pass except for three which execution time takes a lot more. (Kotlin language) I have two ...
1vote
1answer
924views
Are JVM thread dumps a security concern?
When building parallelized applications using Java, a developer sometimes finds himself with a thread being blocked indefinitely because of a four-year-old bug in the spring-bean-web-rest-foo-bar-...
2votes
3answers
3kviews
Can Java applications run on phones (at least android) AND Windows?
Hi all I love stackoverflow so helpful. Afaik IOS has some security measures that dont let other apps (such as jvm) execute code from your app. Not sure how much this is true. But anyway, I heard ...
-2votes
2answers
729views
Converting Java code run by dependency to native code
Is it, at least theoretically, possible to convert a Java application into native code that can be run by something else written in Java? One example of this could be a Minecraft Spigot server. You ...
4votes
5answers
1kviews
What prevents Java from achieving C-level portability?
Wherein portability is defined generally as the percentage of platforms a language or technology can run on, C/C++ are often cited as being more portable than Java, because a Java application depends ...
-2votes
1answer
216views
How's .NET multi-platform approach different than Java's back in the days? [closed]
TL;DR How is the new .NET approach to being a multi platform framework better than what Java did long ago? What are the key differences in the implementation? What are the advantages and disadvantages ...
55votes
4answers
8kviews
Are the development benefits of using Docker negated when using Java compared to other languages closer to Unix binaries?
I had a friend who said: Docker is amazing. You can use it to replicate production and all its quirks on your local machine. Then you can deploy that instance straight through all the staging ...
4votes
3answers
4kviews
Different types of heap in java
I was faced with this question recently for the different types of heap memory available in Java. I couldn't find much information online. Are there different types of heap memory available in Java ?...