jvm

Call CLR code from JVM

Is it possible to call CLR methods from JVM? Any library that would host a CLR instance inside JVM, and provide a simple mapping for Java? Are there any libraries that would do that? I'd like to write a plugin for existing Java application which already runs on JVM. I'd like to avoid having two binaries. I only want to call few methods...

Calling/monitoring JVM via JMX from a non java client

I am using Nagios for monitoring - and looking at NPRE for various monitoring on a given box. I have some java processes - would be nice to "peek into them" via JMX etc.. I can't see a way to do this without starting up a JVM and connecting remotely? Any ideas? ...

Start Java main in another process (VM)

Hi, I have a server client project and for testing purposes I want to start the server in a whole new process. The problem is, I have just a main() method in project, no jar. So my guess would be something like Runtime.getRuntime().exec("javac MyServer.java"); Runtime.getRuntime().exec("java class MyServer"); But I am really not sure ...

Why does the JVM still not support tail-call optimization?

Two years after does-the-jvm-prevent-tail-call-optimizations, there seems to be a prototype implementation and MLVM has listed the feature as "proto 80%" for some time now. Is there no active interest from Sun's/Oracle's side in supporting tail calls or is it just that tail calls are "[...] fated to come in second place on every feature...

When does an object qualify as a DTO?

Hi, DTO (Data Transfer Objects) are objects used to transfer information between multiple subsystems of an application, often separated by either a network or a process boundary. This is my understanding. However, from Java perspective, do the subsystems/modules have to be on different JVM instances for the objects they use between...

Jboss Deployment and Java Heap Issues

My application was running fine without issues but from last week I am getting one error during jboss start. I have used almost all work around to solve this problem but could not make it. I am using following options: JBOSS_HOME="/usr/jboss-5.1.0.GA" JAVA_OPTS="-Xms256m -Xmx850m -XX:MaxPermSize=512m" Log file: 2010-09-03 00:53:35,5...

UseAdaptiveSizePolicy and other jvm opts

The JVM option -XX:+UseAdaptiveSizePolicy is defined as part of the hotspot ergonomics and can be specified with throughput or the pause time priority. However, my question is - is it right to have the other jvm options like NewSize and SurvivorRatio mentioned along with it?. What exactly is the impact of doing that? ...

Blackberry 9800 Simulator Crashing When Launching Browser

The Blackberry 9800 simulator is crashing when launching the browser, throwing JVM Error 104: Uncaught IllegalStateException. This is a clean install of the simulator with no 3rd party applications installed to it. I strictly wanted to use it for testing web applications. All other applications on the device seem to work withou...

In Scala or Java, how to get how much RAM does application currently occupy?

NetBeans IDE has a taskbar indicaror, showing how much RAM is currently allocated and used by the running instance. How can I get this data in my own application written in Scala? If there's no special function for this in Scala, I could use Java one. ...

Required JDK 1.6 rpm for x64 Redhat

Hi, I downloaded the jdk-6u21-linux-x64-rpm.bin from Sun and installed the Java. During execution the rpm which got extracted is jdk-6u21-linux-amd64.rpm. I am trying to build an application which requires libjvm.so. And in the above JDK it is found in /usr/java/jdk1.6.0_21/jre/lib/amd64/server/libjvm.so As a result , I am getting a c...

Instances of JVM

Hi, Does invoking java via two different command line involves two different JVMs or two separate instances of same JVM. ...

java - how to persist variable in JVM

I have an odd situation where i want to be able to be able to persist a variable in memory.. like a global variable I can pin in the JVM. Is this possible? I remember doing something similar in college, but can't find it by googling. I have a logic problem that has some artificial constraints that make this the best possible solution. ...

error creating bean - JpetStore example

Please help me resolve this I am constantly getting this error Error creating bean with name 'sqlMapClient' defined in ServletContext resource Thanks 31 [main] INFO org.springframework.web.context.ContextLoader - Root WebApplicationContext: initialization started 140 [main] INFO org.springframework.web.context.support.XmlWebApplic...

JVM based language without language runtime

Does anyone know of some alternative JVM language, however obscure it might be, which can compile to plain old java bytecode, without the need of a language runtime. I need this in order to try to develop android applications without startup or size penalty. Scala, Clojure and Groovy all require its own runtime library distributed with ...

How to find out what optimizations the JVM applied to my code?

The JVM (especially the HotSpot VM) is famous for having a huge number of optimizations it can apply at runtime. Is there a way to look at a certain piece of code and see what the JVM has actually done to it? ...

Why do the GC times increase steadily on a long running high volume Java app?

I have a high volume Java application that handles a consistent load of 50000msgs/sec. It is tuned for high throughput using the following settings: -Xmx3g -Xms3g -XX:NewSize=2g -Xss128k -XX:SurvivorRatio=6 -XX:TargetSurvivorRatio=90 -XX:+UseParallelGC -XX:ParallelGCThreads=12 -XX:+UseParallelOldGC -XX:+HeapDumpOnOutOfMemoryError ...

How can I get debug information printed on a J9 VM (Linux)?

Hello! I'm using J9 VM to run my application on a Linux machine (BusyBox). When developing and testing on my Windows environment, also with J9, I get full debug information on stack traces. That doesn't happen on the Linux machine. I've checked both VMs configuration as much as my knowledge permits. Also, I've stripped my windows J9 in...

How does Java compiler handle statically resolvable calls to non-static methods?

Do java compilers (javac or eclipse) try to compile method calls as static when the target method is known statically (even if it's not a static method). Eg. class A { void foo() { doStuff(); } } ... A a = new A(); a.foo(); // is this compiled as virtual call or static call? ...

How to find out what algorithm [ encryption ] are supported by my JVM?

I am using Jasypt for encryption. This is my code: public class Encryptor { private final static StandardPBEStringEncryptor pbeEncryptor = new StandardPBEStringEncryptor(); private final static String PASSWORD = "FBL"; private final static String ALGORITHM = "PBEWithMD5AndTripleDES"; static{ pbeEncryptor.set...

Conditional JIT-compilation

In Java we can do conditional compilation like so private static final boolean DO_CHECK = false; ... if (DO_CHECK) { // code here } The compiler will see that DO_CHECK is always false and remove the entire if-statement. However, sometimes, especially in library code, we can't use conditional compilation, but I'm wondering, can we...