Sudden JVM chrashes (SIGSEGV) running JBoss 4.0.5 GA and JDK 1.5.0_11-b03

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 ...

Not able to access a function in DLL file

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 ...

Can java find out if a windows service is installed?

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 ...

JNative 2 function calls is not working

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, ...

JNI Version 1.2 in Java 6?

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 ...

Out of Memory PermGen. After increasing heap/perm size, get slow connect

691 byte By noteshamrocka at 2007-11-26 21:55:37
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 ...

displaying input/output of c programm on java gui

337 byte By generic-codera at 2007-11-26 21:59:27
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 ...

Using Java longs as pointers

1089 byte By jjones3566a at 2007-11-26 21:59:54
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 ...

JVM enhancement

88 byte By ice1972a at 2007-11-26 22:02:11
Hi,there is any way for propose an advancement of Java language?TIA

Pass an ArrayList of objects from C++ to JAVA using JNI

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, ...

Can I write JNI API which refer to C library which return a socket

171 byte By carfielda at 2007-11-26 22:04:26
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 ?

jni

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

How can I tell JVM to use as much memory as you can?

148 byte By carfielda at 2007-11-26 22:09:17
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?

Change your JVM heap size

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,

Error using a dll for acess the parallel port

763 byte By LeandroGuidaa at 2007-11-26 22:10:50
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 ...

Problem with structures

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 ...

UnsatisfiedLinkError, Access Denied and Parallels

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" ...

does JNI change file directory permissions inadvertently?

628 byte By paul.y.wanga at 2007-11-26 22:28:48
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 ...

send string from c++ to java

279 byte By XMAS1000a at 2007-11-26 22:33:53
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

Call Java Method from A Second Native Thread.

898 byte By Chris_G.a at 2007-11-26 22:42:46
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++ : ...

throwing Exception having multiple arguments in constructor

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 = ...

UnsatisfiedLinkError when compiling DLL on one PC and using on other

920 byte By AUTOMATONa at 2007-11-26 22:47:10
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. ...

GetStaticMethodID Problem

1054 byte By jjones3566a at 2007-11-26 22:48:17
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 ...

Path of JVM

161 byte By doubt_mastera at 2007-11-26 22:49:34
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.

STRCAT in C code crashing JVM, debug/logging how-to help needed

3961 byte By JerryTramadaa at 2007-11-26 22:52:15
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 ...

No Windows Server Mode -- Rationale?

258 byte By liminal1a at 2007-11-26 22:57:43
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.

Got error message from hotspot virtual machine

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 ...

How to get generation sizes in JVM 1.4.2?

454 byte By spatula6a at 2007-11-26 23:00:12
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) ...

problem with JNI on netBeans

927 byte By FloDeToursa at 2007-11-26 23:00:29
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 : ...

Java Native Interface (JNI) - can't load jvm.dll

421 byte By eldessokya at 2007-11-26 23:04:59
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 ...

Java Native Interface (JNI) - How to pass objects(Class Instance) to Java from VC++

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 ...

Java Virtual Machine (JVM) - How to determine tomcat-jakarta's JVM

125 byte By Deepak2001a at 2007-11-26 23:12:57
Hello,I am using jakarta-tomcat-4.0.4.How can i determine which JVM is used in tomcat web server.Thanks.

Java Native Interface (JNI) - Can I instantiate a Java Object from within my C/C++ native Code i

292 byte By sg678@yahoo.coma at 2007-11-26 23:15:39
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

Java Native Interface (JNI) - Standard library not found--cygwin and -mno-cygwin

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 ...

Java Native Interface (JNI) - how to handle the object returned from C to java

1186 byte By kots@indiaa at 2007-11-26 23:21:46
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 ...

Java Native Interface (JNI) - bundling a native library with my jar file

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 ...

Java Native Interface (JNI) - Can i get the CPU time of the main method

192 byte By eldessokya at 2007-11-26 23:31:20
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

After GetMethodID returns 0, future calls to it stop working

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 ...

How do I access memory on Windows, outside jvm?

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 ...

gcc with JNI

1017 byte By jjones3566a at 2007-11-26 23:35:58
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 ...

php and java

427 byte By C-ddhesha at 2007-11-26 23:42:02
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 ...

Simple Windows system call... SetConsoleMode

3090 byte By L4E_WakaMol-Kinga at 2007-11-26 23:42:15
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 ...

java.lang.UnsatisfiedLinkError: no HelloWorldImp in java.library.path

1216 byte By jnanprasadchukka@tcsa at 2007-11-26 23:44:23
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 ...

Help building a DLL using CL

2201 byte By L4E_WakaMol-Kinga at 2007-11-26 23:47:20
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 ...

how to track request sent by url of IE

220 byte By sanky_24a at 2007-11-26 23:49:00
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....

calling java-class from c++ misses

732 byte By XMAS1000a at 2007-11-26 23:49:51
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 ...

SegFault with JNI

1549 byte By david_roona at 2007-11-26 23:55:36
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 ...

memory problem

579 byte By david_roona at 2007-11-27 0:00:58
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 ...

Does a java-application need more memory while starting? (overheap-memory?)

1134 byte By lacarpe2a at 2007-11-27 0:01:20
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 ...

how is graphics output generally possible in a vm

1124 byte By Sandybutta at 2007-11-27 0:01:52
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 ...