JNI Linux Getting process id of child threads

371 byte By balakumara at 2007-10-3 1:15:48
I have a java program that spawns multiple child threads. Inside the child threads i make a native function call to get the process id of the current thread(process in linux) but this return the process id of the main program that spawned the child threads, though the top command shows ...

Does -XX:SoftRefLRUPolicyMSPerMB affect OutOfMemoryError behavior?

494 byte By cegreya at 2007-10-3 1:16:10
If an object is softly reachable and it has not yet exceeded the time limit specified by the -XX:SoftRefLRUPolicyMSPerMB parameter, will it still be garbage collected before an OutOfMemoryError occurs?In other words, if I set -XX:SoftRefLRUPolicyMSPerMB to a very large number (what is the ...

BUG when passing double

1156 byte By belteshazzara at 2007-10-3 1:16:22
I'm having trouble passing doubles between java and c. I have the following java and c functions.public static native void test( double a, int b, int c );JNIEXPORT void JNICALL Java_TestAlign_test (JNIEnv *env,jclass me,jdouble a,jint b,jint c ) {printf("got: %f %i %i\n",a,b,c);}When i run the ...

JVM CodePage

224 byte By maazevedoa at 2007-10-3 1:17:22
Hi thereWhen executing an console application, the portuguese characters does not appears correctly. Is there any way to configure JVM code page or anything like that ?Thanks .PS: using windows xp

"An unexpected error has been detected by HotSpot Virtual Machine: "

670 byte By Kalyani.Vadapallia at 2007-10-3 1:18:46
## An unexpected error has been detected by HotSpot Virtual Machine:## EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x74346183, pid=3252, tid=2956## Java VM: Java HotSpot(TM) Client VM (1.5.0_07-b03 mixed mode, sharing)# Problematic frame:# C [ODBC32.dll+0x26183]## An error report file with ...

passing JNIEnv to VB, then back to C++ (standard DLL)

1728 byte By yatingga at 2007-10-3 1:20:42
I have 2 methods I expose in my C++ DLL to my VB app:1. init_JVM( ) which I want to return a JNIEnv reference. This method is called once from my VB app.2. convert_Image( ) which passes the JNIEnv object as a parameter back to the C++ DLL. This method is called many times from VB.So, ...

Netbeans 5.0 causes JVM to crash

1127 byte By tecomana at 2007-10-3 1:21:02
The JVM (Java 1.5) is crashing when I am editing code using Netbeans 5 (it also happens running Netbeans 4.1 with the Java 5 sdk) I am getting a Hot Spot error as shown in part in the log below. I am running Windows XP Pro SPK2. Once the JVM crashes and I restart Netbeans, it crashes more and ...

invoking String.equals() from FindClass("java/lang/Object")

724 byte By p7ea at 2007-10-3 1:21:14
Hi,Lets say I have a jobject which I know is a java.lang.String object and sometimessome other type of object. I wantto invoke jmethod for the "equals" method of java.lang.String when itsa String and the correct "equals" method when its not a String.I can query env->GetObjectClass(), and ...

Max heap limited when running with a JVMTI agent?

453 byte By cfhlap0a at 2007-10-3 1:21:18
Running an app with a JVMTI agent, I cannot specify a max heap greater than 320Mb, even on a 1Gb machine with hardly anything running. Specifying for example -Xms256m -Xmx512m results in following error:Error occurred during initialization of VMCould not reserve enough space for object ...

Use JNI twice : Unable to create JVM

4041 byte By Taurenla at 2007-10-3 1:22:28
I want to use a java method to call an C++ method, and in that C++ method another java method is called. Then i use two types of JNI together and found this problem.If i use the java method to call the C++ method, or use the C++ method to call the other java method , it is alright.--This is a ...

Use JNI twice : Unable to create JVM

4041 byte By Taurenla at 2007-10-3 1:22:29
I want to use a java method to call an C++ method, and in that C++ method another java method is called. Then i use two types of JNI together and found this problem.If i use the java method to call the C++ method, or use the C++ method to call the other java method , it is alright.--This is a ...

Use JNI twice : Unable to create JVM

4041 byte By Taurenla at 2007-10-3 1:22:30
I want to use a java method to call an C++ method, and in that C++ method another java method is called. Then i use two types of JNI together and found this problem.If i use the java method to call the C++ method, or use the C++ method to call the other java method , it is alright.--This is a ...

where can i find low level implementation of string in java

340 byte By guptaravi2ka at 2007-10-3 1:23:08
hello,I want to see how JVM implements immutable string which , unlike c, is not terminated by a null character. so while calculating length of a string ,how does jvm know that the end of string has reached when it does not have any marker to indicate end of the string.please reply with ur ...

JVM - JVM1.TMP file issue

451 byte By bala.murthya at 2007-10-3 1:23:17
Iam trying to open a site through IE browser and the browser doesnt display some of hte page components like button and links .( But it shows the other components) . Also it prompts to locate "JVM1.TMP" file and i cannot find that file in my system.Can anyone tell me for what purpose is ...

Overwrite content and length of any jString variable?

2098 byte By radonea at 2007-10-3 1:23:53
I have native C function (Example bellow) which as the parametr I give 'char* buffer' variable. To this buffer is placed received data and is returned length of received data (without any reallocation of memory).Please, how can I do the same using JNI? Is it possible? I mean something ...

java network

43 byte By selva_logica at 2007-10-3 1:24:03
Find out who is accessing my machine

Retrieving an applet from JNI

347 byte By BWVictoriousa at 2007-10-3 1:25:35
heyas!Is it possible to find a loaded applet from JNI?I have a brower that displays an applet. What I need it to do is from his browser code to find the applet class or top level windows in the applet.For some reason I can only find a single 0x0 invisible Frame when I call ...

path problem (newbie)

533 byte By Leo77a at 2007-10-3 1:26:28
Hi...I created a small program that uses a JNI call. It works fine, but it requires the absolute path to the library Im using (I get this error when I try to use a relative path: Exception in thread "main" java.lang.UnsatisfiedLinkError: Expecting an absolute path of the library: ...

Redirect stdout/stderr from JNI native code

469 byte By zzzwyxha at 2007-10-3 1:27:35
Hi, I have some legacy code, that I need to capture the stdout (printf and cout, etc). Is there any way in Java to capture them?I tried to use System.setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream("output.dat")))); but it wouldn't catch them. Is there any way to do this? ...

