Tagged Questions
2
votes
3answers
228 views
Uses for System.gc() in Java [closed]
In Java, there is a method called System.gc(), which calls the garbage collector (or rather, "suggests" to the JVM to run the GC).
Are there valid reasons to call this method? I'm thinking that it ...
2
votes
4answers
294 views
Is it possible to have a single code base for a desktop GUI and a web application?
The required user interface is fairly simple; basically, two tables that "interact with each other", e.g. certain rows in one table get highlighted when a row in the other is clicked, plus maybe a ...
1
vote
1answer
287 views
Should we push for more JavaScript on the JVM, alongside Java and Scala? Or, if not, why?
With JavaScript becoming one of the most widely used languages around, I began asking myself why people do not find ways to use it extensively on the JVM. As a programmer who spends half day writing ...
-1
votes
2answers
150 views
Is it possible to implement a native compiler for a 'managed language' such as Java?
In most cases, it is possible to create both a native compiler and an interpreter for a programming language. The compiler would simply convert the source code to machine code, and the interpreter ...
8
votes
5answers
3k 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 ...
2
votes
6answers
789 views
Is Java Bytecode interpreted? [closed]
The definition of interpretation (correct me if I'm wrong) is parsing code like so:
1- Translate currently parsed line to some intermediate language. 2- Run the translated line. 3- Move to the next ...
3
votes
5answers
606 views
What exactly is the Garbage Collector in Java?
I think I generally know what the Garbage Collector in Java does, but It's praised a lot, so I thought maybe I'm missing something about it's functionality.
What I know is, that the GC takes care of ...
20
votes
2answers
2k views
Is it *ever* okay to catch StackOverflowError in Java?
I used to think that it's not, but yesterday I had to do it. It's an application that uses Akka (an actor system implementation for the JVM) to process asynchronous jobs. One of the actors performs ...
12
votes
1answer
2k 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 ...
5
votes
1answer
224 views
What would be the market life of a JVM based software framework?
I saw how Struts 1 lasted from 2000 to 2013. I hear that people are moving from Struts 2 to Spring. But for a project that may need to be maintained for a decade or two, would it be advisable to opt ...
2
votes
1answer
699 views
How to create own programming language based on JVM? [closed]
I am curious about how to create a programming language based on JVM so I have tried to get some info online, but the information I got are quite fragmented. What I found are mostly information ...
13
votes
5answers
979 views
What makes JVM so much versatile to support so many JVM languages?
JVM supports so many languages other than Java like Groovy,Clojure,Scala etc which are functional languages unlike Java(I am referring to Java before Version 8 where Lambda's are not supported) that ...
4
votes
3answers
190 views
Java Compiler and VM Compatibility
A co-worker and I recently had a discussion about Java versions and the JVM. I use Java 7 but we use Java 6 for our client (while he says that some are still on 5). My immediate thought was, why can't ...
12
votes
4answers
3k views
Approaching Java/JVM internals
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
3answers
2k 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?
1
vote
5answers
524 views
Java heap space
In Java/JVM, why do we call the memory place where Java creates objects as "Heap"?
Does it use the Heap Data Structure to create/remove/maintain the objects?
As I read in the documentation of Heap ...
4
votes
1answer
403 views
Does current JIT optimize generated machine codes for branch prediction based on runtime statistics?
Some JVMs would compile Java byte code into native machine code. We know that there are lots of optimizations we could apply for that. Recently, I also learn that a branch operation may block the CPU ...
2
votes
4answers
604 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
135 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
3answers
619 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 ...
11
votes
2answers
1k 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 ...
8
votes
3answers
479 views
Is Apple getting out of the general purpose development platform business? [closed]
I've been doing general ANSI C/Console C++/Java/Web development on Mac hardware for about ten years. I make no claims of objective superiority over other platforms, it just satisfies my personal ...
5
votes
3answers
3k 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 ...
9
votes
5answers
499 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 ...