jvm

Are there any Java 5 VM for embedded environments?

Hi, for a project that targets embedded systems (such as a NAS) I am looking for an embedded Java VM that would support Java 5 and up. Currently, Java 1.4 is supported by VM like IBM's J9. But since Java 1.4 has reached its end-of-life I would be interested whether there are alternatives available, open source or commercially. Any idea...

Verify integrity of JAR files necessary?

I have a zip file containing a number of jar files that is being downloaded from an HTTPS site. The jars form a command line driven, server side application. I have a Java written application installer that does some checks to verify that the jars are signed using a particular trusted digital certificate and have not been modified durin...

Best books on JVM

Every good Java developer (well.. any developer) has his own list of the best books on each technology. Like: Core Java — "Thinking In Java" B. Eckel, "Core Java" K. Horstmann; Advanced Java — "Effective Java", "Java Puzzlers" J. Bloch; Code Style — "Code Complete" S. Mcconnell; Design Patterns — "Design Patterns: Elements of Reusable ...

Will installing different version of JRE in one server causes instability?

I am writing a java program using JAVA 6. Our company server is using JAVA 5. They refuse to upgrade it to 6, so the workaround would be install another JRE 6 inside the same machine. They wonder, will installing different version of JRE causes instability? What the installation process do? Simply copy over the files and setting up envi...

Is there a way to get which classes a ClassLoader has loaded?

I am trying to implement some unit testing for an old framework. I am attempting to mock out the database layer. Unfortunately our framework is a bit old and not quite using best practices so there is no clear separation of concerns. I am bit worried that trying to mock out the database layer might make the JVM load a huge number of clas...

Maximum Java heap size of a 32-bit JVM on a 64-bit OS

The question is not about the maximum heap size on a 32-bit OS, given that 32-bit OSes have a maximum addressable memory size of 4GB, and that the JVM's max heap size depends on how much contiguous free memory can be reserved. I'm more interested in knowing the maximum (both theoretical and practically achievable) heap size for a 32-bit...

Differing behaviour between Java 5 & 6 when overloading generic methods

I've run into an issue in Java's Generics in which the same code will compile and work fine in Java 6, but will fail to compile because of the same erasure in Java 5. I have a file TestErasure.java that has an overloaded method, called "method": import java.util.ArrayList; import java.util.List; public class TestErasure { public stati...

Increase JVM heap size for Scala?

I have a Scala data processing tool which is failing with a java.lang.OutOfMemoryError exception. The tool needs to make a couple passes over a large data file (the one I'm working on is over 700MB), so it would be convenient if the entire thing could be stored in memory. I run the tool from the command line or from a Bash script using ...

What impact, if any, does the -d64 swtich have on Sun JVM resident memory usage?

I've got this webapp that needs some memory tuning. While I'm already profiling the application itself and trimming things down, the JVM itself seems overly bloated to me on our busiest instance. (The lower volume instances do not have this problem.) The details: Platform: RHEL4 64-bit (Linux 2.6.9-78.0.5.ELsmp #1 SMP x86_64) Sun J...

JVM throws OutOfMemory during gc though there are plenty memory left...

I have my java application configured to use 5G memory. I got an OutOfMemory out of blue. I inspected the gc log and found plenty of memory left: young generation occupies 4% allocated space, tenure generation occupancy is 5% and perm generation is 43%. I am puzzled why JVM throws an OutOfMemory at the gc time. Does anyone know why this ...

Fail-safe way of round-tripping JVM byte-code to text-representation and back

I'm looking for a fail-safe way to round-trip between a JVM class file and a text representation and back again. One strict requirement is that the resulting round-tripped JVM class file is exactly functionally equivalent to the original JVM class file as long as the text representation is left unchanged. Furthermore, the text represen...

PermGen problems with Lift and Jetty

I'm developing on the standard Lift platform (maven and jetty). I'm repeatedly (once every couple of days) getting this: Exception in thread "7048009@qtp-3179125-12" java.lang.OutOfMemoryError: PermGen space 2009-09-15 19:41:38.629::WARN: handle failed java.lang.OutOfMemoryError: PermGen space This is in my dev environment. It's not ...

I have never seen a software be released as jar, so how can I make a software be released as exe too?

Is everybody thinking that everybody else doesn't release softwares as jar and then releases softwares as exe too? ...

Is there a good GnuPG encryption library for Java/Scala?

I would like to be able to encrypt files on disk and/or data in memory using GnuPG from a Java application. If possible I'd like to avoid having to make system calls out to the GPG command line tools. Is there a recommended library, or can you recommend the best approach to GPG encrypting from Java (or Scala)? I'm developing and inten...

Passing environment variables to a JVM, in a platform-independent manner

I'm developing a J2EE application that runs in JBoss on a Windows Vista machine, but the application will end up on a Linux machine. Is there a way to pass in the value of an environment variable in a platform independent way? I think (but I'm not sure) the platform-sensitive way would be: -Denv_var=%MY_ENV_VAR% (Windows) -Denv_var=$MY...

Sun VM options

hi, what is Sun VM's equivalent option to IBM VM's -Xcheck:jni:alwayscopy ? ...

Is Java bytecode compatible within different updates of the same version of Java?

Hello, this question is related to the the other topic discussed here: http://stackoverflow.com/questions/1266940/is-java-bytecode-compatible-with-different-versions-of-java but in this case would like to know whether compatibility is preserved within the same version but on different updates. For example, is bytecode generate by the com...

Java Expression Trees

Is there an equivalent of .net's Expression Trees that underly LINQ for the JVM? I would like to implement some LINQ like code structures in Scala and I am wondering if I have to roll my own expression tree library also. Update: I am not interested in a linq equivalent itself. .net has a large set of expression tree tools that make it e...

Restrictions on what an unsigned Java applet can do?

I'm trying to compile a complete list of all restrictions placed on unsigned Java applets (defined as things a normal Java application can do, but an unsigned Java applet cannot). This is the list I've compiled so far: An unsigned Java applet ... Cannot access the local filesystem. Cannot access the system clipboard. Cannot initiate ...

How should I tackle with "Program Crashing" issues?

Hi, I am working on a Java product. An client claims that the application is getting crashed after an arbitrary time. SInce it is a crash we can't find any information on our logs. Are there any tools, methods to find out the reasons for such Issues? Can we do anything in code side to get more information on such program crashes? Can ...