problem calling a Java Method from C++

3789 byte By Bianconero_ccsa at 2007-10-3 1:31:24
hi everyone, i'm using JNI and i'm trying to call a Java method from C++, this is the code:SocketC.javapublic class SocketC {private native void conectaServidor();private void recibeBuffer(){System.out.println("HELLO!!!");}public static void main(String args[]){SocketC SC = new ...

how to know that our system is connected to internet using java

222 byte By srinivas_budha@yahoo.coma at 2007-10-3 1:33:01
hi can any one help me how to know that our system is connected to intenet and also how to get spped of the intenet connectionI am anil send me mail to anilnaidu_sri@yahoo.co.inbyeBy Anil

Server JVM cotinuously slow down

593 byte By jcaillya at 2007-10-3 1:33:22
I wrote a benchmark to test the server VM capacity to inline code.It works well and comparing to the client VM it's possible in my case to achieve great performance enhancement.BUT there is something strange : during the first loop, performances are not good, then VM does its optimization ...

Garbage Collection - Full collection doesn't do more then Minor collection

900 byte By Barttha at 2007-10-3 1:33:41
I've been logging some GC information of my webapp since it's having some memory issues.The webapplication uses sessions to store a lot of data across pages, it's a medium-high load service used in our company internally as an interface for our ERP.I've noticed that memory usage goes up a ...

Problem w/ hotspot virual machine help

23617 byte By sharptecha at 2007-10-3 1:35:00
Anyone know a solution to this problem?seems the problem file is msvrct.. thanks guys!## An unexpected error has been detected by HotSpot Virtual Machine:## EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x77c47fd4, pid=768, tid=3320## Java VM: Java HotSpot(TM) Client VM (1.5.0_06-b05 mixed ...

LoadLibrary recursive dependencies

868 byte By zzzwyxha at 2007-10-3 1:35:57
Hi, I have three libraries A.dll, B.dll and C.dll, under directory LibA is dependent on B and C. B and C are also dependent on A. If I put Lib in system path and load A only, using System.loadLibrary(A), it works fine, windows somehow knows where to find B and C and load them automatically. ...

How to get system.out from Java to C++?

401 byte By yatingga at 2007-10-3 1:36:21
My Java class, if ran in the command line, displays some text with System.out.println. But when I invoke that class from C++ using JNI, that string is nowhere to be found. Can someone help me on how to get that output into my C++?The java class is invoked in my C++ as ...

unexpected error HotSpot Virtual Machine EXCEPTION_ACCESS_VIOLATION

16729 byte By LBBachmana at 2007-10-3 1:38:25
Has anyone seen this? The dll in question is usually ntdll.dll or awt.dll.Thank you in advance.## An unexpected error has been detected by HotSpot Virtual Machine:## EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c9010f3, pid=3856, tid=5344## Java VM: Java HotSpot(TM) Client VM (1.5.0_07-b03 ...

Java HotSpot Error Logs - Changing default path ?

452 byte By quantass0a at 2007-10-3 1:39:56
Im using Windows XP and it has Java HotSpot Virtual Machine log files (err_pidXXXX.log) being automatically stored onto my desktop.Im not interested in these error messages only in either disabling these log files from being created or at the very least moving them to a more appropriate ...

Understanding Xss- java stack internals

986 byte By rhea at 2007-10-3 1:41:08
Cross posting from http://forum.java.sun.com/thread.jspa?threadID=756193I am using jdk 1.4.2.07 and run into the following error with the VM crashing with a defunct process:"Fatal: Stack size too small. Use 'java -Xss' to increase default stack size." on Linux. Does this imply a JVM bug given ...

Fortran

101 byte By a_Jdeva at 2007-10-3 1:44:42
Hi,Can I use JNI for Java - Fortran interoperation?Do you know other approaches?

VM cannot resolve inner class native functions?

1458 byte By mike_dalpeea at 2007-10-3 1:45:29
Hello,I am trying to wrap some legacy C++ libraries using JNI. I thought I would try to mimic the C++ class structure in java to keep things simple. However, I have discovered what appears to be a bug in how inner class native functions are resolved.if I have something like:package pkg;public ...

how return a jstring using callbacks?

5759 byte By Bianconero_ccsa at 2007-10-3 1:49:19
hello again everyone, i'm still with the proyect in JNI...now in the callback method i want to return a jstring (or at least a char*), i'm doing this, and i don't know if i'm right....in my Server_TCP.cpp:JNIEXPORT void JNICALL Java_SocketC_conectaServidor(JNIEnv *env, jobject obj)//void ...

Java VM: Java HotSpot(TM) Client VM (1.4.2_11-b06 mixed mode) jvm.dll

19308 byte By vishal_usaa at 2007-10-3 1:50:11
Hi ,I Migrated an application from Weblogic 6.1 to Weblogic 8.1. It is deployed properly and I am able to start the server. When I try to open login page it gives the following error as shown below:I tried many ways changing the memory settings, etc. but still i get the same error. It might be ...

VC8 clients and native invocation API

458 byte By zhangrusia at 2007-10-3 1:50:18
Hi,Could someone from Sun tell me whether JNI invocation API for the 1.5.0_07 Windows JVM supports .NET clients compiled with Visual C++ 8?I have an ASP.NET application that calls into the JVM through the JNI invocation API. I know that there were problems with VC7 clients calling into the 1.3 ...

java.lang.ClassNotFoundException

2203 byte By write2jamesbonda at 2007-10-3 1:51:44
i ALL,Its works fine with netscape but with mozilla 1.4 I'm gettingjava.lang.ClassNotFoundException : test.classat sun.applet.AppletClassLoader.findClass(Unknown Source)at java.lang.ClassLoader.loadClass(Unknown Source)at sun.applet.AppletClassLoader.loadClass(Unknown Source)at ...

"nogc" option...

569 byte By deneb30a at 2007-10-3 1:52:19
Hello,After 6 years programming and leading Java developper teams...I think major problem remaing in the JVM is...the garbage collector.It's not a problem of implementation, but just a bad strategy !We think in our team that we can seriously improve the global performance of our applications, ...

JNI and DLLs

847 byte By jork_berfkina at 2007-10-3 2:00:47
I have a Java application written and I am trying to read functions from a DLL that is written in Modula-2. I know that the Java Native interface can access DLLs with the System.load() call and I have seen multiple examples of how to define functions from the DLL in the Java code. My question ...

Matlab / JAVA GUI

1257 byte By Malweea at 2007-10-3 2:01:56
Hi there,I try to interface Matlab code with a JAVA graphical interface ... so I created first my matlab library and then created an other one with c++/matlab I can call from JAVA with JNI ;)everything work well but ... here is my problem:When I initialize my matlab library, the GUI just go ...

More Problems Compiling JVM From Source

5574 byte By ariel_segalla at 2007-10-3 2:02:51
My group is trying to compile Java 1.5 from source on RedHat 7.3, following directions from someone who managed to successfully compile it. (Previous attempts to compile it on Advanced Server 2.1 have so far not borne fruit.) We're getting the following error, but can't track down what might ...

AttachCurrentThread not working w/ Windows services

4007 byte By yatingga at 2007-10-3 2:04:12
I have a Windows service that calls a C++ DLL which invokes a Java class through JNI. With this configuration (running as a service), AttachCurrentThread crashes. But, if I run the app as a standalone client, everything is well.Is there anything about services that makes attaching the current ...

troubles analyzing heap dump using hat/jhat

1956 byte By destouchea at 2007-10-3 2:09:16
We're running jdk 1.5 update 7 on a SuSE Linux 8 machine (kernel 2.4.21-309-smp). It's a pretty large JBoss application server (4.0.3) running an embedded tomcat (5.5) and Systinet web services server (6.5).We've started running out of memory (java.lang.OutOfMemoryError: Java heap space) on ...

how to call methods defined in another class ? is it possible?

2161 byte By victor.k.hua at 2007-10-3 2:14:09
Hi all, I am new to using JNI, was wondering if this is possible and how I might be able to do this. I'm trying to call some set/get functions defined in a class that is not part of the class where I have my native code defined and called... Let me explain a bit, I have a class JobElement ...

Understanding the implementation of synchronization in Hotspot

1085 byte By quasiquotea at 2007-10-3 2:18:37
I am a graduate student looking into alternative synchronization implementations for the Hotspot JVM. I am perusing the source code for Java 1.4, in particular for Solaris and the SPARC ISA. Thus far I have found the following files that deal with locking and ...

JVM crashes at getJavaJniClass()->getClass()

14267 byte By drukha at 2007-10-3 2:22:13
I use jdk 1.5.0_07 on Fedora, together with jace 1.1.rc1_05, compiled with gcc 3.4.4 The C++ main loads JVM, and runs a method which calls a native method implemented back in C++. When the native method converts jstring to std::string (using autoproxy-generated code), the program crashes. ...

Static libraries and JNI / recursive libraries

347 byte By Anubis666a at 2007-10-3 2:22:40
Hi @all,I've built and linked the C++ code, that's called via JNI by my Java application as a so (shared lib). This lib however, links with other libs, that are not shared but static. When I run my java application it can't resolve symbols from those libs.What can I do to make my Java ...

Human Readable gc timestamp

357 byte By enoughbugsa at 2007-10-3 2:25:04
Is there a way to get real time timestamps in the gc log as opposed to elapsed time. I've seen this kind of question here before, but haven't seen a definitive answer.I've seen this arg referenced in a few places, but no one says what it does:-XX:GCTaskTimeStampEntries=<value>uintxNot ...

Maximum Heap Size

692 byte By BobBaron2a at 2007-10-3 2:25:18
I go through this every year or so - why is it so hard to find out what the maximum memory that can be used for each JRE?My very simple question is "what is the maximum amount of memory that my application can use?"Ideally someone has found this elusive table that would at least report the ...

Java-C-Fortran interoperability on Windows platform

809 byte By a_Jdeva at 2007-10-3 2:26:09
Hi,I have developed a Fortran dll, created with Salford FTN95 for .Net 2003. I call this dll from unmaneged Visual C++ code (exe) and I have no problems with both implicit (load time dynamic linking) and explicit (runtime) linking. The problems arose when a tried to call the above C++ code (but ...

Thread "waiting on condition" without indicating what the condition is

2754 byte By DavidLennerta at 2007-10-3 2:26:19
The thread, "Thread-6", is blocked waiting to lock <0x650efdf0>. The thread, "QueueRequestScheduled", holds this lock and itself is blocked "waiting on condition". However there is no indication what this condition is. The "QueueRequestScheduled" thread is wedged in this state forever at ...

JNI Invocation Problem

1488 byte By mephisto2a at 2007-10-3 2:27:26
Hi @all,I am using the Invocation Interface to Start an JVM from a C Progam. The Java Programm is only an User Interface to get some Input. The Input the User made is gievn through the a Java class to the C Program. I save the Input in A static int. This Static is read by the C program when the ...