why jvm crashes if I invoke GC every 20000 allocations

623 byte By terryxiana at 2007-10-2 17:09:52
I am doing a project related to object's lifetime. I modified JVM code to force it to do garbage collection every 20000 allocations (i.e., every 20000 objects have been allocated). In my code, I used a global variable total_objs to track how many objects have been allocated so far. I added the ...

Java HotSpot Crashes while printing

20176 byte By ono_banda at 2007-10-2 17:10:44
Hi,I have been having this problem since a long time and I am unable to find a proper solution nor explanation to this behaviour. The JVM seems to crash whenever I try to print through my java application. The crashing is not predictable. Sometimes it crashes right after I submit the first ...

Help Solve This Mystery

390 byte By 1972veta at 2007-10-2 17:11:11
Yesterday morning I found a Note Pad text file on my Desk top. The file was for an error report from Java Virual Machine. The mystery is, I don't have Java Virual Machine installed on this computer.Can anyone tell me how it got there? I'm a little more than just concerned.It's really a bit ...

HotSpot Crash

450 byte By mikeg1za at 2007-10-2 17:12:01
Hi,Trying to get a simple String parameter from native to Java. As long as I don't access the passed parameters it works fine. As soon as I relate to the parameter (a String, trying to print it) I get the following exception:EXCEPTION_ACCESS_VIOLATION <0xc0000005)>at pc=...Java VM: Java ...

Wildcards in Classpath for JNI-Calls

238 byte By Ludwiga at 2007-10-2 17:14:18
Is it possible to use wildcards in the classpath for KNI-Calls?I would like to use wildcard for jni-calls like for normal java-calls (java -classpath *.jar ...), but it is not working.JDK version is JDK 1.5.0 on Win32

JVM scheduler

197 byte By bribusa at 2007-10-2 17:14:34
Hi,I'am looking for JVM scheduler documentation.I couldn't find anything on java.com but i guess it exists, so can anybody provide some links please?Thanks in advance.

Lowering memory usage

913 byte By xardiasa at 2007-10-2 17:17:06
Hello,I am trying to run some Java Applications at a Linux Virtual Server. This Virtual Server limits virtual memory to 512MB using SWSofts Virtuzzo, so I cant use more than 512MB and it does not matter if that data is swapped or not. Starting a new Simple Hello World program that creates a ...

JNI - Returning value via output parameter

808 byte By kn1976a at 2007-10-2 17:17:52
Hi-I have a piece of java code that looks like this:public static String addMe(Double a, Double b, Double result) {result = new Double(a.doubleValue() + b.doubleValue());return "Addition worked!!";}As you can see I want to return the result of the function as a function parameter and have the ...

How to compile a DLL with Visual C++ Express 2005?

563 byte By gcsaba2a at 2007-10-2 17:19:39
Hello,I'm trying to create a simple Hello world dll. I have one method which returns a stirng, and this should be printed out by the Java class. This is the C++ code:#include <jni.h>#include "stdafx.h"#include "MyLib.h"JNIEXPORT jstring JNICALL Java_Test_getWord Java_Test_getWord(JNIEnv ...

increase the java virtuel memory

81 byte By sami.bouhraouaa at 2007-10-2 17:20:50
what is exactely the line command in jdk 1.5 use to change the memory size

out of memory error

121 byte By sami.bouhraouaa at 2007-10-2 17:20:52
i use a Vector contain a lot of records the message out of memory errorapears how i can solve this problem.

Loading image from dll

363 byte By pasion_of_christa at 2007-10-2 17:22:55
Hello,I have created a software and lot of images used in this software. I want to bind all images in a dll. As microsoft binds card's images in cards.dll. After binding i want to use them. How can i access them from a dll. I know how to write a dll in java and how to use its methods but how ...

Impossible to have two or more concurrent native threads against a JVM ?

1497 byte By Colma at 2007-10-2 17:24:43
I have a C++ program that needs to create and call Java objects. I want it to have a single JVM that threads can attach to and detach from as needed. However, I'm having trouble seeing how multiple threads can be concurrently active with the same JVM. What it really boils down to is which ...

