jvm

Error occurred during initialization of VM

I'm getting the following error when running an executable I created on a 64-bit machine using C++ code: "Error occurred during initialization of VM Unable to load native library: Can't find dependent libraries" My PATH (shown below) obviously points to jvm.dll since I have that file in both C:\Progra~1\Java\jdk1.6.0_17\jre\bin and C:\...

Run Java code on my own JVM

In another discussion, someone say something about run the java code on its own jvm, which ignores SecurityManager. Is it possible? (and as easy as saying?) ...

is memory allocated in JNA (or JNI) by the C code limited by jvm (param -Xmx or architecture 32/64)

that is, could a malloc() asking for 5 mb in the C part fail due to: jvm was run with -Xmx32m and jvm heap is already 30 mb something to do with jvm being 32 bits in a 64 bits windows ...

loading wrong jvm.dll

When I run an executable I created, it uses the jvm.dll from C:\Windows\System32. But I want it to use the jvm.dll in C:\Program Files\Java\jdk1.6.0_17\jre\bin\server. C:\Program Files\Java\jdk1.6.0_17\jre\bin\server is in my PATH environment variable. Does anyone know how to accomplish this? Thanks. ...

Why is the Clojure Hello World program so slow compared to Java and Python?

Update As suggested by many people, it looks like this was because of the fact that clojure code was first compiled and then executed. AOT compilation should help offset that. Given I found the practical Clojure AOT compilation process a little tricky to solve (classpath issues, directory issues et al), I've written up a small step by s...

JVM ID not found

Hi all, I've recently downloaded and installed WebSphere Application Server 7.0 on Windows 2003. I wanted to do a jstat (JDK 1.6) to probe the JVM but I kept getting " not found" message. Any idea why this is happening? Nicholas ...

one high-end server with one Application Server or multiple Application Servers?

If I have a high-end server, for example with 1T memory and 8x4core CPU... will it bring more performance if I run multiple App Server (on different JVM) rather than just one App Server? On App Server I will run some services (EAR whith message driven beans) which exchange message with each other. btw, has java 64bit now no memory lim...

Unable to jstat WebSphere Application Server PID

Hi stackoverflow'ers, I've spent the entire day trying to find relevant resources about doing jstat on the WebSphere Process ID. I have WebSphere Application Server 7.0 installed on Windows 2003. I did this command: jstat -gcutil [PID] 1000 But I kept getting "[PID] not found" message. Any idea how to resolve this issue? Or Java's js...

Java - Get a list of all Classes loaded in the JVM

Hi all, I would like to get a list of all the classes belonging to a certain package as well as all of their children. The classes may or may not be already loaded in the JVM. Walter ...

How to override/control the way the JVM gets the system date?

How do you mock-up/trick the JVM to get a date other that the current system date? I have a set of tests in JUnit I don't want to change, but instead I want to change a setting so that when the JVM retrieves the date it retrieves the date I want. Have you done something similar before? Thanks. ...

Why is memory management so visible in Java VM?

I'm playing around with writing some simple Spring-based web apps and deploying them to Tomcat. Almost immediately, I run into the need to customize the Tomcat's JVM settings with -XX:MaxPermSize (and -Xmx and -Xms); without this, the server easily runs out of PermGen space. Why is this such an issue for Java VMs compared to other garb...

Experience of moving to 64 bit JVM

Our company is planning to move to 64 bit JVM in order to get away from 2 GB maximum heap size limit. Google gave me very mixed results about 64 bit JVM performance. Has anyone tried moving to 64 bit java and share your experience ...

Why does Java's invokevirtual need to resolve the called method's compile-time class?

Consider this simple Java class: class MyClass { public void bar(MyClass c) { c.foo(); } } I want to discuss what happens on the line c.foo(). Original, Misleading Question Note: Not all of this actually happens with each individual invokevirtual opcode. Hint: If you want to understand Java method invocation, don't read just...

It won't create a Java VM (JNI)

My simple command line app: int _tmain(int argc, _TCHAR* argv[]) { JavaVM *jvm; JNIEnv *env; JavaVMInitArgs vm_args; JavaVMOption options[1]; options[0].optionString = "-Djava.class.path=."; //Path to the java source code vm_args.version = JNI_VERSION_1_6; //JDK version. This indicates version 1.6 vm_args.nOptions = 1; vm_args.o...

how can a servlet in one jvm communicate with servlet in another jvm

can this be solved simply by specifying the complete url of the servlet in the RequestDispatcher? ...

Maximum heap space constraints in java

I have a program that needs a lot of memory and want to set the maximum heap space at 6024MB. Java gives me the error: Invalid maximum heap size: -Xmx6024m The specified size exceeds the maximum representable size. Is there a workaround? ...

Do JVMs on Desktops Use JIT Compilation?

I always come across articles which claim that Java is interpreted. I know that Oracle's HotSpot JRE provides just-in-time compilation, however is this the case for a majority of desktop users? For example, if I download Java via: http://www.java.com/en/download, will this include a JIT Compiler? ...

Sun permgen & JRockit garbage collection

In the Sun JVM, classes that are loaded by the class loader are put in permgen space and never gc'd. (Unless the class loader goes out of scope) It's my understanding that JRockit puts that same data on the heap instead. Is that data then subject to garbage collection? Thanks. ...

Segfaulting Java process

I have a Java process that is working on some large data set in memory. I've seen it crash with a SIGSEGV signal sometimes, so i was wondering some potential causes and fixes could do. Caues: JVM bug Native library bug (e.g pthreads etc) JNI bug in user code Fixes: Upgrade to new JVM In my particular case, this is the output for...

OutOfMemoryError: Java heap space error when start solr

Hi I start indexing DB articles with solr, but after add about 58 million article (and about 113 GB size of disk) , i get below error message on tomcat log error Note1: i already set Init memory pool to 256MB, and Max memory pool:1400MB to tomcat server. Note2: I can post or search article but must wait over 3 min for get response. ...