HotSpot question

435 byte By phoenixinthesky222a at 2007-11-27 7:05:11
I'm trying to understand the threading models available in the HotSpot JVM. I'm aware there's info in the link below: http://java.sun.com/docs/hotspot/threads/threads.htmlHowever I'm a bit confused because it states that it's for the SolarisTM OS. Can't the HotSpot JVM be used on ...

How to convert HashMap from Java to JNI(c++)

430 byte By Ramin.Massachia at 2007-11-27 7:07:50
We are currently using JNI for transferring simpele/primitive types from Java to C++ successfully. 1) How JNI is enables to convert complex objects such as hashMap, Vectores from Java to C++ and vice versa.2) We want to send a Hashmap .We try to send the Hashmap as a "jobject". The question is ...

GC hell ?

3736 byte By Andrea_Vettoria at 2007-11-27 7:10:55
Hi, I'm running JBoss 4.0.5 on Redhat Linux 64 and java 1.5.0_12. The server has two dual core processor and ten gigabyte of ram. I start JBoss with : -Xms4096m -Xmx5120m -XX:PermSize=128m -XX:MaxPermSize=256m -XX:NewSize=2048m -Dsun.rmi.dgc.client.gcInterval=3600000 ...

Ever Increasing Process Size (Even with Small Heap Size)

599 byte By AlanOLa at 2007-11-27 7:12:34
Hello,I have a process that is started with a max heap size of 256 megabytes....However after running for a few hours the process size on Linux is seen to start growing and keeps growing to well over a gig of RES memory usage (another gig of VIRT can also be seen)I have been looking at this for ...

JVM heapsize on solaris

226 byte By shahbazcsa at 2007-11-27 7:13:56
How to find default heapsize on solaris allocated for jvm?moreover how to increase it?is it stored in any file or any parameter needs to be set?please explain in detail.......thanx in advance

Should I recompile java source on opteron solaris?

645 byte By qijiang2000a at 2007-11-27 7:28:01
In development environment, I built a servlet application via netbeans on Windows XP (32 bits). I am going to delopy the war file on a Sun box x 4100 with AMD Opteron/Solaris platform(AMD 64 bits). However, I was told that the java classes need to be recompiled on the opteron box since the java ...

How to call GetCreatedJavaVMs

206 byte By jayesh.dulania at 2007-11-27 7:31:09
Respected Members ,I Want to know from you that How Can i Call the above mentioned Function As early as possible Thanks in Advance Reply!!!!!jayesh.dulani@gmail.com

In a system how many JVM's we can have?

258 byte By hiremath47a at 2007-11-27 7:32:30
Hi I got jdk 1.4 and jdk 1.5 installed in my system.So now the point is, consider i am running some services compatible to jdk 1.4 and some compatible with jdk 1.5.Now tell me how the JVM handles this scenario....?Thank you

Is there a way to get class name as a string from jclass ?

680 byte By kteegalaa at 2007-11-27 7:34:17
void Callback() {if(env == NULL || gObj == NULL) return;jclass cls = env->GetObjectClass(gObj);if(cls){jmethodID mid = env->GetMethodID(cls, "MyMethod", "()V");if(mid) env->CallVoidMethod(gObj, mid, NULL);else printf("mid is null\n");}}In the above code, env & gObj are global ...

does native keyword imply static?

1068 byte By tonymilliona at 2007-11-27 7:40:19
In out project we have two DLLS which export the same JNI functions.We have a single base class which interfaces to them then two subclasses which implement specific functionality (ie. the DLLS are plugins that conform to a spec, the java classes are the specific classes to load the dlls).All ...

How to type cast from AccessibleContext to jobject

329 byte By moibelgala at 2007-11-27 7:46:23
I have an AccessibleContext and type cast it to jobject:long accID;jobject obj = (jobject) accID ;Type casting seems to be successfull but I cannot get class of obj :cls = env->GetObjectClass(obj); //JNIEnv* envPlease help me to fix this one. I appreciate your response. ...

JNI_CreateJavaVM return -1

336 byte By zsseana at 2007-11-27 7:50:22
I have the following code:function a{call JNI_CreateJavaVMdo some thingDestroyJavaVM}function b{Call function a;call function a again;}the problem is when I "call function a again". the create function returns -1. anyone has any idea ...

i have runescape problems