[JVM][PROGRAM]Have a singleton of an application

180 byte By indiana_julesa at 2007-10-2 17:25:54
Hi everyone,sorry for my french accent. I would like if it's possible to have only one process of my program which turn on the system ?Thanks for your answers

JAWT Problem

785 byte By dega512a at 2007-10-2 17:26:05
I was told to put this here, so here it is.I have been trying to use JAWT (AWT Native Interface) and I keep getting an error (even when I try the examples that are in the api). When I call the JAWT_DrawingSurface lock method (locking a canvas) it always returns with JAWT_LOCK_ERROR. Does anyone ...

How to debug the method implemented in C using JNI?

275 byte By nasrin.na at 2007-10-2 17:26:13
Hi,I need to debug java program where a method is implemented in C using JNI. How can I debug the C code? I am using eclipse to debug java code, is there any way to debug the method which is implemented in C using JNI?Thanks & Regards,Nasrin.N

Diiferences between bin/client/jvm.dll and bin/server/jvm.dll

368 byte By gregdeba at 2007-10-2 17:26:33
Hello,A basic question about the jvm.dll library : I can't find any document explaining the difference between bin/client/jvm.dll and bin/server/jvm.dll both locatedin the j2sdk directory.Therefore, I don't really know which one I should use with tomcat run as a service.Thanks for your help ...

Tuning GC on high volume server

4033 byte By andreinsa at 2007-10-2 17:27:34
We are running Sun Fire T2000 with 32 processors, 16Gb total and 9Gb as java heap.At the moment we are trying to tune GC to reduce the pause time.Unfortunatly, we still are not able to model 'real behaviour' on our test server.All tuning is done on the production server, so we can't easly ...

Setting objects to null in finally block

171 byte By kiranraja at 2007-10-2 17:27:37
Hi All,Will it help the performance/memory management if the objects/Strings are set to null in the finally block?Please help.Thanks,Raj

i am trying to read JDBC Type IV Driver from web.xml getting NullpointerExc

441 byte By AnanthaReddya at 2007-10-2 17:28:36
hi all,i deplyoed my web app into tomcat/jboss, i am reading dirver,url,user,pwd from web.xml, when running app it is giving NullPointerException, Not Recognising Type IV Driver, i made sure to set the class path, classes111.zip in sys env variable, i am using tomcat 4.x, jdk1.4.2. what are the ...

hWnd and Swing components

