jvm

How to create custom JVM ?

I was reading item #6.10 on http://www.cafeaulait.org/javafaq.html and I began wondering how the big players go about creating their own implementation of a JVM. Would an experimental something or another be possible (and feasible) for one guy? ...

Difference between JVM implementations

Where do JVM Implementations differ (except licensing)? Does every JVM implement Type Erasure for the Generic handling? Where are the differences between: JRockit IBM JVM SUN JVM Open JDK Blackdown Kaffe ..... Deals one of them with Tail-Call-Optimization? ...

Does the Sun JVM slow down when more memory is allocated via -Xmx?

Does the Sun JVM slow down when more memory is available and used via -Xmx? (Assumption: The machine has enough physical memory so that virtual memory swapping is not a problem.) I ask because my production servers are to receive a memory upgrade. I'd like to bump up the -Xmx value to something decadent. The idea is to prevent any he...

How to debug JVM resources loading?

Hi everybody, this is my first question here in stackoverflow (and I hope not the last one :P). To debug class loading in a JVM we can use the param -verbose:class, but... Anyone knows how to debug resources loading (e.g. properties files)? Thank you in advance! ...

How to install a second JVM?

Hello, I am working on a Linux Ubuntu 8.10 and I would like to install a second JVM. I am currently working with Java 1.6, but I want to install Java 1.4 and afterwards, set the 1.4 JVM as my default JVM, to work with. How could I do that? Thanks in advance! ...

How does bytecode get verified in the JVM?

How does bytecode get verified in the JVM? ...

What does CMS mean in relation to Java's Garbage Collector?

A lot of JVM's command line arguments dealing with the garbage collector have "CMS" prepended to them. What does this stand for? ...

Setting JVM heap size at runtime

Is there a way to set heap size from a running Java program? ...

Java VMs that do not require an operating system?

I know that BEA was working on LiquidVM which didn't require an underlying operating system, but would like to know if anyone in the open source community is working on something similar. Ideally I would like to find an implementation where the VM is directly loaded by the OS boot loader. ...

Why do so many insist on dragging the JVM into new applications?

For example, I'm running into developers and architects who are scared to death of Rails apps, but love the idea of writing new Grails apps. From what I've seen, there is a LOT of resource overhead that goes into using the JVM to support languages such as Groovy, JRuby and Jython instead of straight Ruby or Python. Ruby and Python ca...

How do I close a port in a case of program termination?

I am using Socket communication in one of my Java applications.As I know if the program meets any abnormal termination the listening ports does not get closed and the program cannot be started back because it reports "Port already open.." Do I have anyway to handle this problem? What is the general way used to handle this matter? ...

Erlang on a JVM/CLR

I've just started reading Joe Armstrongs book on Erlang and listened to his excellent talk on Software Engineering Radio. Its an interesting language/system and one whose time seems to have come around with the advent of multi-core machines. My question is: what is there to stop it being ported to the JVM or CLR? I realise that both vi...

Java 32-bit vs 64-bit compatibility

Will Java code built and compiled against a 32-bit JDK into 32-bit byte code work in a 64-bit JVM? Or does a 64-bit JVM require 64-bit byte code? To give a little more detail, I have code that was working in a Solaris environment running a 32-bit JVM, but now I'm getting issues after upgrading the JDK and Weblogic Server to 64-bit. ...

How do I obtain the exit code for a (Java) process with the Win32 API?

How can I obtain the JVM exit code (value of 'status' from call: System.exit(status)) from a Windows program which started this JVM? I tried to use result from the ShellExecute() call, but the result (42) was independent of real value of status. ...

What is the exact meaning of static fields in Java?

I would like to share an object between various instances of objects of the same class. Conceptually, while my program is running, all the objects of class A access the same object of class B. I've seen that static is system-wide and that its usage is discouraged. Does that mean that if I've got another program running on the same JVM ...

How do I get an error message when failing to load a JVM via JNI?

I would like to retrieve an error message that explains why the jvm failed to load. From the examples provided here: http://java.sun.com/docs/books/jni/html/invoke.html I extracted this example: /* Create the Java VM */ res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args); if (res < 0) { // retrieve verbose error here? f...

Should I look at the bytecode that is produce by a java compiler?

No The JIT compiler may "transform" the bytecode into something completely different anyway. It will lead you to do premature optimization. Yes You do not know which method will be compiled by the JIT, so it is better if you optimize them all. It will make you a better Java programmer. I am asking without really knowing (obviou...

SSL System Properties - Security Risk???

This is probably a stupid question, but how much of a security risk is it to set my web server ssl configuration (e.g. keystore password) via System.setProperty... If I did something like: System.setProperty("javax.net.keyStorePassword", "password"); Is that likely to cause a security problem? Is there a way to safeguard against t...

Loading up a web.xml for integration tests with jetty

OK this is kind of related to : http://stackoverflow.com/questions/728805/using-jetty-to-install-and-run-servlet-tests-programmatically got great answers there, and have been able to load up servlets programmatically and its all made of awesome. What I would like to do however is load up a web.xml in a test (all in the classpath) and ...

time since JVM started

Is there a way to find out the time since the JVM started? Of course, other than starting a timer somewhere near the beginning of main, because in my scenario I am writing library code and the requirement that something be called immediately after startup is a too burdensome. ...