1238 byte By runescape25a at 2007-11-27 7:51:02
ok here is the deal, when i play runescape for like 10 min, after restarting my computer, runescape just logs off randomly and i have tried everything, restarting my computer and reinstalling java and internet explorer but runescape works the best after i restart my computer but once it crashes ...

Hs_err_pid3108 error pls help me its really been there for a year now =(

15033 byte By Giela at 2007-11-27 7:51:19
Here is the complete error file: ## An unexpected error has been detected by Java Runtime Environment:## EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x2309cfa0, pid=3108, tid=2896## Java VM: Java HotSpot(TM) Client VM (1.6.0_01-b06 mixed mode, sharing)# Problematic frame:# C 0x2309cfa0## If ...

Is using verbose:gc and other print GC options an overhead to running java.

182 byte By richard_stretcha at 2007-11-27 7:52:11
Is using verbose:gc and other print GC options an overhead to running java.Questions have been asked that it might cause some performance issues because of the logging.

Are these jvm args of jvm 1.4 suitable for jvm 5?

941 byte By tech_luvera at 2007-11-27 7:52:36
1.We used following mem_args with jvm 1.4 and weblogic 8.x. Recently we upgraded to wls 9.2 and jvm 5.x. Please suggest me whether following mem args still suitable with jvm 5 for better performance. If not, advise me required changes for better performance. USER_MEM_ARGS=" -Xmx512m -Xms512m ...

Java process memory shows a steady increase.

1689 byte By je22chapa at 2007-11-27 7:54:37
We are running a web based application & below are the details.App Server : Websphere Application Server 5.1 Fix pack 12.Linux , JDK 1.4.2_03, 2 CPU, 4 GB RAM.The min heap set is 256 M and Maximum is 1024m.When we start our application and we more users login, we see the Java process memory ...

Debugging java code launched from c code

512 byte By Dummya at 2007-11-27 8:08:38
Hi,I have C code that must create a JVM through the JNI invocation interface and later make several Java method calls. Is there a way to debug Java code called from C functions. My C code is not standalone but is run from an external db plugin (I can only customize this code). I probably have ...

Need Major Help

249 byte By Needhelplotsa at 2007-11-27 8:14:02
Hello. I'm having some problems with the JVM. Whenever I open up my browser ( doesn't matter with), it always ends up closing down, and leaving me with a hs_err_pid- document on my desktop. Can anyone help me by giving me ways to stop this?

Max heap size

331 byte By GauravDeva at 2007-11-27 8:14:19
iam setting the max heap size to 1GB in java 1.4, but sometimes during the run of my application i do get Out of memory error.If increasing the max heap size is the solution then how do i do that?I have set the initial heap size to 64MB while my machine RAM is 2GB.Please advice.Thanks in ...

Java 6 very slow on Linux?!

832 byte By Robert_Golda at 2007-11-27 8:15:43
Hi,we're using Linux 2.6.9-55.ELsmp on 2 x Xeon 2.4 Ghz machines.Now we switched from 1.5.0_11-b03 to build 1.6.0_01-b06, mixed mode and all applications are tremendously slower, about 7 times. Servers which were using 10-15 % CPU are now using about 85%. On windows everything is running as ...

Multiple vs single JVM

345 byte By silvousplaita at 2007-11-27 8:18:34
I was working a problem with connection pooling and it was pointed out that to utilize pooling all my workstations would have to be using the same JVM.I am not clear how one determines how to use the JVM locally or remotely, or some other way?Would anyone have an simple explanation for this and ...

Manipulating C++ Objects in Java Through JNI

809 byte By csb42a at 2007-11-27 8:19:14
Hi, I have some existing C++ classes objects that I would like to access through Java methods. However, if I use a java method to create an instance of a C++ object, and then I want to edit the state of that C++ object through java, how do I reference the correct C++ object.For example, if I ...

Cannot load shared library from Java on AIX

1176 byte By cactuara at 2007-11-27 8:20:35
I am working on a 64-bit AIX5.2 machine. I created a hello world program using JNI. When I run it, System.loadLibrary() does not find my shared library. After looking into it for several hours, I realized it might be something to do with my 32 bit mode build. The reason I am building as 32 bit ...

class not found when accessing jar

594 byte By k_sudhana at 2007-11-27 8:20:56
Hello,The dll gets correctly loaded but when the cpp code tries to find the java class from where it is invoked, it throws an error for class not found. My cpp code is given below :JNIEnv *_env = 0;jclass _clazz = 0;char className[] = abcd/xyz/myClass";_clazz = ...

