Need advise on GC tuning for large heap size application

1347 byte By girirajvenga at 2007-11-26 14:54:01
We have a java application that runs on AMD 64 bit Opteron Win 2003 SP1. It is configured with -Xmx = 8192M (64 bit JDK 1.5_08)The other JVM options are :-Xms4096m -Xmx8192m -XX:MaxPermSize=256m -Xmn1024m -XX:SurvivorRatio=1-XX:SoftRefLRUPolicyMSPerMB=1 -XX:+UseConcMarkSweepGC ...

Maximum Heap Size in Java 5

416 byte By cpnma at 2007-11-26 15:00:37
When migrating an application from JDK1.4.2_12 to JDK1.5.0_10,it was seen that the max. heap size that was set using -Xmx had to be reduced from 1.5 GB to 1.3 GB on a win32 machine inorder to create JVM successfully. Any pointers to what in Java 5.0 could have brought about this change is ...

Determining where jvm.dll is + extensive CPU usage

764 byte By bavardagea at 2007-11-26 15:02:39
Hi,I am trying to create a JNI wrapper for my java application. I have reached the stage where I can launch the program, providing I have the path to jvm.dll in my path variable.I was wondering if there was any way to determine this path at runtime, seeming as it is highly unlikely anyone using ...

The Java Runtime Environment cannot be loaded

317 byte By The_barda at 2007-11-26 15:04:27
When viewing my website I get the above message. I click on ok, go into the site, but when changing pages I get the following "several java virtual machines running in the same process caused an error". On other computers there is no problem. The website was developed using Serif WebPlus 10 on ...

When we run applets, how many JVM will run in our OS

284 byte By chimaea at 2007-11-26 15:05:59
When we run applets belong to different pages, how many JVM will run in our OS.For example, there are two internet pages, each page embed one applet. When we use browser to access these pages simultaneously, how many JVM will run in our OS.Thanks!Alexander

Single instance in JVM

104 byte By pankajsinghsachana at 2007-11-26 15:06:44
Hi,How can i check that a particular type of object is live in JVMthanks in advance

Multiple processes under linux

384 byte By xccarlssona at 2007-11-26 15:07:13
If I run Java programs under Suse Linux 9.0 using JDK 1.5.0_09 for every started Java programm I can see 9 processes running under linux.It seems like one of them is the master and the others are child processes of this one.I've never seen this with other Linux / Java versions before. Could ...

call existing C apliction from java

481 byte By dollyna at 2007-11-26 15:07:31
hi all,I try this http://java.sun.com/docs/books/tutorial/native1.1/stepbystep/index.html for JNI. we need to write the native method implementation in such a way that the method signature should exactly match the method signature created in the header file.i want to provide interface to ...

how to get MS Access report into Java by JNI

294 byte By Isaaka at 2007-11-26 15:08:06
hi,I am new to JNI and I need to know how could I get MS Access report data in my application. Specially, I am having difficulties in C coding part. I read API documentation and tutorials about JNI, so if you know where could I read about this topic send me that too.thanks

Call Java from c - makefile question

2361 byte By Rayvena at 2007-11-26 15:09:46
I am trying to call a Java jar application from my C code#include <jni.h>JavaVM *jvm;JNIEnv *env;JavaVmInitArgs vm_args;JavaVMOption jvm_options[4];jclass esmClientClass;int initJVM( char *classpath, char *libraryPath ){int result;char clsPath[256];char libPath[256];sprintf( clsPath, ...

Getting too many elements from GetLongArrayElements

1618 byte By joejaga at 2007-11-26 15:13:59
HI,I'm trying to use a Java double array from within C based JNI code.double[] array = {1, 2, 3, 4}In the JNI code I am using:jboolean isCopy = JNI_TRUE;long* someArray = (long*)(*env) -> GetLongArrayElements (env, javaArray, &isCopy);printf("%i \n",someArray [0]);printf("%i ...

Everyone know this but me

117 byte By jbayugaa at 2007-11-26 15:16:00
Okay i need to check if there is atleast one digit in a string.. how do i do that? Sorry im a noob!null

Invocation API and Cygwin

