jvm

Maven 2.1.0 not passing on system properties to Java virtual machine

We use the command line to pass on system properties to the Java virtual machine when running our Hudson builds on a Linux box. It used to work quite well in 2.0.9 by since we upgraded to 2.1.0 it has stopped working altogether. The system properties just never make it to the Java virtual machine. I have created a small test projec...

executing a class in remote jvm

Hi All, I have a small test class that i want to run on a particular jvm that's already up and running (basically it's an web application running on Tomcat) . The reason i want to do this is i want to execute a small test class (with the main method and all) within that jvm so that i get the same environment (loaded and initialized cl...

How is native code handled by the JVM

Consider an case that I have to call C++ code from my Java Program. The C++ code creates thousands of Objects. Where are these dynamic objects stored ? I suspect in the JVM heap because the native code will be a part of the same process as the JVM. If yes, do the rules of Java Garbage collector thread apply on Objects of the C++ code ?...

is it possible to have InterProcess communication in Java ?

I have two Java Programs each running in its own JVM instance ? Can they communicate with each other using any IPC technique like Shared Memory or Pipes ? Is there a way to do it ? ...

How does the Java cast operator work?

I am trying to debug an issue involving a ClassCastException in Java. In the interest of solving the issue I need to know what is going on when I cast from Object to a specific type. Can anyone explain to me how the Java cast operator works at the Java level and the JVM level? ...

Why is the JVM slow to start?

What exactly makes the JVM (in particular, Sun's implementation) slow to get running compared to other runtimes like CPython? My impression was that it mainly has to do with a boatload of libraries getting loaded whether they're needed or not, but that seems like something that shouldn't take 10 years to fix. Come to think of it, how do...

How to understand Java Hotspot Errors

Guys when the JVM Crashes it writes an Error Log hs_err_pid.log. I want to find out what caused the JVM to crash ? How to understand these Logs, is it documented anywhere on how this Log is arranged. I tried to search on the Net but to no avail :-( Pointing out to relevant URL's will be appreciated. Thanks. ...

Can I execute multiple instances of a Java class file?

I am thinking of executing multiple instances of same java binary (a socket application) with different configuration files (As a command line parameter). Does the JVM correctly handles this situation? In other words If I haven't any common resources (Files that can be locked etc.) will this approach make any problems? If so what are thi...

Running java programs in one runtime instance

Hi, I am wondering if such thing is possible: I have a java program that takes arguments and gives output to the console. What i need is to run it multiple times - it (jar file) runs smoothly but the overhead for starting and stoping java runtime is way to big. Is there a way to instantiate java runtime (or vm, I'm not sure how to call...

Setting breakpoints in Java

How does setting breakpoints in Java work? Is it just based on the source file name and line number? Does the class or method name also figure in? If I have an old version of the source in my debugger and set a breakpoint, the cursor is off when I step through. How far off can it be? Can it go into the wrong method (or even the wrong c...

How to activate JMX on my JVM for access with jconsole?

How to activate JMX on a JVM for access with jconsole? ...

Java Memory explained (SUN JVM)

I tried to find a interpretation of the memory segments of the sun java vm, which would also understandable by an administrator. It should explain what heap / non-heap memory is and the significance of the different memory pools. If it would somehow relate to the jconsole view, it would be a bonus. Is there somewhere a website with su...

Random crashes of Java VM in ConcurrentGCThread

We have problems with JVMs running internet applications under changing load. This problem comes and goes. One day we see three VMs dying and after that, there is nothing for a week or two. We have not found a pattern yet, found nothing to reproduce or cause it. Also a search in the Sun bug database did not help. We tried a suggested wo...

Is the Java Virtual Machine really a virtual machine in the same sense as my VMWare or Parallels file?

Is the Java Virtual Machine really a virtual machine in the same sense as my VMWare or Parallels file? ...

How to ensure JVM starts with value of Xms

When I run a java program with the starting heap size of 3G (set by -Xms3072m VM argument), JVM doesn't start with that size. It start with 400m or so and then keeps on acquiring more memory as required. This is a serious problem for me. I know JVM is going to need the said amount after some time. And when JVM increases is its memory a...

How do I start my Java program with more than one java agent ?

Hello, I'm aware of how to start a java progam with a java agent: java -javaagent:myAgent.jar MyJavaProgram But what if I want to add 2 or more java agents to instrument my program? I do not want to reinvoke the java -javaagent:... for every agent I have to load in JVM. I've tried something like this : java -javaagent:agentA.jar, a...

where i can learn about JVM debugger protocol ?

Hello all i want to do test and build simple debugger GUI in c++ that debugging Java as i read from view docs i will have to work with the JVM debugger protocol do any one here have experience with it? where can i learn about it ? Thanks ...

What are Reified Generics, how do they solve the Type Erasure problem and why can't they be added without major changes?

I've read Neal Gafter's blog on the subject and am still unclear on a number of points. Why is it not possible to create a implementations of the collections api that preserve type information given the current state of Java, the JVM and existing collections API? Couldn't these be them replace the existing implementations in a future ve...

What happened internally (JVM) when System.gc() or finalize() method called?

What happened internally (JVM) when System.gc() or finalize() method called? Is this really collect garbage or reduce performance ? ...

64-bit vs. 32-bit performance on SPARC hardware with the 1.6 JVM

I'm doing performance tuning for our Tomcat cluster running on SPARC hardware. The 32-bit JVM gives us sufficient memory for now, but we are going to start using Terracotta for server striping so the extra memory the 64-bit JVM offers could be needed soon. In addition to a bigger memory footprint, moving to the 64-bit JVM on SPARC resul...