Tune application for minimum virtual memory footprint

615 byte By Noam_Ambara at 2007-11-27 8:26:17
I have an application that needs to have low virtual memory usage, since several instances of different users are running on the same machine. I'd like to avoid -Xmx limit since the application sometimes needs more memory. I've tried using:-XX:ReservedCodeCacheSize=48m ...

HotSpot internal threads

330 byte By snovgorodskya at 2007-11-27 8:29:04
Apparently, HotSpot starts some number of internal threads.In my environment (SUSE Linux 10.1, JDK 5, Intel Dual Core) , when I run a simple single-threaded test program(just your basic 'hello world'), I see 12 threads running. There are probably 2 GC threads, 1 main thread, what are the ...

HotSpot internal threads

359 byte By snovgorodskya at 2007-11-27 8:33:14
Hi,Apparently, HotSpot starts some number of internal threads.In my environment (SUSE Linux 10.1, JDK 5, Intel Dual Core) , when I run a simple single-threaded test program(just your basic 'hello world'), I see about 15 threads running.There are probably 2 GC threads, 1 main thread, what are ...

JVM Basics

548 byte By Omkaraa at 2007-11-27 8:38:26
I am confused about JVM.My questions are :Is 1 JRE = 1 JVM ?Is every invocation of a java program start a separate jvm e.g. 2 instances of notepad show notepad.exe twice in task manager ?If I start 2 java programs from command line simultaneouslye.g. java cls1 and java cls2Does it mean there ...

Wrap c++ application to Java using JNI

343 byte By bro_firdausa at 2007-11-27 8:41:34
Hi guys.I am in need for help.I have to wrap a c++ application to Java using JNI. from then i have to make the java into a servlet.The c++ application is an AXIS camera API written in C++.My knowledge is only on JAVA. Seriously i need help.anyone can help me. please. thanks in advance. ...

ClassDefiner.defineClass() leaking memory in a RMI method invocation.

671 byte By vijshettya at 2007-11-27 8:51:17
Hi,My application uses RMI for communicating between two java processes. I'm observing some kind of memory leak in one of the classes in RMI library.When observed through OptimizeIT, I see a large number of Object[] being created by the ClassDefiner.defineClass() & ...

Parallel Garbage Collection Fine Tuning

1993 byte By syg6a at 2007-11-27 8:51:55
Hello,I have a cache app running on Red Hat Linux. It's a 2-processor, 4G RAM machine with 2.3 G of RAM assigned to the JVM. I am using the Parallel Collector and have set NewRatio to 4 (it was set to 8 by default) to try to make Minor Collections less frequent, thus deleting more dead objects ...

can MSJVM be bypassed?

657 byte By aksaraycana at 2007-11-27 8:52:41
I wonder, is there a way to bypass MSJVM. In other words, there is a web site that i have to use, and the they make the web site with MSJVM and cannot access with any tool except MS Windows+IE. I would like to access that web site in other platforms and browsers. The web site that i have ...

Heap size not increasing over 4G

867 byte By thisisvinoda at 2007-11-27 8:53:04
Hi,I'm running a java server app on a 4-core 64-bit Linux box with JDK 1.6.0u1The system has 8G of physical RAM and the java app is the dedicated app running on the server. I've allocated a max heap size of 8G to the java app.The app does a lot of caching and as expected, the old gen starts ...

stop an dll while executing a dll function

503 byte By wildtriggera at 2007-11-27 8:57:46
Hi,i use jawin to run a dll which creates xml-files. In some cases i have to stop the creation of the xml-files. But there is no way to stop the invoked function of the dll. The sourcecode of the dll is not available . But i assume that the called function is a "normal" method without threads. ...

ActiveX bridge, only one direction works

716 byte By shruti_giria at 2007-11-27 9:04:17
Hi, I've packaged and deployed my java application as a dll using the activex bridge. I can get calls from the COM host just fine, but I'm not being able to pass values across to the host. For example, the COM host specifies that a property called 'Long Version' be set. So I've created an ...

calling thirdparty dll from java using JNI

412 byte By palthia at 2007-11-27 9:07:23
want to call a generic dll from JAVA. The dll is provided by thirdparty. I am able to load it using "System.load("dllName.dll");" but i am now confused how can i call the methods. Since it is not made by me using JNI so there is not method with "native" keyword. its methods are not having ...

-XX:-UseParNewGC in java 5