4328 byte By caffeinea at 2007-11-26 15:17:59
I wrote C++ code that creates a JVM and calls existing Java code.It compiles fine under VC++'s command linecompiler (cl.exe), but I'm having trouble making it compile and link under cygwin's g++.On my system, Java is installed in C:\Java\jdk1.5.0_10.CompilingHere is a typical compile from my ...

JNI segmentation fault

819 byte By miroslav_simkoa at 2007-11-26 15:18:17
Hello, I have problems with JNI. I have method for solving large system of linear equations, written in C++. This is called within java via JNI. When I call this method with little system (say 2-3thousands of equations), I recieved correct result.When I call the method with higher number of ...

calling java program from makefile with Xmx2G argument

842 byte By miroslav_simkoa at 2007-11-26 15:18:21
Hello,a have makefile with one target, which runs java program. all:java -Xmx2G -cp ./numerika_java/classes/ numeric.fem.vector.ElementVectorStaticWhen I run the program with -Xmx2G 'manually' from command linejava -Xmx2G -cp ./numerika_java/classes/ ...

Build JDK from sources with precompiled headers under linux ?

425 byte By Passea at 2007-11-26 15:18:23
Hi everyone,I would like to build the latest JDK (1.6) from sources on linux, but I'm experiencing this bug : http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6469784Apparently, I have to build hotspot with the precompiled headers. I googled a lot but didn't find anything about precompiled ...

Pls help me to make a JNI project

228 byte By julu01169a at 2007-11-26 15:19:58
Hello all,Please any one tell me How to make a project using JNI. If any one having any small project regarding JNI concept ,pls forward me.and PLs help me how to run the jni project.Thanx julu

JNI general rules

674 byte By frostywintersa at 2007-11-26 15:23:41
Hello there,I am using the JNI to access a library written in c. And i just have two small questions.If i give my JNI method arguments such as a jint do i have to explicitly delete this in the c code?Ok now if my method in c code creates a jintArray do i have to explicitly delete this ...

Variable scope efficiency

1324 byte By bmearns@coe.neu.edua at 2007-11-26 15:24:29
I realize similiar questions have been asked elsewhere in the forums, but all the answers I'm seeing are "I think..." and "I would assume..." and things of this nature. I'm looking for a concrete answer from someone with a solid understanding of how the JVM works. The question is this: If an ...

JNI and static links?

637 byte By Sakraga at 2007-11-26 15:25:47
I am attempting to create a jni library that contains a static link to another library. It compiles correctly and it works fine through any other language however when java attempts to load it I receive a Invalid access to memory location exception upon load. This happens with all jni libraries ...

NewObjectArray--java.lang.OutOfMemoryError: Java heap space

1602 byte By mebberta at 2007-11-26 15:26:12
Hi,I have been working on an application where I need to get data from a C++ object. Thus far I have had java call into the native code to extract it, but found that the design would be better to have C++ send the data to java when it deems appropriate. My problem is that now that I am having ...

Why JVM5 is slower in Linux than in Windows?

1291 byte By dislimita at 2007-11-26 15:26:53
Hi, all:It really surprised me that Java code runs much faster (at least for not so largeprogram) in Windows than in Linux.Recently I tested the speed of part of my learning package, whose task is toparse a 10MB (about 210,000 lines) text file to extrace some figures ,discretize them and put ...

NewDirectByteBuffer() & java.nio.ByteBuffer

882 byte By robyfFa at 2007-11-26 15:28:05
Hi All,I'm developing an application which uses the JNI interface to embed theJVM to a C application. So my problem is, I would like to "map" some C structin the Java VM and that isn't a problem currently since I use the NewDirectByteBuffer() JNI call to allocate a ByteBuffer for a given ...

Problem loading shared-library

3483 byte By JanOrtnera at 2007-11-26 15:29:24
Hi,I wrote a Java GUI using JNI to interface a C++-library. On my primary system -Gentoo 64-bit with an Athlon64 processor- everything works fine. Actually, it should run on a Solaris system. As the C++ library is supposed to run on a 64-bit system, I installed the Java 64-bit edition on the ...

(HelP)got an unsatisfiedlinkerror when using the jni

4139 byte By jasoncuia at 2007-11-26 15:34:06
I am now working on a jni project and get the unsatisfiedlinkerror. But after I browse this forum, I do not get any useful information. my java code://package graphmining.cliquer;public class WClique {/** * @param args */public static void main(String[] args) {// TODO Auto-generated method ...

