1643 byte By
hajath at 2007-9-26 13:36:43
Hello all This is very urgent for me.I am using the follwing code to invoke the child process which calls a shell script in the unix OS,and it is going fine when runs in single thread. But if i run it as the multhreaded appln, anyone of the thread hangs in the 'Process.waitfor()' call. But ...
Hi All, I am using IE5.0 (or) above browser for my application. Browser is closing some times not frequently saying this below error on desktop. Here, I am using Java Plug-in 1.3.1_01. Any idea about what is this problem?An unexpected exception has been detected in native code outside the ...
658 byte By
lbauer2 at 2007-9-26 13:39:08
Hi,I'm having trouble getting Java to run in mixed mode on Linux (same behavior was observed on Solaris/SPARC). When I open a shell, typing "java -version" will tell me that Java is in mixed mode. If I run my application, however, it'll run extremely slowly, and after execution typing "java ...
242 byte By
lei.shen at 2007-9-26 13:41:07
I always get aSIGSEGV: Segmentation Fault on my solaris box.There is no JNI code in my application.I tried both 1.3.0 and 1.3.1_01.Any idea where to look for fix.Thanks,lei
200 byte By
wlzhang at 2007-9-26 13:41:15
Every time I write jni code using c I need to complie to dll and run java code. I can't debug the c code from the java side. That's trouble. Anybody know a faster way to debug? Thanks!
266 byte By
112763 at 2007-9-26 13:41:25
Does anybody know why I get an unsatisfiedLinkError when I try to use ostream or cout in Jni C++ program?If I use printf instead of cout then I'm okI did include the <iostream.h> and <fstream.h> in the Jni C++ program.
I'm calling a native method from a thread. The native method gets data off the PCI bus, then copies the data to a jbyteArray to be returned to the java code.While this is happening, will the thread block on IO? I'm not clear how code in JNI interacts with threads in general, but this is a ...
336 byte By
vivmenon at 2007-9-26 13:43:45
I wanted to know what is the maximum value that one can give to the JVM( -Xmx command) for jdk1.2.2I have Server application that I want to start on a 16GB SUN Solaris machine if the max memory as I understand is 2GB(for the -Xmx command), then how do I utilize the remaining 14GB for maximum ...
Hi, I am trying to compile a C application which interacts with JVM directly. It requires files like java_lang_Throwable.h, java_io*.h files and so on.. I can only find the following files in my JDK include directory:java_lang_String.h, java_lang_Class.h,java_lang_Thread.h, ...
361 byte By
Gedebuk at 2007-9-26 13:55:49
Hi,I would like to convert a jstring (which is an argument in a method) to a C++ char*. How to do that?I think it should be something like:JNIEXPORT void JNICALLJava_HelloWorld_displayHelloWorld(JNIEnv* env, jobject obj, jstring str) { char* text= ?; ...}Thank you for your answer :-) ...
457 byte By
rvy2k at 2007-9-26 13:56:17
Hi,I have a Thread that has a pause and resume method. I also have 2 Jbuttons that call those two methods.When I press pause, the program hangs.Thanks in advance for your help.public void uPause() {try {synchronized(this) {this.wait();}} catch (InterruptedException e) {}}public void wakeUp () ...
437 byte By
jnibecke at 2007-9-26 13:57:13
I have a application, which is packaged in a JAR file. I would like to include a DLL in the JAR file, which would allow me to invoke native methods using Java Native Interface on Windows systems. How would I go about using the loadLibrary() method to load the DLL from the JAR file? Also how can ...
692 byte By
ad24482 at 2007-9-26 13:57:15
Greetings, Sending a SIGQUIT with JDK 1.2.1 on Solaris (Sparc) produced a thread dump followed by a nice menu like the following:^\SIGQUITA SIGQUIT has been received. Do you want to: [ 0 ] continue program [ 1 ] check & print one deadlock [ 2 ] check & print all deadlocks [ 3 ] dump ...
385 byte By
edwindsy at 2007-9-26 13:57:28
my program works very well under Visual Age environment. but after I exported it and run it in JKD1.2, the following error message always comes up: java.lang.verifyError ( class **$IvjEventHandler, method:actionPerformed signature(Ljava/event/ActionEvent;)V) Inconsistent stack height 1 != 0 can ...
369 byte By
suew2 at 2007-9-26 14:00:10
Hi, I have a C++ library which I want to use from my Javacode. I have looked at the tutorial on JNI and can see how tocall C++ methods, but I'm told I need to be able toinstantiate and interrogate classes from the C++ libraryin order to use it. Is there a way of doing this please ?CheersSue ...
222 byte By
aymen at 2007-9-26 14:02:02
Is it possible to package some class files into one jar file, all class files are independent executables. Then be able to execute any particular class file from the jar file. How can we do this.Thanks
399 byte By
tkmoran at 2007-9-26 14:02:34
In my native C++ code I have to call a function through another dll. This function has an OUT parameter which is of type: char *.I need to return this parameter to the calling Java method through the native C++ code using JNI ...is the corresponding JNI type that i should be returning ...
7281 byte By
deangelc at 2007-9-26 14:03:52
I have a C++ program that uses JNI to make some calls into Java code. This program loads a shared library which in turn loads the JVM. This works alright on Solaris 8 SPARC using JRE 1.3.0, but not on HP-UX with JRE 1.3.0.01 - with either the classic or hotspot JVM. With either case, the JVM ...
7281 byte By
deangelc at 2007-9-26 14:03:59
I have a C++ program that uses JNI to make some calls into Java code. This program loads a shared library which in turn loads the JVM. This works alright on Solaris 8 SPARC using JRE 1.3.0, but not on HP-UX with JRE 1.3.0.01 - with either the classic or hotspot JVM. With either case, the JVM ...
790 byte By
backmask at 2007-9-26 14:04:08
HiI am working on a small program using reflection to print out information about classes. A very simple program but I have a problem that I dont know how to solve. I hope someone can help me out. The problem occurs when I first specifie the classname for the class the program will display the ...
I am IT guy and I am creating a platform ( a roaming desktop) based on internet environment. Right now I'm using Novell Server as backend to provide file storage place. My dream is that let the corporation develop their own applications (ie. Accounting, MRP, HR etc) based on my platform and ...
712 byte By
tdugger at 2007-9-26 14:10:05
I'm just trying to run 'java' to show the usage and it hangs. When doing a -verbose:class, the last few lines of output are:[Loaded java.lang.ref.ReferenceQueue from /usr/local/jre/lib/rt.jar][Loaded java.lang.ref.ReferenceQueue$Null from /usr/local/jre/lib/rt.jar][Loaded ...
322 byte By
satish29 at 2007-9-26 14:10:17
From java when i pass an Object with a string field having a valid string value, the string value whichNative C++ method receives is Junk value..This problem occuring only with JDK1.3With JDK1.2.2 this is problems doesn't occur..Any ideas why this is happening..Thanks in advance ...
333 byte By
112763 at 2007-9-26 14:11:10
I have unsatisfiedlinkerror when try to use ofstream. Did anybody else have this problem on Solaris 2.8 and figured out why?, please let me know the solution. I have tried everything and could not get it to work. Could it be that stream stuff are not ANSI C and on Solaris, JNI version does not ...
1142 byte By
pheanix at 2007-9-26 14:11:33
pls can anyone tell me if i can have the following in a method?(WHOLE CLASS)class SuperMethod{public static double aTaxRate (double currentSalary){if (currentSalary < 6000){currentSalary = currentSalary * 0.15;return (currentSalary);}else if ((currentSalary >=6001)|(currentSalary <= ...
I have a 64bit unsigned int in a datastructure generated by a native method.What would be the best java type to cast it to, before returning the value? Thanks, Than
4155 byte By
cgeraght at 2007-9-26 14:11:43
I discovered that using synchronized blocks in code compiled w/ SDK1.4 compiler generates byte code that won't run under JDK1.2. Specifically, 1.2 VM throws a java.lang.IllegalMonitorStateException and terminates execution of my program when it encounters a synchronized code block. . . ...
98 byte By
ktannous at 2007-9-26 14:12:06
please help!...is there a way to find out how many instances of the jvm is running..
424 byte By
MKumar at 2007-9-26 14:12:16
I have a simple application server that supports scripting languages at server side, very similar to asp supporting VBScripting or JavaScript and jsp supporting Java.Please tell me if I can call JVM from my C++ code and ask it to execute a given Java code?Similarly, if I have some code written ...
The question below was attached to the answer for Question of the Week No. 21. I'm having the same problem. Does anyone know the answer? Put another way does anyone know how javaw does it?Fri Dec 18 09:59:52 PST 1998rkarasekOn Windows NT 4.0, how can I prevent CreateProcess()from creating a ...
731 byte By
vickyk at 2007-9-26 14:17:57
Hi ,I am not new to java and had worked on the server side java.After one year of my experience I feel there is lots and lots to learn in java.Now I am concentrating mostly on the concepts of Object oriented programming. In java I can under stand the use of class. But once there is the ...
I encounter problems in my new project.My client uses websphere as their app server and put ejb on it. They are now trying to introduce an image server on another machine to deal with image processing function. The image server provides some visual c++ lib calls and functions for programmer to ...
1325 byte By
cdore at 2007-9-26 14:19:34
Hi,on W2K using JDK1.3.1...I tried, from my own executable, to launch a JVM in remote debug mode. My IDE for Java is Idea, so it provides me the arguments to provide to that function :-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000the other ...
788 byte By
cdore at 2007-9-26 14:19:40
Hi,using W2K with JDK1.3.01.I have a C (in fact Objective C) program that creates a JVM using JNI_CreateJavaVM. I encountered a case where this function stop my program when a problem occurs (which is when I try to launch in remote debug mode, and it cannot find dlls for this.)This is a big ...
I am IT guy and I am creating a platform ( a roaming desktop) based on internet environment. Right now I use Novell Server as backend to provide file storage place. My desktop platform just like a graphical terminal and enable the user to bring up this terminal by a browser. That means no ...
I am IT guy and I am creating a platform ( a roaming desktop) based on internet environment. Right now I use Novell Server as backend to provide file storage place. My desktop platform just like a graphical terminal and enable the user to bring up this terminal by a browser. That means no ...
At one point in my program, I performing calculations on number of rows(~600,000). I use JSP & JAVA. Here are some things I noticed.1. It's very slow! :-)2. Initially, the cpu monitor shows a high level of cpu utilisation, but this slowly drops off with a blip every second or so. ...
385 byte By
veazy at 2007-9-26 14:24:58
1. the jni code looks like this:char * x = malloc(10);jstring y = env->newStringUTF(x);//free(x)?return y;//back to javashould I use free(x) after i have created jstring from it?or does java pin out the memory of x to y (not copying it) so freeing it will cause damage to jstring object ...
370 byte By
Urmech at 2007-9-26 14:25:59
Hi, my problem is that when i start my application with the jar-File ("Main-Class: " in the Manifest), it 's very slow.When i start it withjava -hotspot -Xincgc it works fine.So my question is: how do I have to set these options in the Manifest of the Jar-File?Thanks a lot in advance.Michael ...
192 byte By
tkmoran at 2007-9-26 14:27:27
Does anyone know the proper JNI method calls to convert the following:1. "jbyteArray" to type "const unsigned char* " 2. "unsigned char* " to the "jbyteArray" type?
991 byte By
spetroff at 2007-9-26 14:27:34
I am having problems with a system configuration issue. It involves attempting to debug a program inside the IntelliJ IDEA IDE.javaw.exe crashes with an "abnormal program termination" when constructing the first JDialog. I've traced it through the sequence that does execute and it is failing ...
706 byte By
y2kmvs at 2007-9-26 14:28:07
The structure of the LocalVariableTable is described in the book "Jave Virtual Machine Specification" at http://java.sun.com/docs/books/vmspec/2nd-edition/html/ClassFile.doc.html#5956 . The start_pc and the length fields in the local_variable_table entry are specified to be of datatype short, ...
156 byte By
jongwc at 2007-9-26 14:30:06
i have a program written in Visual C++, i wish to add some more features to that program by using Java.Is JNI the only way to do that?
Hi,I have just downloaded the source code for the Java 2 SDK v 1.3Is the documentation for the source code available ? Thanks
359 byte By
ckoehler at 2007-9-26 14:33:03
Hi!I've got a very basic question:Why can't I find native declared methods in JFrame or its superclasses? At which time (and how) is the OS contacted and delivers an opening window?Are the dlls in jre/bin used for this?I would be very thankful if someone could answer this.Kind regards,Carsten ...
429 byte By
ccdmjp at 2007-9-26 14:34:01
Hi,I've just installed JDK 1.3.0.2 on a windows2000 box and now every first logon after a reboot i get the error :"Unable to find main class, program will now exit"The box header is 'Java Virtual Machine Launcher'Jdk is installed into c:\program files\jdk1.3 and the windows environment path ...
Hi, I am a student doing research in garbage collectors. I need some large java programs to study how the garbage collector in java performs. Please let me know where can i obtain such large programs (upto 3000) lines of code.Thanks.
730 byte By
kamranA at 2007-9-26 14:39:58
Hi Java Gurus:I am using jni to call some C++ functions. I did everything right, everything worked. Then I decided to move some of the native method declarations to a different class, where it made more sense. Re-did everything many times over. That means running the javah utility, re-compiling ...
Hello,I have been trying to launch my default web browser from my java application, but am unable do it. Right now, I am using - "Runtime.getRuntime().exec("cmd /c start <url>"); to launch my webbrowser. It launches the browser but displays the command prompt for a second or so, and then ...
I have written a Java/Swing application. Currently I use the Sun's JRE 1.3.1 to run the app and its great. But is it possible to use Microsoft's JVM and run this application? If Yes how and if not why not?Thanks a lot,Sudha