2061 byte By FKAMattHHDEa at 2007-10-2 17:29:06
Hello is there a way to get a hWnd for a JTextField? I need this handle because i have to assign the IME to it for working with eastern asian languages.So far i found this code:JNIEXPORT jlong JNICALL Java_com_philips_ime_adapter_IME_getHwnd (JNIEnv *env, jclass clazz, jobject obj) {typedef ...

Passing jobject from java thread to another Java thread

622 byte By safira at 2007-10-2 17:29:58
I believe the jobjects can be moved from time to time. What is probably happening right now that causes occasional crashing is that the jobject is moved after i pass it in as a parameter from 1 java thread to another in JNI. I guess one way to deal w/ this is to DisableGC from JVMPI or JVMTI. ...

JConsole problem

650 byte By artfuldodgera at 2007-10-2 17:30:39
I ran the following commands:JDK_HOME/bin/java -Dcom.sun.management.jmxremote -jar JDK_HOME/demo/jfc/Java2D/Java2Demo.jarwhere JDK_HOME is the directory containing the JDK 5.0. The Monitoring and Management Using JMX document provides detailed information on out-of-the-box remote management. To ...

JVM Tuning... getting rid of SawTooth in the memory graph.

4782 byte By soleSurvivora at 2007-10-2 17:31:34
Hi,I am currently investigating high CPU usage in my application. During certain times of the day the App sends out thousands of mails to the users. And during these peak times, the CPU usage is very high.In the course of this, I was monitoring the Weblogic server using the Admin Console's ...

Forcing a Full GC

871 byte By 2old24thisa at 2007-10-2 17:31:46
We have an application that runs on a BEA Weblogic 8.1 application server. JVM is set as follows -Xms512K -Xmx1024K -XMaxPermSize 256KA minor GC runs about every 10 minutes and takes a fraction of a second. Our problem is that the application appears to hang every few days. The heap is usually ...

JVM crash, how to found the hs_err_pid<*>.log file?

237 byte By winner@cna at 2007-10-2 17:31:48
Hi, My app is often stopped abruptly and the JVM is crashed. But I can't found the error log file(hs_err_Pid*.log) on my computer. Is there no hs_err_pid*.log files generated? How to generate this file? Please help me, thank you?

To know about the tsr in java

195 byte By mhasan_mitula at 2007-10-2 17:31:49
Hi I am a novice in java world. I am very excited to learn tsr programming in java. I do not know wether it is possible or not in java. If it is possible please any one can help me.

Hotspot crashes

704 byte By paritoa at 2007-10-2 17:31:58
Hello I have installed j2sd4_1.4.2.11 on linux machine : Here's the details: OS:Mandrake Linux release 10.0 (Official) for i586uname:Linux 2.6.12 #1 Sat Jul 9 21:38:32 GMT 2005 i686libc:glibc 2.3.3 NPTL 0.60 Java was running fine ..Two days ago, i encountered crashes when i ran simple ...

tools.jar was unexpected at this time.

706 byte By camin001a at 2007-10-2 17:32:36
Hi People,I recently made some changes in my DEV. environment. An I am getting the following error when I run jboss, i.e. run.bat.\Java\jdk1.5.0_06\lib\tools.jar was unexpected at this time.I am running WindowsXP 64 bit on a Sun Ultra 20 Workstation. I had to switch from jdk1.5.0_06 64bit to ...

Uploading about 2GB file into database

318 byte By Ashvina at 2007-10-2 17:33:34
Hello,I want to upload a file of about 2GB size in the database. I am working on Struts framework and with Postgres8 and Oracle8i as database. When I try to upload it through my application it throws "Out of heap memory" error.Can anyone help me out to solve the problem? Thanks in ...

why tableswitch requires more than constant-time?

2392 byte By allexa at 2007-10-2 17:34:08
http://jroller.com/page/allex?entry=why_tableswitch_requires_more_thanEveryone knows that there is effective implementation of switch like this:public void switching( int l ){switch( l ){case 0: m0(); break;case 1: m1(); break;case 2: m2(); break;case 3: m3(); break;case 4: m4(); break;case 5: ...

Why sun would hava done ->Stack extends vector

216 byte By RajenderReddya at 2007-10-2 17:36:53
The Stack class behavior is LIFO ,but it is extending the Vector then the stack is losing its behavior why sun would have done this.Is there any reason behind this.Thanks in advRegardsRaju

Garbage collector management.

430 byte By amauryxiva at 2007-10-2 17:39:26
Hi everybody.I'm working with the JDK 1.5.I'de like to know if it's possible to do so that the garbage collector works less often. I mean I'd like that the garbage collector frees the memory only when it's really necessary (when the memory's full).Is there a way to do that ? I heard about ...

How can I know the relative lifetime of two objects?

773 byte By Sunny_Daya at 2007-10-2 17:40:22
Dear Folks,I am struggling to find a solution to obtaining the relative lifetimes of runtime objects. For example, in a composition design pattern (whole-part relationship), it requires that the whole object must destroy all its parts before it destroys itself. Now how can I know, given two ...

URGENT- How to Sleep() in the Native code

570 byte By amitsax76@yahoo.coma at 2007-10-2 17:40:30
Hi,In my C++ Native function i call ::Sleep(). This makes the appliation to crash sometime with some "" exception_voilation_error".Perhaps this is due to ::Sleep is a C++ function and if the current java thread gets a interrupt/notification then may be Thread.sleep() is expected instead of ...

A efficient way to convert strings to integers...

436 byte By Zapcomea at 2007-10-2 17:40:47
Hello everybody...I was wondering if there is a way to convert a string into an integer ... but without using Integer.parseInt()... parseInt is very slow in performance, and since I have to read a file that contains millions of integers (read them as string, and then convert them to integers) ...

important to know