Error in simple JNI project

356 byte By Isaaka at 2007-11-26 15:34:52
hi,I am new to JNI and I am trying a simple HelloWorld project but I am getting the following exception :Exception in thread "main" java.lang.UnsatisfiedLinkError: displayHelloWorldat HelloWorld.displayHelloWorld(Native Method)at HelloWorld.main(HelloWorld.java) where comes my error ...

java-code returns char-array to c++

669 byte By XMAS1000a at 2007-11-26 15:35:50
Hello,I have a problem with return a char[] from a java method to the native c++-code.The code looks like this://in java public static char[] draw( int j,int i){ char[] myc = new char[100]; ... return myc; }//in c++jmethodID mid;jchar jarr;mid = env->GetStaticMethodID(cls, "draw", ...

Call existing C application from JAVA

383 byte By KarthikRajua at 2007-11-26 15:36:52
Hi,I am having a C Shared Library. This dll is an existing C application thats already developed, tested and produced. I don't have access to the source code. I can't write appropriate JNI functions. I want to call those C functions from JAVA. How can I do it?As I am beginner in JNI, a step ...

Memory Leaks

635 byte By frostywintersa at 2007-11-26 15:37:31
Hey all just another quick question,If i do something like the following in my C code do i have to explicitly free it to stop memory leaks?Here is an example of my code://Create a jintArrayjintArray = sally;int sally_size = 3;sally = (*env) -> NewIntArray(env, sally_size);//Populate my ...

the memory problem

395 byte By jasoncuia at 2007-11-26 15:39:02
Hi All,I am running a jni program, where my program will call a .c file. I see the .c file sets an array "int bit[10000]" and initializes it. I wonder whether this array will be kept in the memory after I called the .so file. Because I will call the .so file thousands of times, if the memory ...

writing wrapper for dll

368 byte By zzsaraa at 2007-11-26 15:42:09
Hi,I try to write the wrapper class for dll using J2Native. I have some problems while writting wrapper for the below dll function.USB_STATUSWINAPIUSB_Initialize(short nWidth, short nHeight, HWND hWnd);1. USB_STATUS 2. WINAPI3. HWNDHow i write the code in java for the above 3 ...

Loading of jars ...during run time for enterprise app.

708 byte By deepinder_ma at 2007-11-26 15:42:30
I apologize for being a bit naive. I have been given the task to come up with a framework where Jar files containing classes have to be compiled and loaded on demand.The jar files will contain code written by third party company. I have to come up with a solution where I load these class into ...

JVM & JProfiler - Help needed urgent

667 byte By Aditya11a at 2007-11-26 15:44:21
Hi,I am a fresher and new to java. I am doing load testing. When i hook up a profler into JVM and run a test for 10 mins with 10 virtual users, i see deadlocks and 200 transactions will be completed in this period.When i take out profiler and run the same test for 10 mins with 10 virtual users ...

Exception

697 byte By Markus1982a at 2007-11-26 15:44:44
Hello togehter!When I run my program I just get the following exception:## An unexpected error has been detected by HotSpot Virtual Machine:## EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c901010, pid=2820, tid=3180## Java VM: Java HotSpot(TM) Client VM (1.4.2_10-b03 mixed mode)# ...

Call .dll from Java

893 byte By arvind.m@mgl.coma at 2007-11-26 15:46:53
Hi All,I have .dll file, which does encryption and decryption of a password.This dll was earlier used in .net to encrypt and decrypt the password.But now i am building the same application using J2ME, where i need to call this dll to encrypt and decrypt the password. Now i have already have an ...

Need Help for Intigrationg existing Cpp dlls with Java

204 byte By Srixa at 2007-11-26 15:49:58
Hi ,plz give me some suggetions for converting simple cpp program to dll and the code for wrapper class to integrate that with JAVA.Note: The application using the existing dlls only.

Cause of CodeBuffer memory exhaustion?

26596 byte By pgazdaa at 2007-11-26 15:52:31
We have had a JASIG uPortal application running under Tomcat with JVM 1.5.0_05-b05 for over a year without any JVM crashes. But now, twice within the last 2 weeks, the JVM has crashed because it has run out of CodeBuffer space. There is a bug report on this (6487381), but the bug evaluation ...

