126
votes
Accepted
Why are there multiple different implementations of JVM?
Why might I, as a developer be dissatisfied with the official JVM implementation that Oracle provides and decide to build up a different one?
Which one? Oracle has at least three different official ...
27
votes
Why are there multiple different implementations of JVM?
Java is a spec, not a product
Java is not a specific product or binary. The Java platform is defined by a set of specifications for the language and the JVM, plus JSRs and JEPs.
You said:
the ...
14
votes
Accepted
What prevents Java from achieving C-level portability?
Java is portable in the sense that C or C++ can be portable: the same source code can be used for multiple operating systems or processor architectures. In fact this is a lot easier in Java, since the ...
8
votes
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.
That is not necessarily true. There is nothing in the Java Language Specification that prescribes any particular implementation strategy. The ...
7
votes
Accepted
Java: Is there a performance difference between variable assignment vs. inline usage?
The JVM and Java compiler have been continuously optimized for literally decades now, so its extremely unlikely that they would miss a trick so basic that this would make a difference.
However, we don'...
6
votes
Accepted
Implementation of variables in JVM / Java
The very first sentence of the chapter you quoted, Chapter 2. The Structure of the Java Virtual Machine says [bold italic* emphasis mine]:
This document specifies an abstract machine. It does not ...
6
votes
Accepted
To show the difference between system VMs and JVMs
It's fine as is, if you think about it the right way.
You can think of a Virtual Machine as a task running on the hypervisor. They get context switched nearly the same way after all. Tasks and Apps ...
6
votes
What prevents Java from achieving C-level portability?
a Java application depends on a JVM being present.
That is not true. There is nothing in the Java Language Specification that says anything about the JVM. Oracle is pretty strict about keeping the two ...
5
votes
Accepted
How's .NET multi-platform approach different than Java's back in the days?
It's not.
.Net code compiles to IL which is run on a CLR
Its always been multi-platform in this sense and Mono has been around for a while now. http://www.mono-project.com/
I guess what you are ...
3
votes
Accepted
Do I have do use HashTables/Maps/Hashmaps in this algorithm?
In both cases, you have an O(n^2) algorithm - you have a loop (either explicitly in your recursive case or implicitly as part of map in the iterative case) which calls contains. contains has to ...
3
votes
Can Java applications run on phones (at least android) AND Windows?
Java applications are run on a java virtual machine, which is what allows them to work on multiple platforms. However, android sdks have quite a few additional libraries and features pertaining ...
2
votes
How to access version of a Java application programmatically when running from an IDE?
A possible approach is to generate some of your Java code (with tools like GNU autoconf, or GPP) to contain version specific information.
Another approach might be to script your GNU emacs editor to ...
2
votes
What prevents Java from achieving C-level portability?
TL;DR: Apart from the legal/business issues others already mentioned, there are indeed technical limitations. Roughly speaking, creating a reasonably good JVM is harder than a reasonably good C ...
2
votes
What prevents Java from achieving C-level portability?
But, what prevents a Java application from shipping within a JVM wrapper?
I think you got it wrong: if there's a JVM implementation, then the battle is already won, regardless of whether said JVM is ...
2
votes
Are JVM thread dumps a security concern?
It is a kind of information leakage. An attacker armed with this could figure out what libraries you are using and possibly figure out the versions using the stack trace information.
This would ...
2
votes
Accepted
Does the JVM compile bytecode into machine code and run it or does it just run bytecode directly?
Byte code usually cannot be run directly on the processor, since the hardware doesn't have the opcodes aload, getfield etc.
The JVM either interprets the byte code, i.e. it looks up the things to do ...
2
votes
Does the JVM compile bytecode into machine code and run it or does it just run bytecode directly?
how does JVM convert bytecode into machine code?
The keyword you need is "JIT compilation"; JIT stands for "just in time", i.e. it runs immediately before trying to execute the ...
1
vote
Why are some languages called platform dependent if I can always share the source code?
When is a language platform independent?
A programming language is only a way to express something in source code in an easy way. As soon as nothing in this expression is platform specific (os or ...
1
vote
Can Java applications run on phones (at least android) AND Windows?
I would recommend React Native
This is a framework written by Facebook that allows you to write mobile applications that work on both platforms using javascript. If you wish to learn about React ...
1
vote
What prevents Java from achieving C-level portability?
Size and speed is two huge factors. A JVM is a pretty huge program that needs a lot of RAM and storage space to be used. A JVM is also often slower (depending on the workflow).
This means that Java ...
1
vote
Java and JVM license
The answers to this question are not correct. You are not free to develop software from the Java specifications, look at the license info in the appendix of specification papers: "License for the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
jvm × 76java × 56
scala × 8
compiler × 7
virtual-machine × 7
garbage-collection × 5
programming-languages × 4
memory × 4
interpreters × 4
heap × 4
bytecode × 4
object-oriented × 3
.net × 3
clojure × 3
design × 2
c++ × 2
python × 2
c × 2
functional-programming × 2
exceptions × 2
operating-systems × 2
oracle × 2
portability × 2
groovy × 2
jruby × 2