99 byte By thomasa at 2007-10-2 17:41:55
hi friends i know java do not have sizeo operator.then how can i find the size of a datatype

Looking for help maintaining JACE

430 byte By cowwoca at 2007-10-2 17:42:51
Hi,I'm looking for help maintaining an open-source project called Jace: http://sourceforge.net/projects/jace/I maintain the Windows port and I am basically looking for someone to help by supporting the Unix end of things. I would like to release Jace 1.1 soon but the Unix port is out of sync ...

simple question here

124 byte By alex1987a at 2007-10-2 17:43:43
Can anyone tell me what is an API?do i need to know them before i can test my application on an pda emulator ?

can java code be called?

126 byte By sowmiya_jerrya at 2007-10-2 17:45:33
Can method written in java be called from a method written in c++?. that is c++ program can call a java method and how?

Java Annotation

201 byte By cracka at 2007-10-2 17:45:48
HiFew days ago I have found a new feature in java which is Java Annotation. I want to know about the java annotation. If any one know anything about this please reply as soon as possible.

DLL which creates a COM+ problem

5539 byte By gcsaba2a at 2007-10-2 17:48:27
Hello,I have a simple Java class with one native method, which returns a String. I've created the DLL with C++ .NET, and in case it returns a simple "Hello world", the application works.The problem is I need to create a COM+ object, and call its function. But the JVM breaks down even before ...

Differences in JVM memory management in 1.4.2 and 1.5?

474 byte By m9wonga at 2007-10-2 17:50:07
Hi all,We have developed some code calling a third party dll through JNI. The code runs fine on jre 1.4.2. When we test in on jre 1.5, the dll is giving us a heap memory exhausted message. We have set -Xmx to 1024m due to performance issue. If we lower -Xmx from 1024m to 912m, then the program ...

Thread.stop()

981 byte By abhijitga at 2007-10-2 17:50:47
Hi,I am using the JDBj APIs provided by JDEdwards tool to connect to its database. All the API work successfully but I am having problems due to some threads getting created automatically when the connection is established using the API. Because of these threads the JVM is not getting ...

JDk1.5.0_06 and -XX:SurvivorRatio Option

455 byte By MinChanga at 2007-10-2 17:52:16
Hi.I am using JDK1.5.0_06 and Tomcat5 to develop a web service and I have wanted to tune our webservice using JDK options as below.-server -Xms1024m -Xmx1024m -XX:NewRatio=2 -XX:SurvivorRatio=1 However, when I inspect the generations via jconsole, only the NewRatio seems to be taking effect, ...

JVM ending with strange message

541 byte By rimtimtima at 2007-10-2 17:54:53
Hi!I've developed a java program that will run for about 5 days and produce a large quantity of data (the DB will be around 60 GB when done). The thing is that it stops running after 1 day or so and just send out the message "Morto" (meaning "dead"). Does anyone know why this is hapenning?The ...

JVM maximum heap size setting allowed on windows with Xmx

139 byte By abu_zubayra at 2007-10-2 17:55:10
What is the maximum heap size setting allowed for a single JVM on windows platform with Xmx parameter?Thanks.Ashfaque.

sorting a collection of any type object

2935 byte By nookersatyaa at 2007-10-2 17:57:13
hi all, I had to show a list in sorting order, ofcoursce that can be done by, Collections.sort(collectionObj);the 'collectionObj' will be sorted in lexical order if it contains String Objectbut what if the collectionObj contains 'Myclass' Objects MyClass{FIrstName;LastName;Middle; String ...

setting classpath

84 byte By RajenderReddya at 2007-10-2 17:57:14
How to set classpath if there is a n no of .jar filesThanks in advance

GC time doubles in 1.5 and doesn't happen in 1.4.2 with same heap settings

2709 byte By sudeeboya at 2007-10-2 18:00:18
I have an application which runs in 1.4.2 and 1.5.0_05 JVM. Below are my heap settings which is same in both the versions.-Xms2048m -Xmx2048m -XX:+PrintGCDetails-XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=64m -XX:+UseParNewGC -XX:ParallelGCThreads=4 ...