why objects are propgated to old instead of aging in from space

6146 byte By anujlal2a at 2007-11-26 15:53:20
I am seeing when eden is 100% and from space is 100% full before GC.After GC from space is only 10-15% full but and most of the objects is propagated to old space rather then allowing aging to happen in newspace.I have question about behavior which we seen today in on eour env.We are in ...

-XX:DefaultMaxRAMFraction=VALUE

2272 byte By sbflynn376@yahoo.coma at 2007-11-26 15:54:58
Sun's 1.5 JVM has some heap size configuration parameters that are not available in their 1.4 and earlier JVMs. For Sun's 1.5 JVM (not 1.4), there is the following documentation on sun's website: http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html#0.0.0.0.%20Heap%20Size%7CoutlineIf not ...

Classloader issue

700 byte By Alex_55_1a at 2007-11-26 15:57:07
Hi guys,I have small test program in Java. When I run it by Sun's Java launcher, it shows both instances created and are the same (sun.misc.Launcher$AppClassLoader), the code:System.out.println("this.getClass.getClassLoader = " + ...

Invocation: Returning a string

2248 byte By caffeinea at 2007-11-26 16:00:12
Suppose I have a function that:1. Takes an input string.2. Uses Java (via Invocation) to calculate a jstring.3. Converts the jstring to a a UTF string.4. Returns the UTF string.Like this (a JNIRef is a structure with references to classes and methods):char *f( JNIEnv *env, JNIRef *j, char ...

Reliability of protected void finalize() for freeing native dynamic memory

2364 byte By holzenspa at 2007-11-26 16:00:49
In different places, I've been reading different things about the specification of garbage collection in Java. From what I've found so far, it is pretty clear that if the garbage collector of the VM used decides to reclaim object X, then X.finalize() is called. However, opinions vary on ...

Defining inherited classes in JNI

316 byte By heavymachineguna at 2007-11-26 16:03:17
I have to use JNI in order to inherit a concrete class from an abstract one (java.util.TimerTask) and, then, instantiate it.I have to re-define the abstract method "run" of "TimerTask". In Java it's a trivial problem but I have to do it in C++!I hope I explained my problem. How do I work ...

JNI + Solaris : LD_LIBRARY_PATH / java.library.path initialisation

2527 byte By SMougenota at 2007-11-26 16:03:21
Hello.Some JNI tools have been built to run on both windows and Solaris.For the windows part, The PATH has been modified to add the DLL in order to be able to load the library into the JVM.After some hard time to get the DLL build process doing his job, finally every thing worked.But in ...

example of passing String Array from java to C using JNI

288 byte By dollyna at 2007-11-26 16:03:32
hi alli searched net for passing string array from java to C but i dont get anything relevent i have class stu{ int rollnostring nameString [] sub} i want to pass all as String array from java to C and access it C side

How to Create a JVM wtih Visual Basic

214 byte By caffeinea at 2007-11-26 16:08:31
I'd like to use Visual Basic to:1. Create a JVM.2. Create references to classes and methods.3. Call static and non-static methods.Is this possible? If so, how?Many thanks!

Reading The Title bar of any active window in windows Xp by java code

193 byte By v_m_007a at 2007-11-26 16:15:29
hi how can i Read The Title bar of any active window(like notepad ,mirosoft word ,internet explorer and so on......)who is runnningin windows Xpand close that window by java code

JVM errors

4672 byte By vk79a at 2007-11-26 16:16:06
Hi,I am getting the following error when I execute the a particular query that returns 34 records. However, each row has lots of columns. If I reduce the number of rows or the number of columns the error goes away.I do not get this error on Windows XP, even when I don't reduce the number of ...

Classpath length and performance - how long is too long?

217 byte By daffinma at 2007-11-26 16:22:48
Folks,Can anyone point me at some information about the releationship between classpath length and jvm performance? Does a long classpath matter? Is there a maximum length?Many thanks,Miles

+useConcMarkSweepGC vs. -useConcMarkWweepGC

234 byte By _dnoyeBa at 2007-11-26 16:26:16
I have seen two options in various places, but I have not been able to understand the difference between the two. Can someone help me here+useconcmarksweepgc-useconcmarksweepgcWhy is there a + and also a -?