22311 byte By
VegardSa at 2007-11-26 21:51:11
After having upgraded one of our servers to JBoss 4.0.5 GA and JDK 1.5.0_11-b03, we are experiencing a lot of JVM chrashes. With just a few hours interval we are getting SIGSEGVs and they all indicates a problematic frame somewhere inside libjvm.so:libjvm.so+0x1caa74 (9 ...
1203 byte By
josemecha at 2007-11-26 21:51:16
Dear All,Thanks in advance for your help. I am trying to access third party DLL file from Java first time. After going through the JNI tutorial I have done the following steps,1. Created a Java file with 'native'functions, which are available in DLL filepublic class ...
948 byte By
wilkinpa at 2007-11-26 21:54:28
Does anybody know if there is a simple way for a java program to find out if a named service is installed on windows?We are using JavaService ( http://multiplan.co.uk/software/javaservice) to wrap a java program to run as a windows service and that works just fine. Now we have another java ...
1324 byte By
josemecha at 2007-11-26 21:54:59
Hi,I am trying to access a DLL file using JNative and i am able to call a method sucessfully, but when I try to call another method by same way it does not. Can i call 2 mehtods by creating instance of JNative? if I am accessing the methods in wrong way please correct me? Here is the code, ...
522 byte By
e.p.a.a at 2007-11-26 21:55:04
Is there an undocumented 'feature' in Java 6 that prevents loading the VM with JNI_VERSION_1_2?Using a loader that has worked since Java 1.3 and works fine with the most recent Java 5 (_11) version, I am now getting a JNI_EVERSION return code from the CreateJavaVM call on Java 6 on Windows ...
HiI ran my webapp on tomcat 5.0.28. After a while, I got an java.lang.OutOfMemoryError: PermGen space error when I tried to redeploy my application so I tried to redeploy again and still got errors. So I looked for some clues and found that setting Heap size or PermGen Size might help. I did ...
hi there...i want to display the output of a c program that uses, printf's, puts on a java gui. the c program has tones of these i dont want to edit them.i am using JNI to run c from java.does anybody know how i can capture the output of the c program and display iton a java ...
I have seen in other JNI code and on the forms here that use of long is the recomendation for pointers. However, when I use them with the C dll I'm wrapping I get compile warnings "warning: cast to pointer from integer of different size". The pointers are to a variety of C structs and there is ...
88 byte By
ice1972a at 2007-11-26 22:02:11
Hi,there is any way for propose an advancement of Java language?TIA
596 byte By
z23a at 2007-11-26 22:03:30
Hello,I need to get the running Windows processes using C++ and have a Process struct in C++ having 2 fields: name and pid. I want to pass an ArrayList of Process from C++ to Java. I have found an example of how to pass an array of objects from C++ to Java, but I'd like to pass an ArrayList, ...
Say I have a C function that will return a socket to the caller, like Socket* bbSocket()Can I map it to a JNI java API that return a java.net.Socket ?
73 byte By
sixfacea at 2007-11-26 22:04:42
how to write a jni wrapper to call an existing Dll created using C
If I specific a -Xmx value bigger than what VM can get, it will just refuse to start. How can I tell VM to use as much memory as system have?
108 byte By
docsofta at 2007-11-26 22:10:41
Can you please let me know how to increase the JVM Heap Size -- on linux fedora 6.0.Thank you,
Hi. I'm doing some testes with JNI. Firs i followed the netbeans tutorial for doing a C programa that prints somthing for java.. like.. "Hello java from C". So i tried to load a dll from my dll. Like, I have this dll to use the parallel port on windows Xp. So i created a dll to access it an ...
1061 byte By
mika03a at 2007-11-26 22:17:40
Hi,this might very well be a C problem, but maybe not, because the program compiles fine and can nicely be executed seperately, it only crashes if used together with JNI. (Anyhow, I am not a C expert.)Okay, i am trying to make some third party C-code accessible from Java.The problem are lines ...
1588 byte By
Asbestosa at 2007-11-26 22:27:19
Hi all,I'm trying to run Jawin in Eclipse. Knowing that the program needs to find the file jawin.dll, I have added -Djava.library.path=c:\sources\jawin-2.0-alpha1\bin to the Arguments field in my run configurations.With this, I still get the error Exception in thread "main" ...
I have a server process that creates a thread which will exec a separate executable that runs a JNI method. The JNI method uses JDBC to connect to a database to do some work. After this thread ends, the server process creates another thread which does a file deletion and a file rename ...
Hello,I send a string (char *) from c++ to java as a inputargument for a method. This works great. But if the string consists of 1-3 character(s) it doesn't work ("Unhandled exception in...(JVM.dll)...Access violation.")Can anybody help?Thanks
Dear All,I am working on an application to monitor the state of a device. The device monitor part is written in c as native code. The java part of this application should be notified by the native part when there is something happens. The basic work flow is:Java: Call native function Init.C++ : ...
1004 byte By
jsp_proa at 2007-11-26 22:46:48
hi,I am trying to implement exception handling for a JAVA + C++ module.In which C++ exception is caught by a Java module.The c++ code is as follows,try{///////////===========} catch (Exception1 &e) {jclass clazz = ...
I have made a DLL to use within java, and it works fine when I use it on the machine that it was compiled on. However, when I take the DLL to a second machine, I get the following error when trying to use it in the SAME project, which is also a copy of the one in my PC. ...
Want to load a jfloat array into a java.nio.FloatBuffer in CThe easiest way to do this is using the static method FloatBuffer.wrap(float[]);So I get the classID:jclass floatBufClass = (*env)->FindClass(env, "java/nio/FloatBuffer");if(floatBufClass == NULL) {return (NULL);}This appears to ...
Hello,when installing Tomcat it asks to specify the "path of JVM" what shud b specified there ? already jdk1.5.0 is installed in the system.
Hi Guys I'm very inexperienced in debugging JNI/native lib, helps are very much appreicated. I've written C code to use a native library (.so) and also generate Java exception using the code below when making native method call via JNI, everything was running ok. However, I sometimes get ...
I just upgraded to 6.0 and noticed that its no longer possible to use the server VM on 32 bit windows.Can someone please explain the rationale for this design decision?Also, what sort of performance penalty can I expect?Thank you.
342 byte By
Morninga at 2007-11-26 22:58:56
can someone help?# An unexpected error has been detected by HotSpot Virtual Machine:## Internal Error (4652414D450E43505003F3), pid=1784, tid=7548## Java VM: Java HotSpot(TM) Client VM (1.4.2_13-b06 mixed mode)# An error report file with more information is saved as ...
I've been poking around trying to find a way to get some heap usage statistics from inside a running 1.4.2 JVM. Basically what I need is:1. Notification that a GC event has occurred (or a way to tell that one has occurred since the last time the code checked).2. The sizes of the old (tenured) ...
Hi ! After a search on the forum, I request your help about a little JNI app developped to work with a 3D sensor. The research team in which I work use to working with Eclipse IDE, and this JNI appliation work on it. However, impossible to find a way on NetBeans... I get an exception : ...
the following simple code can't load jvm.dllat windows xp sp2 , jre-1_5_0_11#include <jni.h>#include <stdio.h>int main() {HINSTANCE hVM;if((hVM = LoadLibray("C:Program Files\\Java\\jre1.5.0_11\\bin\clienjvm.dll"))==NULL){printf("faild\n");}else printf("succes\n");return ...
498 byte By
Samayaa at 2007-11-26 23:11:31
Hi!! I m new to Java. I have developed an application in Java to call my VC++ Dll. I am successfully able to call the functions from DLL(VC++) and get their return values in Java application.(Using JNI)Now i want to pass an object of a class to the Java app. This to get the access to the data ...
Hello,I am using jakarta-tomcat-4.0.4.How can i determine which JVM is used in tomcat web server.Thanks.
Hi.I am new to JNI.I would want to know if it is legal and doable to create anon-primitive Java Object (e.g. Date Object) inside my native codeand hand it back to the JVM, in case of JNI...?An explanation with a reasoning would be great.Thanks
3318 byte By
mebberta at 2007-11-26 23:16:51
Hi,I have been working to get a program to compile on windows using cygwin. When I added the -mno-cygwin flag to the compile line things were moving smoothly until it hit a class that #included <list>. At this point it throws several errors about things not being declared. I have seen ...
I am new to JNI, this is a way i am tryig out.I defined java class as public class sample2struc{public String Myname;public void sample1struc() {};public void setMyname(String Myname){this.Myname = Myname;}public String getMyname(){return Myname;}}the c implementation JNIEXPORT jobject JNICALL ...
434 byte By
p7ea at 2007-11-26 23:27:23
My application consists of a bunch of java classes (in a jar file) plus a large native library.How do I bundle these together and make it easy for the user to deploy and toset up the java.library.path to include this library location.I would like to put the native library into the jar file and ...
i calling main method using jni as follow (*env)->CallStaticVoidMethod(classsName, methodId, args);and it is work well can i get the CPU time of the main method
879 byte By
omarh93a at 2007-11-26 23:33:52
Ok so this is my last ditch attempt at trying to find a solution to this problem.I'm using JNI to access Java objects from my C++ code. It works fine, but we're adding some new methods that the Java programmer hasn't added yet to the JARS, so my c++ code is calling "GetMethodId" on methods ...
370 byte By
yaketea at 2007-11-26 23:35:07
Hi,I need to write an app that read/write accesses memory on a Windows XP, outside the JVM. I am aware that this can not be done with java, and must be implemented with native calls from JNI.As I am not familiar with neither C or C++, I need some suggestions on a JNI example including dll, that ...
First question, is I have my JNI code split into separate header and c files reflecting the Java classes I'm using to call a 3rd party dll. Originally I tried to compile all of them on one commandline. This gave me a lot of "redefinition" errors or warnings. So now I am compiling each file ...
Hi everyone,I want to instantiate java object from php so that i can pass values(string) to/from java code.I got access to variables from PHP application in to java code by using URL .to try instantiating i wrote$abc = new Java( "name of the java code" );but it gives error that it cannot ...
Long story short, I am trying to write a Java program that gets input from and sends output to the Windows console (System.in, System.out). I need it to be aware of each keypress when it occurs, rather than after an entire line is returned.I've been researching this for almost a week now, and ...
Hello,I have written a small C function to display HelloWorld message. I am calling the C function from a java program through JNI. The program is working fine under HP UX 11.11 system. But the program is not working under HP-UX11.23(v2). Could you please let us know why this is ...
I am running through the steps detailed in the JNI tutorial here: http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.htmlIs it up to date? For some reason I cannot build the DLL using the Microsoft C compiler.This is what I am trying, and this is what I'm getting:cl /I ...
I am new to java....i want to know that how can i track a requested address sent from IE and also to track the reply coming back to IE for that request....Someone plz help me....Thankz in advance....
Hello,if I call a java-class from c++-code and the java-class imports a package (not java packages, but writen by myself), then the calling misses :-(If I call this class without the imports - it works!C++-Code:jclass cls = env->FindClass(javaClassname.c_str());if (cls == 0) {//error- cls is ...
Hi everyone.I hope someone will be able to help me as it drives me crazy.Here is the whole story:I am currently developing a new system that has something to do with linguistic and text analysis. After months of research, I have finally found the perfect parser. It is the link grammar (for ...
Hi everyone,I have a problem with a program and I am not sure how to do something:I have a system that has to load a dictionary and then do something with it. The whole data structure of the dictionary is written in C.Now I have a library that loads it and I want to use the loaded dictionary ...
I have the following problem:At my home desktop I have the following memory use:- 160 MB Linux (Debian) after start- 50 MB additionally after starting a first java-applikation- 60 MB additionally after starting a second java-applikationSo together 270MB memory (swap memory = 0). Everything ...
Hi there!I've been using Java for so many years without worrying much about the virtual machine concept behind it but recently it produced more and more interest for me. I think I understand how an virtual machine works but there's one thing I would like to know - It's a topic I couldn't ...