269 byte By tech_luvera at 2007-11-27 9:09:58
If you use -XX:+UseParNewGC , Parallel YG collector will be used.But If I mention "-XX:-UseParNewGC" with -XX:+UseConcMarkSweepGC" in java 5, what type of collector would be use for YG? Please clarify.Message was edited by: tech_luver

Existing DLL

298 byte By bro_firdausa at 2007-11-27 9:12:52
Hi guys. Ive done a succesfully some JNI examples on the web.I have a c++ application together with the dll given. I do not know how to implement JNI onto the application. anyone can help me in this?btw the c++ is an AXIS camera API application.thanks in

javaw memory usage grows by the usage of native method

1715 byte By RGAnna at 2007-11-27 9:15:12
Hello!I have a very simple jni - method, which puts a string into the java String field:JNIEXPORT void JNICALL Java_de_getStr(JNIEnv *env, jobject obj){jclassclazz = (*env)->GetObjectClass(env, obj);char myStr[5] = "aaaa";jobject aString = (*env)->NewStringUTF(env, myStr);jfieldID jfid = ...

Passing Unicode string to Java from Native function

1281 byte By cactuara at 2007-11-27 9:15:33
I have a native function that returns a Unicode string, which I use the NewString() jni method to return it. My native string is in UTF16 LE for Windows and BE for Unix (platform default encoding). Currently I am only using the ASCII characters that are represented in UTF16. When I get a string ...

EXCEPTION_STACK_OVERFLOW with Tomcat - service shuts down

3272 byte By TimmyMillera at 2007-11-27 9:16:30
Hello,I get the following error periodically which causes my Tomcat service to stop. There do not seem to be any exceptions listed in my log files, only the "An unrecoverable stack overflow has occurred." error listed in the jakarta_service_yyyymmdd.log file.I am running tomcat5.5.23 on a ...

how to use JNI to load some classes and use them ?

719 byte By Legolas.wa at 2007-11-27 9:16:32
HIThank you for reading my postby default i run an applicaton using foolowing command, now i want to have access to the objects from within the native applications.here is the code that i used to run the application using normal commands, how can some one tell me how i can run it using native ...

JNative Question

8582 byte By ro81nyeoa at 2007-11-27 9:17:40
I just started on JNative and I have some questions on about it. I hope someone here can help me with some answers. Pardon me if I sound stupid, I just barely started less than 24 hours. Anyway I have a C structure here...//C code structstruct usb_bus { struct usb_bus *next, *prev; char ...

Howto disable "Server Class Machine Dedection"?

531 byte By linuxhippya at 2007-11-27 9:19:04
Hi there,I just recently bought a second GB of RAM for my Notebook, and now I meet the requirements for a server-class-machine (2GB ram/ 2 cpu/ Linux).Is there any way I can tell the jvm without always specifying that I would like to run the client-compiler always?I know I could just use the ...

java program using the msn functionality

212 byte By tweety987a at 2007-11-27 9:24:34
I want to write a java program using the msn functionality in this program. I'd like to know whether there is any package exists that can include the msn application into a java user interface. Thank you.

problem loading library

1797 byte By alan_SEa at 2007-11-27 9:25:20
Hi there.I'm trying to load a library by -Djava.library.path=path_to_lib but get error message saying java.lang.UnsatisfiedLinkError.I'm doing it this way because I'm trying to write a midlet.So the questions are: Is this possible in a midlet andif possible what am i doing wrong:My java code ...

JNI Problem(Best way to do this?)

976 byte By Popupa at 2007-11-27 9:27:02
Hi all,I am trying to execute a C program from a Java Program. All things are working fine but when I am returning a char* pointer from C code to native C file I am unable to get this string(In opposite to that I can send a char* from native code to C code)In core C code I am doing:-struct ...

COM and Java

477 byte By gripusaa at 2007-11-27 9:30:15
Hi guys, i am bit confused and i hope so somebody clerify this, i am working to access COM dll through JNI but as we know all the litrature and references always point out that the language should be used is C++ (altough i cant understand why it is so as dll is bit generic and should be ...

AttachCurrentThread() call crashes Java Application

525 byte By kaiwalyaa at 2007-11-27 9:34:19
Hello,I have injected a DLL having JNI code into Java Application using CreateRemoteThread() function.Then i created a Thread using CreateThread() function in DLL_PROCESS_ATTACH.I wanted to attach this thread to JVM already running inside the Java Application. So i used JNI_GetCreatedJVMs to ...