jvm

Functional/Immutable Data Structures for the JVM?

Does anyone know of a Java/JVM data structure library providing functional (a.k.a. immutable, or "persistent" in the functional sense) equivalents of the familiar Java data structures? By "functional" I mean that the objects themselves are immutable, while modifications to those objects return new objects sharing the same internals as t...

Managing Multiple JVM

I have some untrusted client code and I want to run it by initiating a java virtual machine instance for each client to manage the max memory used by the JVM for each instance and max running time the code is allowed to execute. How can I do this ? Is there a code sample for such a thing ? I read about JVM pooling here and there but I ...

JVM load not shared between processor cores on linux

Hey, how come that JVM always uses only one from four cores ? If I run 2 or 3 Java apps, one core is employed on 100% and the rest is sleeping having nothing to do. Apps like Liferay, eclipse, sonatype nexus etc., multithreaded overlords. There is plenty of free RAM also. ps and top shows what I just said, and entire system gets out ...

JVM Tuning with JAVA_OPTIONS using a space?!?

Okay, so I'm adding an argument to my JAVA_OPTIONS as documented here. However, it is not working because of the space. Here is the line I am using in the UNIX shell script (just as the documentation specifies): JAVA_OPTIONS="-DFRAMEWORK_HOME=${app_home}/conf -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0 ...

How do I make the JVM exit on ANY OutOfMemoryException even when bad people try to catch it

So OOME is of the class of errors which generally you shouldn't recover from. But if it is buried in a thread, or someone catches it, it is possible for an application to get in a state from which it isn't exiting, but isn't useful. Any suggestions in how to prevent this even in the face of using libraries which may foolishly try to catc...

Possible Apple JVM bug: java.lang.OutOfMemoryError: Java heap space at apple.awt.CRobot.getRGBPixels(CRobot.java:204)

I'm having issues when I take screenshots. This is my test code. import java.awt.Robot; import java.awt.AWTException; import java.awt.image.BufferedImage; import java.awt.Rectangle; import java.awt.Toolkit; import java.awt.Dimension; public class Test { public static void main(String[] args) throws AWTException { Di...

Java implementation of a... JVM?

Some time ago I found the MJVM project. Sadly, this project has been abandoned by it author (I asked Igor via email). I wonder if there is a (continued) open source project of a full implementation of a JVM in Java like this one. By "full", I mean, not only to emulate mobile devices. ...

Is it still impossible to get rid of out of PermgenSpace exceptions when redeploying?

This is an old problem I've always had. I want to redeploy in development environment. After some deployments I run out of permgen and have to kill the server. Years ago I tried to find a solution to the problem but just found Spring and Hibernate blaming each other for the problem. Has any solution been found? Spring Roo claims it doe...

XX:MaxPermSize max value in 32bit

Can someone confirm that for a 32bit system: Is there any disadvantage in using the below settings: -Xms1024m -Xmx1024m -XX:PermSize=768m -XX:MaxPermSize=768m (We need higher perm size because of excess non heap usage which is some design flaw which shall be corrected later...) ...

Graphing Profiler for Java?

I'm looking for a profiler for the JVM similar to Python's "run snake run". The feature I'm missing the most is the "square map" visualization showing which methods are taking the most time to run. http://www.vrplumber.com/programming/runsnakerun/screenshot-2.0.png Any suggestions? ...

how to fork JVM?

Hello, I wanted to know how is it possible to fork a child JVM from a JDK or even is it possible to do so? Some frameworks like hadoop fork a child JVM for specific tasks thus Please throw some light on the subject. Thanks! ...

How to index records in Solr faster (and not impact ColdFusion web server)? Two JVM?

I have a 64 bit server, 8 GB RAM, dual quad CPU. No resources are ever hitting 100% (except, I guess, the JVM -- right?). I need to index several million records for Solr, but the machine is in production. I recognize having a second machine for indexing would be helpful. Should I dedicate a second instance of the JVM, dedicated to Sol...

Javascript engine with good interoperability with JVM and CLR

Due to the huge resources behind it, Javascript seems to rapidly becoming the scripting language of choice for applications, particularly those with a web front end. I have an application that requires extensibility both on the front and backend. Javascript, or a thin wrapper like CoffeeScript, seems like an excellent, future-oriented, ...

JVM memory consumption double of heapsize

I have set maximum heap size to 4gb for 64bit Weblogic JVM. When i stress-test app, heap size never goes over 4Gb, but java.exe in taskmanager can consume up to whopping 10 Gb. Where this consumption comes from? ...

Server VM needed but not available in JRE. Then what package do I need: JRE, JDK?

Hi there, This is the context: I've just developed an app that needs to be launched in SERVER mode (java -server). I'm using the JSE SDK (JDK) and I have no problems to run the app because the JDK has the Server VM. Now, I'm trying to create an installer that way people will be able to install this app in their computers. But at this po...

How do I resolve a class/field in a JVM compiler?

I'm making a JVM language. This language has modules (namespaces) and the ability to import java libraries. In the import section the user can import things like "java.io." or "java.concurrent." etc. How do I know that a "File" reference in the source is in the package java.io and not somewhere else? ...

Java: waiting on synchronized block, who goes first?

This question is inspired by this other question. If multiple threads are waiting on a synchronized block, and the lock becomes available, who goes first? Is it by thread priority (and then first-come-first-served)? And do the same rules apply for notify (with multiple waiting threads)? ...

relationship between programming language and OS APIs

there are methods in program language in c++ like cout<<"hello world" . when compiled does it invoke a system call to perform the actual work OR is it compiled directly into binary code and get executed by the kernal ? if it use the OS API , different platforms using different OS API, how can the language be the same? ...

java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind (JBOSS)

Hi, I'm using JBoss 4.0.5 GA on Windows 7 with Java version 1.5 (I have to use older java version and a JBoss because I'm working with a legacy system). And when I'm starting the server I get the following error: java.net.SocketException: Unrecognized Windows Sockets error: 0: JVM_Bind And I believe this causes many other exception...

Full GC - Sun JVM frequency of run

In JDK 1.5.0.22 : I see that full GC has been run but the old generation and perm gen space is not used completely - question is as per my understanding FGC only runs when old gen or perm gen is full - I am not able to understand why it has run even though usage % is low?. See output of jstat -gcutil below: S0 S1 E O ...