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.

Filter by
Sorted by
Tagged with
35
votes
4answers
9k views

What limitations does the JVM impose on tail-call optimization

Clojure does not perform tail call optimization on its own: when you have a tail recursive function and you want to have it optimized, you have to use the special form recur. Similarly, if you have ...
3
votes
2answers
840 views

How to devise instruction set of a stack based machine?

Stack based virtual machines like CLR and JVM has different set of instructions. Is there any theory behind devising the instruction set while creating a virtual machine? e.g. there are JVM ...
12
votes
4answers
6k views

How does the Java Virtual Machine execute code written in other languages?

Since Java 1.6 the JVM can run a myriad of programming languages on top of instead of just Java. I conceptually understand how Java is run on the Java VM, but not how other languages can run on it as ...
16
votes
1answer
3k views

How can Java be improved so that it no longer needs to perform type erasure?

The official Java tutorial on generics explains type erasure and why it was added to the compiler: When a generic type is instantiated, the compiler translates those types by a technique called ...
15
votes
4answers
8k views

Approaching Java/JVM internals [closed]

I've programmed in Java for about 8 years and I know the language quite well as a developer, but my goal is to deepen my knowledge of the internals. I've taken undergraduate courses in PL design, but ...
3
votes
2answers
2k views

Converting ANTLR AST to Java bytecode using ASM

I am currently trying to write my own compiler, targeting the JVM. I have completed the parsing step using Java classes generated by ANTLR, and have an AST of the source code to work from (An ANTLR "...
3
votes
4answers
2k views

Static methods on a web context

What happens when concurrent requests call the same static Java method running on an application server? Say that a method run takes 2 seconds and receives 100 calls in a given second. The method ...
3
votes
1answer
172 views

What is richochet frames based hotspot jvm?

In order to implement JSR 292, a.k.a. invoke dynamic, something called richochet frames is introduced into the hotspot vm. I'd like to know more about it, such as invoke dynamic itself, how richochet ...
7
votes
5answers
672 views

Modern languages and the JVM [duplicate]

Many modern programming languages (Scala, Erlang, Clojure, etc.) are targeting the JVM. What are the main reasons behind that decision? JVM's maturity? Portability? Because JVM simply exists, and the ...
2
votes
1answer
317 views

Incanter for real world statistical projects [closed]

I'm interested in statistical computing. R is a leader platform obviously but what about Incanter? Incanter is at the top of my list since I'm a Clojure and JVM guy. Do you have any real world ...
10
votes
3answers
2k views

How safe it is to do minor JVM upgrades?

I have been working on the JVM for years and I have very rarely experienced a JVM crash ... that is until approx 6 months ago. Since that I have experienced approximately 5 JVM crashes resulting ...
6
votes
3answers
568 views

How do I get feedback about whether escape analysis had any affect on my code or not?

One problem I have with compiler optimization is, that I actually never know what the compiler (or in this particular case the Jit) does with my code. So is there any possibility for me to know ...
17
votes
2answers
4k views

Java and JVM license

Does Java license allow other companies to create their own versions of Java language or just implement it accurately? Same question about JVM. I heard about Sun suing Microsoft for changing their ....
9
votes
5answers
4k views

Is there a clear leader amongst JVM-based languages? [closed]

What is the current status of these projects, and has any one (or two) emerged as a clear leader? To demonstrate my motives for asking this question, cast your mind back several years. Prototype and ...
6
votes
4answers
3k views

What is the difference between instantiating and loading a class in Java?

In Java world, there are some scenarios where I see developers used to load the class rather than instantiation. What is the difference between instantiating and loading a class?
5
votes
9answers
664 views

Is there any evidence that one of the current alternate JVM languages might catch on? [closed]

There's been a lot of enthusiasm about JRuby, Jython, Groovy, and now Scala and Clojure as the language to be the successor to Java on the JVM. But currently only Groovy and Scala are in the TIOBE ...
11
votes
5answers
1k views

How is the JVM and Java's WORA different from other high level languages?

In the Java world, we often talk about the JVM, and when Java was new it had the supposedly killer feature of "Write Once, Run Anywhere." From the way people talk and write, this seems different from ...
8
votes
3answers
5k views

Jython and JRuby vs. Groovy (and Java) [closed]

I am very interested in Python for programming on the JVM, and I've worked in Java and Ruby (not JRuby) a lot, and to a certain extent in Groovy. What are the limits to the Java-Jython and Java-JRuby ...