jvm

How does JVM Classfile verifier works?

How does JVM classfile verifier perform class verification ? Could anyone please tell me the steps ? ...

Enable/disable debugger support for the currently running JVM from Java code

Is there an interface (maybe part of JMX) that I can use to dynamically enable or disable the JVM debugger support from Java code inside that JVM? (See also http://stackoverflow.com/questions/376201/debug-a-java-application-without-starting-the-jvm-with-debug-arguments —CRM) ...

Scope of the Java System Properties.

In Java we use System.setProperty() method to set some system properties. According to this article the use of system properties is bit tricky. System.setProperty() can be an evil call. * It is 100% thread-hostile * It contains super-global variables * It is extremely difficult to debug when these variables mysteriously change at r...

Do I have any method to override System Properties in Java?

I am getting a practical issue and the issue can be dascribed as follows. We are developing a component (Say a plugin) to do some task when an event is triggered within an external CMS using the API provided by them. They have provided some jar libraries, So what we are doing is implementing an Interface provided by them. Then an intern...

how jvm handles creating object inside a loop

List list = new ArrayList(); String[] test = {"ram", "mohan", "anil", "mukesh", "mittal"}; for(int i =0; i < test.length; i++) { A a = new A(); a.setName(test[i]); list.add(a); } How JVM handles creation of object a in each loop? How "list" differntiate between different instance? Is it good practice to create object on e...

How to check whether an executable JAR has finished in another JVM

Hi, guys, I encounter a confusing issue! I want to invoke a executable JAR to compute PI from my main java applicaion using runtime.exec(), which create a new JVM for running the executable JAR. My issue is that when the PI computation is done, the JVM is still alive. my main java application has no idea whether PI computation is finishe...

Calling built-in java native methods

Is it possible to call the JVM's built-in native code, i.e. the code that various class in java.lang and java.io call? In other words, can you bypass the built-in java API to access various system-level calls such as file-system access? I know I could do this by building my own native code library and calling that via JNI, but it would b...

Java and ASP.NET

Please can anyone tell me the difference between JVM and MSIL? ...

java newbie question: richer java subprocesses

I would like to spawn a subprocess Java Virtual Machine (through a Java API call) and communicate with it. Maybe I'm just not searching for the right thing on Google, but I keep getting pointed back to Runtime.exec(), which is not what I want. I know I could connect standard input/output and use various serialization techniques, or use ...

Java crash outside JVM - works on Windows not on Linux

I am using OpenNLP and my English NameFinder on Linux (CentOS 5.3,Java 1.6.0_13) keeps giving me this error: An unexpected error has been detected by Java Runtime Environment: SIGSEGV (0xb) at pc=0x0657e436, pid=3484, tid=2291964816 Java VM: Java HotSpot(TM) Server VM (11.3-b02 mixed mode linux-x86) Problematic frame: V [libjvm.so+0x...

bundling jvm with the application

How can i bundle a stripped down JVM to run just my application? i would like to strip down the JVM so that i can include it in my application. I know that exe wrappers can do this but what i would like to know is how? so that i can script it and create bundles for multiple OS's not just Windows. ...

Where are generic types stored in java class files?

I am well aware that generic types are erased from Java code when it is compiled. What information (attributes?) do 1.5+ JVMs use to implement getGenericType , etc. ? ...

How to write efficient Java code?

As all of you may know, Java code is compiled and interpreted by JVMs. My questions deal with optimization: Is it optimized at run-time by the JVM only or also at compile-time? In order to write efficient code, where can I find the list of supported optimizations? Or are JVM optimizations powerful enough so that I just have to write co...

JVM, Java, Multithreading, Object Creation

i am encountering a weird scenario, Is there a possibility of JVM re-using an already created object when we are initializing a new one and the object count is JVm is very high? abc a = new abc(); a.setAttribute("aaaa"); ......... a...is no longer being used...and has not yet been garbage collected by the JVM. There are multiple threads...

Creating very large image files with BufferedImage, strange issues depending on compilation and computer (-Xmx does not work)

Just to follow up on here: http://stackoverflow.com/questions/961795/creating-very-large-image-files-with-bufferedimage-strange-issues-depending-on-c I still have the issue and I did try the Xmx command line to make sure the JVM had at least 1024m of RAM, I put the parametere in as both -Xmx1024m and -Xmx 1024m but neither worked. ...

Can Netbeans handle both 32-bit and 64-bit version of Java ?

I'm running 64-bit version of Vista on my notebook with 4G of RAM, the Ram is maxed out at 1.5G on the 32-bit version of Java. But if I move completely to 64-bit version of Java, the JDIC part won't work, so my question is : if I install both 32 and 64 bit versions of Java, can Netbeans easily switch between the two ? So if I run out of ...

Using -Xmx and -Xms in a JME application in a cell phone

Hi, I've a JME application running in a samsung i617 cell phone, and the applications is throwing OutOfMemoryError when its heap goes over 7.1 MB (and the cell phone has 64 mb)... Is it possible to use the -Xmx and -Xms parameters in JME ...

Android Adverse To Dynamic Languages

Hi all, I believe I read at some point that due to Android running on the Dalvik VM, that dynamic languages for the JVM (Clojure, Jython, JRuby etc.) would be hard pressed to obtain good performance on Dalvik (and hence on Android). If I recall correctly, the reasoning was that under the hood, in order to achieve the dynamic typing, th...

Why is there no GIL in the Java Virtual Machine? Why does Python need one so bad?

I'm hoping someone can provide some insight as to what's fundamentally different about the Java Virtual Machine that allows it to implement threads nicely without the need for a Global Interpreter Lock (GIL), while Python necessitates such an evil. ...

What is the default encoding of jvm?

Whether the default encoding for jvm is UTF-8 or some other? In jvm where it will be mentioned? ...