jvm

What would the jvm have to sacrifice in order to implement tail call optimisation?

People say that the clojure implementation is excellent apart from the limitation of having no tail call optimisation - a limitation of the jvm not the clojure implementation. http://lambda-the-ultimate.org/node/2547 It has been said that to implement TCO into Python would sacrifice stack-trace dumps, and debugging regularity. h...

jmap not working on windows server 2003

jmap works fine for me on XP. But when I try to execute the command, it throws and error Not enough storage available to process. I used the following command jmap -dump:format=b,file=heap1.bin . Note that tomcat is running as a service on windows server. I tried the same on windows xp and no problems there. Any ideas?? Thanks ...

Is it possible to specify which network interface for a JVM ( or IDE ) to use

The situation goes like this, I have two network interfaces in my macbook pro. One is a statically defined Ethernet interface and the other one is a DHCP configured wireless interface. I am trying to figure out how to configure a specific java project to use my statically wired interface only and not simply pick the first one in the lis...

What free JVM implementation has the best PermGen handling?

I'm running Tomcat6 in Sun's JRE6 and every couple deploys I get OutOfMemoryException: PermGen. I've done the Googling of PermGen solutions and tried many fixes. None work. I read a lot of good things about Oracle's JRockit and how its PermGen allocation can be gigs in size (compare to Sun's 128M) and while it doesn't solve the problem, ...

Is it possible to know if a process(Java app.) is waiting in Blocked state on a Receive() call on Linux?

My main purpose is to execute processes one by one in a round-robin fashion until one calls receive() and is blocked, so that the execution switches to the next process in the queue. There is a controller application which is coded in Java and it executes these processes(which are also Java applications) using Runtime.getRuntime().exec()...

how do I explain these *narrow* spikes in jstat output?

When attempting to monitor the performance of a JVM using jstat, I see the following lines - Timestamp PC PU OC **OU** YGC FGC FGCT GCT ... 283.7 132608.0 132304.8 1572864.0 **398734.1** 20 0 0.000 3.061 284.0 132608.0 132312.8 1572864.0 **1547795.2**...

Avoid jvm crash logs

My java app keeps crashing the jvm every time its closed. I think the crashes are caused by a third party dll im using, so i cant fix them. The problem is that a hs_err _pid.log log file is created on every crash, filling the CWD. Can be jvm crash logging disabled? Is there a way to do that from inside the running java app? Thanks! ...

Java app that uses a lot of memory. Use -Xmx?

I have a java app that uses about 15G on a machine with 16G. I don't know if I should set the max heap size. If I set will the jvm eat all the ram up to the limit and then start garbage collecting and stop everything while it churns through 15G or heap objects? If I don't will the jvm hurt performance by not using all of the availab...

what is cross compiler and cross platform ?

I am bit confused with the terms of cross platform and cross compiler. Let me be first clear about the cross platform. When people talk about cross platform it means the architecture of the CPU, i.e, X86 and X64 ? or the OS i.e windows 32 bit or Windows 64 (server or desktop)? UNIX doesn't have different flavours like 64 bit or 32 bit. W...

Can I render to several displays from the same JVM?

I have 4 Java applications rendering some AWT graphics. They all render to different X displays, which we configure at JVM startup time. I would like to have them run from the same JVM. This way, I launch one Java app, and it will open up four screens, which render their stuff to different displays. Is that possible in Java? ...

Sequential execution of java programs == sequential activation of the jvm ?

Hi.... I've a bash script that sequentially calls a java program. That's a bit tricky but mainly what i do is to have a loop and executes about 1500 times the same java program with different arguments. My question is, when using java 1.5 (the sun VM), each time I'm calling the java program a new instance of the jvm is created ? (I'm ...

how to execute a java program on several cores ?

Hi... I had a Java program that I run thousand times based on a loop (according to the number of files to be compiled to build a linux kernel) in a bash script. There was a performance problem since the jvm was started several times... What i've done then is implementing a wrapper in java that does the same as my bash script, reads on...

Interpret something, and run the generated bytecode in Java?

I'm writing a toy interpreter with a REPL in Java. I'd like to generate bytecode from the language and run that, instead of interpreting an AST and running that instead. Since my Java is a bit rusty, is it possible to run generated bytecode on the fly on the JVM? ...

JVM -XX:+StringCache argument?

I was recently reading about all the JVM arguments available in JRE 6 [Java VM Options] and saw this : -XX:+StringCache : Enables caching of commonly allocated strings. Now I was always under the impression that Java kept a pool of interned (correct word?) Strings and when doing something like String concatenation with literals it...

Java error: java.lang.IllegalArgumentException: Signal already used by VM: INT

I am investigating a Java issue (using IBM JVM 1.4.2 64-bit) on Red Hat Linux. I am wondering if anyone has seen this error message before and knows if there is a workaround to this problem? Source: import sun.misc.Signal; import sun.misc.SignalHandler; public class SignalTest extends Thread { private static Signal signal = new S...

Java Refuses to Start - Could not reserve enough space for object heap

Background We have a pool of aproximately 20 linux blades. Some are running Suse, some are running Redhat. ALL share NAS space which contains the following 3 folders: /NAS/app/java - a symlink that points to an installation of a Java JDK. Currently version 1.5.0_10 /NAS/app/lib - a symlink that points to a version of our applicatio...

How does the JVM ensure that System.identityHashCode() will never change?

Typically the default implementation of Object.hashCode() is some function of the allocated address of the object in memory (though this is not mandated by the JLS). Given that the VM shunts objects about in memory, why does the value returned by System.identityHashCode() never change during the object's lifetime? If it is a "one-shot" ...

Any bugs or incompatibilities in 64 bit JVM?

Hi guys, I've got a little game that a friend and I are writing in Java. It's kind of badly coded and we're working on refactoring it, but that's not really the issue right now. We both have 64 bit machines and I guess before we were both using 32 bit JDKs, but recently I had some problems and so I removed all JDKs and installed the lat...

Native code execution by JVM/CLR

How does JVM/CLR execute JIT compiled native code? Is it by some code injection or by copying code to executable memory? What are the system calls that allows dynamic code execution? ...

cross platform settings directory

Hi I am making a jython application that needs a config/settings file (and probably eventually directory) but I want it be stored in the expected/correct directory for each os. ~/.app_name/config in linux c:/documents and Settings/User/app_name ?? in windows. I have found this: http://snipplr.com/view/7354/home-directory-crossos/ b...