jvm

How does the Sun JVM map Java threads to Windows threads?

My application uses loads of Java threads. I am looking for a reliable understanding how the JVM (version 5 and 6) maps the Java threads to underlying Windows threads. I know there is a document for mapping to Solaris threads, but not Windows. Why doesn't Sun publish this information? I want to know if there's a 1:1 mapping, or if it v...

Changing java version

hi, i have a server - client application that runs on java 1.3; i want to change to java 1.6 step by step, meaning first few clients, than rest of the clients and finally server... i was wondering could you direct me to some common problems that can come along and what should i look after? ...

How can I monitor the active thread count of a process (jvm) on linux ?

I would like to monitor the number of threads used by a specific jvm process on linux. Is there an easy way to get this information without impacting the performance of the jvm process. More specifically I am interested in the number of threads per state. ...

Are invisible references still a problem in recent JVMs?

I was reading Java Platform Performance and section A.3.3 worried me. I had been working on the assumption that a variable that dropped out of scope would no longer be considered a GC root, but this paper appears to contradict that. Do recent JVMs, in particular Sun's 1.6.0_07 version, still have this limitation? If so, then I have a l...

JVM Launched via CreateProcess() Loses Classpath Library

I launch the following command line (process) from a Windows VC++ 6 program using CreateProcess (or _spawnv()): java -cp c:\dir\updates.jar;c:\dir\main.jar Main and class updates in updates.jar (overiding some in main.jar) are not read or found. It is as if the updates.jar library cannot be found or read. If I launch the same line ...

How to tune Tomcat 5.5 JVM Memory settings without using the configuration program

I need to configure Tomcat memory settings as part of a larger installation, so manually configuring tomcat with the configuration app after the fact is out of the question. I thought I could just throw the JVM memory settings into the JAVA_OPTS environment variable, but I'm testing that with jconsole to see if it works and it... doesn't...

Groovy advantages over Jython or Jruby?

Why would I choose to use Groovy when I could use Jython or Jruby? Does the language provide any inherent advantages to make up for the fact that Jython and Jruby skills are applicable to their parent languages outside of the JVM? Keep in mind that I purposely keeping this question generic, but if there are any advantages that exist in...

General Question: Java has the heap and local stack. Can you access any object from the heap?

I was really looking at the differences between pass by value and how Java allocates objects and what java does to put objects on the stack. Is there anyway to access objects allocated on the heap? What mechanisms does java enforce to guarantee that the right method can access the right data off the heap? It seems like if you were cra...

Which library/program can be used to generate Java-bytecode?

I know about BCEL, but this project seems to be dead, as it had no releases for two years. And the Java-world moves on. For example JDK 1.6 has a new class-file-format. So what library can be used to create bytecode for the JVM. If no library, a program is ok too, if I can manipulate the generated code in detail, for example a bytecode-...

How to use generics in a world of mixed Java versions?

I like generics a lot and use them whereever I can. Every now and then I need to use one of my classes in another project which has to run on an old JVM (before 5.0), needs to run on JavaME (where generics are not allowed neither) or in Microsoft J# (which has VERY poor Support for generics). At the moment, I remove all generics manuall...

Are there problems developing Django on Jython?

The background I'm building a fair-sized web application with a friend in my own time, and we've decided to go with the Django framework on Python. Django provides us with a lot of features we're going to need, so please don't suggest alternative frameworks. The only decision I'm having trouble with, is whether we use Python or Jyth...

J2ME development without Java?

I'm making my first foray into the J2ME world. I'd prefer to use a functional language to do the development. Scala used to have CLDC support, but it's no longer maintained. Bigloo seems to have disappeared. Interpreters (such as Jython) are a no-go, since J2ME apps have to be small (at least, mine has to be). I would like to know of ...

Updating from Java VM 5 to 6 gave a really big increase of memory consumption

Hi, I've be working with a Java application run through the command-line. It deals with XML files, specially the dblp.xml database which has more than 400MB. I was using JVM 5 and my app needed sort of 600-700MB of memory to processe the dblp.xml. After updating to JVM 6, it starting needing more than 1gb of memory (something I don't h...

Putting JVM arguments in a file to be picked up at runtime

I'm building a jar of my current application, which required several JVM arguments to be set. Is there a way of setting these JVM arguments in a file rather than on the command line? I've done some hunting and it looks like I might be able to do something witha java.properties file, possibly by setting a java-args, but I can't find any...

Accessing non top-level class without a top level class in java

I have a java file TestThis.java like following: class A { public void foo() { System.out.println("Executing foo"); } } class B { public void bar() { System.out.println("Executing bar"); } } The above code file is compiling fine without any warnings/errors. My question is that is there any way ...

MySaifu JVM and BlueCove API on an iPAQ

Hey everyone, Having a bit of an issue running BlueCove on my iPAQ (h5550). I installed MySaifu JVM and added the BlueCove jar library to the classpath, but whenever I try to run the tester jar or any other files that reference the BlueCove API, I get class not found exceptions. Anyone had the same issues? I know from the BlueCove docu...

caching a tar inside jvm for faster file I/O?

Hi, I'm working on a java web application that uses thousands of small files to build artifacts in response to requests. I think our system could see performance improvements if we could map these files into memory rather than run all over the disk to find them all the time. I have heard of mmap in linux, and my basic understanding of...

Can I force generation of a JVM crash log file?

The log file from a JVM crash contains all sorts of useful information for debugging, such as shared libraries loaded and the complete environment. Can I force the JVM to generate one of these programmatically; either by executing code that crashes it or some other way? Or alternatively access the same information another way? ...

Understanding the the Sun JVM

Hi Guys I'm looking for some useful looks for a beginner who wants to better understand the Sun JVM Thanks ...

Java bytecode specification.

Is there a nice place for learning the JVM bytecode instruction set. The specification perhaps and maybe some tutorials? I ask because I would like to design a toy language and a compiler for it that generates JVM bytecode. Thanks for your knowledge and perhaps googling. ...