Unable to open include file 'jni.h'

1106 byte By fbaldasseroni at 2007-9-26 3:39:04
I have tried to realize the example of jdc of June 12,2001: Using Perr classes whit the JNI. But when I compile PeerLib.cpp using Borland C++ on Win32, by:bcc32 -c -I/c:/jdk1.2.2/include -I/c:/jdk1.2.2/include/win32 PeerLib.cppthe compiler tell me:Error PeerLib.h 2: Unable to open include file ...

fail to create JVM in jdk1.3

1233 byte By linss at 2007-9-26 3:43:24
The environment is JDK1.3 in WinNT.The "jni_md.h" declares:#define JNIEXPORT __declspec(dllexport)#define JNIIMPORT __declspec(dllimport)#define JNICALL __stdcallWhile the "jni.h" declares:#ifdef _JNI_IMPLEMENTATION_#define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT#else#define _JNI_IMPORT_OR_EXPORT_ ...

Returning a newly create object from a C Native function

1278 byte By Lithyum at 2007-9-26 3:43:34
Hi all,I have a native C function that supposedly returns a new Object:... cls = (*env)->FindClass(env, "LMyClass;"); mid = (*env)->GetMethodID(env, cls, "<init>", "II(V)"); return (*env)->NewObject(env, cls, mid, i, j);} My question is: Is this snip code correct? I mean, ...

An unexpected exception has been detected in native code outside the VM

1543 byte By michiko72 at 2007-9-26 3:44:10
Hi thereI am developing a server/client application and I have problem with the client side. It is a heavy swing, caluculation-intensive application thats shows the information and images received from the server. It runs on win98. I was using jdk1.2.2 before and I never had this problem. Now I ...

An unexpected exception has been detected in native code outside the VM

1542 byte By michiko72 at 2007-9-26 3:44:11
Hi thereI am developing a server/client application and I have problem with the client side. It is a heavy swing, caluculation-intensive application thats shows the information and images received from the server. It runs on win98. I was using jdk1.2.2 before and I never had this problem. Now I ...

static member variables lifetime

570 byte By ashi70 at 2007-9-26 3:45:06
Hi,I am wondering if anyone know what is the life time for a static variable. Let's say there is a class called Test and it has a static hashtable object as memeber called hashtest. something like thisPublic Class Test {public static hashtable hashtest; }Now when class gets loaded by ...

Can I find an accurate JavaByteCode definition?

222 byte By AlexMerk at 2007-9-26 3:45:26
Hi!I m looking for good definition of semantics of java byte code. I m doing a JIT, so need it.Also I have sources of some JVM implementations, but...it's easier to have reference on documents.

How to unload .dll from java application.

119 byte By ramareddys at 2007-9-26 3:45:28
Hi,I want to unload .dll (Library) for an specific event (Custom event).Thanks in advance.

JNI Problem

598 byte By jusbe at 2007-9-26 3:52:14
Friends,I'm using a JNI interfacejava.lang.UnsatisfiedLinkError: connectat mmsc.SmppAPI.connect(Native Method)at mmsc.SmppService.<init>(SmppService.java:57)at mmsc.SmppService.main(SmppService.java:137)If I use only in a simple class it works.... but... If I use ina SubClass and make a ...

Windows XP console?

100 byte By dmonti at 2007-9-26 3:52:33
Does Windows XP support a scrollable console like Windows NT or is it like Windows 98?

Java & C++

293 byte By zivosh at 2007-9-26 3:52:41
Hi,I wrote a DLL in c++ that sends email in english,It gets the parameters as JStrings (to,subject,body).It worked fine.Now, when I try to pass these parameters in another language say french.It does not work.What can I do?

Invoking a JVM

1113 byte By Scorbs37 at 2007-9-26 3:53:20
Hello!I've got a java gui and a c++ engine that i need to connect. I would like to be able to, from java, call a native function that will create a c++ object, which in one of its methods, will creates a jvm and calls a java function. Is this possible? Currently, i am getting -1 value for my ...

urgent help, what do these exceptions mean

311 byte By naslund26 at 2007-9-26 3:53:30
I was wondering what it means exactly when a InternalError(Ex02),VirtualMachineError are thrown. im designing a programme which was working fine now suddenly it is throwing those errors, and for the life of me i cant figure out why and what they mean.Please can someone help. ...

UnsatisfiedLinkError

396 byte By pbroz at 2007-9-26 3:55:04
I have implemented native method in Win32 A.DLL. This DLL uses another B.DLL. If the B.DLL is missing thenI get "java.lang.UnsatisfiedLinkError: C:\dlls\A.dll: Can't find dependent libraries". This is right. Problem is that our system is very complex and I don't know which dependent library ...

JNI Strange Behavior

452 byte By jusbe at 2007-9-26 3:57:18
Friends,I'm receive a jni sample code for an api that I received time ago....I compile the code and works... but if I change the name of the program, for example :The program is called : xxxx.java and I change to : yyyy.java the program doesnt work.... I receive a error UnsatisfiedLinkErrorPs. ...

Detecting a timeout at the Object.wait(int) method

1040 byte By lcrespo at 2007-9-26 3:57:34
I am trying to code a simple semaphore class, but keep getting intoproblems.The first question is, is there a way of, after the execution of thewait(int) method, determining if it ended because of a notify() orbecause of a timeout?I want my semaphore to return any of 3 possible codes: ...

using the jre/lib/ext directory and your own directory

1127 byte By jeffmathis at 2007-9-26 3:58:55
I usually do not use the $JAVA_HOME/jre/lib/ext directory for 3rd party jars, preferring instead to specify jars via a carefully controlled CLASSPATH. But ...I'm using a 3rd party API, writing my own classes on top of it. I place the 3rd party jar inthe $JAVA_HOME/jre/lib/ext directory, and ...

Could not create Java virtual machine

503 byte By ecoknowmics at 2007-9-26 3:59:01
1) installed jdk1.3 2) Classpath is:"java -cp d:\dbrexe\;d:\jdk1.3\jre\bin;d:\Progra~1\MQSeries\java\lib\;d:\Progra~1\MQSeries\java\bin;d:\Progra~1\MQSeries\java\lib\com.ibm.mq.jar;d:\Progra~1\MQSeries\java\lib\com.ibm.mqbind.jar;C:\Progra~1\JavaSoft\JRE\1.3\bin; RR"In a WinNT environment, will ...

Spacename of a class loader

315 byte By Botella at 2007-9-26 3:59:06
Question:Does a class loader stores references for any class loaded by its parents after a request from itself to load a class? In this way the set of classes loaded for a class loader and the returned ones by its parent after a request would comprise the spacename of this class loader. ...

Crashing

141236 byte By javaDustin at 2007-9-26 3:59:28
OK Fellas, Bear with this thread. The stack trace is pretty long. Here is the situation. The JVM will crash for no apparent reason. We are running JRUN 2.2.3, JSP 1.0, JDK 1.3.1, ,HotSpot Server Edition, Type 4 Weblogic JDBC Drivers. The OS is IIS on Win2k and the database is SQL 7 on NT. The ...

If I use "JSP -> Java -> JNI" ?

208 byte By cofensen at 2007-9-26 4:00:17
When the Java -> JNI -> C is writen and tested OK.How can I use JSP to import the Class into JSP page?I tried. But failure.Have someone show a sample? help~ Q_Q

create a dll for JNI

899 byte By smqzhang at 2007-9-26 4:00:22
I have following problem when I try to create a dll liberary for for JNI C wrapper. I first type in the linecl -IC:\jdk1.3.1\include -IC:\jdk1.3.1\include\win32 -LD HelloTest.c -FetestLib.dllThe error message I got is:fatal error C1083: Cannot open include file: 'stdio.h': No such file or ...

which package is use for call jni

123 byte By vivekebox1 at 2007-9-26 4:02:20
i call jni from java bean.so which package is to be usedis there anyjava.jni.*; --> ?

Return custom java.io.FileSystem through getFileSystem()

634 byte By nicolaig at 2007-9-26 4:03:58
Hello world!The method java.io.FileSystem->getFileSystem, which is native, returns an instance of a java.io.Win32FileSystem on my win2k box. I want it to return a java.io.MyCustomFileSystem instead. How do I do this? Is there some JVM configuration setting (parameter or conf-file) like ...

java.lang.OurOfMemory Error

244 byte By rjkimme at 2007-9-26 4:04:03
I was creating EJB's using JBuilder and came up with this error. I realize that I am out of memory in my jvm but not sure how to correct the problem. I am using the JDK that was packaged with JBuilder. Any assistance appreciated.

UnsatisfiedLinkError

1220 byte By yongfengw at 2007-9-26 4:07:07
Hi, I'm trying to run following simple code on Unix:import java.awt.*;class Test {public static void main(String[] args) {String imgFile = "logo.gif";System.setProperty("awt.toolkit", "com.eteks.awt.PJAToolkit");Image image = ...

byte code

157 byte By barivarasu at 2007-9-26 4:08:22
is there any tool to convert generated byte code to java source code?if so can we change the applet programme which downloaded form net?

calling mil libraries from Java

911 byte By iceDani at 2007-9-26 4:11:16
Hello,I am developing an application for capturing video signals from a Matrox card. I want to display the image on a java panel and for this purpouse I need the window handler. My problem is that I don't know how to get this handler from java side and then passit to the "c" side.I succeed ...

Integration J2EE with native thread unsafe libs

368 byte By dudenko at 2007-9-26 4:12:50
We have old thread unsafe Solaris native libraries that we have to use in our J2EE application (1000 concurrent users). The first idea was to use JNI from EJB but in this case all beans will use the same instance of those thread unsafe libraries. Is there any pattern to resolve this problem? ...

For a class is ClassLoader called twice?

977 byte By jschell at 2007-9-26 4:12:53
Since I haven't written a ClassLoader I have to make some presumptions about it.One of those presumptions is that for any given class the ClassLoader is only going to get called once, when the class is loaded.It will not be called each time the class is referenced.This suggests that the jvm ...

Reverse - Engineering .dll's

430 byte By Rex_RacerX at 2007-9-26 4:14:31
Is it possible to reverse - engineer a dll to find its methods that are acceptable to call? I don't think this is possible, but i am just asking. Also, if this is not possible how does the jvm make calls to the local OS? Did Sun produce their own .dlls for each OS so they could access native ...

Generations

352 byte By jp_grenier at 2007-9-26 4:14:52
Anyone know what those generations are : - tenured generation - permanent generation - train generation - old generationI believe that one of the 3 first contains the newly created objects and that the old generation contains the old objects.Can anyone help on defining the 3 first. ...

Help needed: JNI and threads

912 byte By Jeff Caswell at 2007-9-26 4:14:59
I am having trouble with a multi-threaded JAva program accessing a C module. The C code was written without any regards to multi-threaded access from Java and uses static global variables. What do I need to do to make everything thread-safe? Lets start with the Java.Q: Do my native declarations ...

generating files on the fly

404 byte By mouha at 2007-9-26 4:15:18
Dear All, I'm generating files on the fly in a servlet in the server side to be sent to the client side via HTTP. When the client browser ask the client to open or save the generated file and the client choose save, the default name given to the file is the servlet's one. Does any one know ...

Tail recursion in the JVM

791 byte By castro at 2007-9-26 4:18:00
Why can't the standard JVM does not include tail recursion handling as IBM JVM does.It would be easy to implement.consider the method:Object foo(int a) {int b=a+1;if (b<555)return bar(b);}The code of foo includes or ends with 8 invokevirutal #4 <Method java.lang.Object bar(int)> 11 ...

How to Connect Server with JNI?

3783 byte By vkotasthane at 2007-9-26 4:19:50
Hi There friends,I have some problem. I have a server written in java and I need to send 5 double datatype values to C program using JNI(These values are obtained from the GUI client, this bridge between GUI client and Server is working fine....). So only after the client send these values the ...

Runtime.freeMemory() and Runtime.totalMemory() questions

1064 byte By ragnor at 2007-9-26 4:20:12
OK, can someone verify my assumptions about these two methods and memory allocation in general. My assumptions are as follows, please tell me if they are correct or not:totalMemory() should return the total amt of memory the JVM currently 'owns'. Some of this memory will be already allocated ...

Urgent!! PB write a program in C/C++ who start a JVM and invoke a method ja

3964 byte By SANCERRY at 2007-9-26 4:22:51
I try to write a program in C/C++ who start a JVM and invoke a method java.my program run fine if in my essai method, i do't call the JNI method ierror().but when i call the ierror() there's a bug :enter in essaiException in thread "Thread-0" java.lang.AbstractMethodErrorat ...

Java Settings for IE 6 URGENT

147 byte By manikk at 2007-9-26 4:23:12
How do I set up the ie 6 to use Java Plugin 1.3.1. I installed the plugin but it seems that it uses the Microsoft VM. Please HELP !!!

Specification of Microsoft Virtual Machine

378 byte By samjoseph at 2007-9-26 4:27:24
Okay, so from searching the lists I get the strong impression that the Microsoft Virtual Machine (MVM) doesn't support anything beyond jdk1.1, which is why we have so many problems with applets.So is there anywhere that I can get a specification of what the MVM actually does support, like an ...

Calling JNI methods after throwing an exception

351 byte By afloom at 2007-9-26 4:28:03
At http://java.sun.com/docs/books/tutorial/native1.1/implementing/error.html it says that "Calling arbitrary JNI functions with a pending exception may lead to unexpected results".Does this mean that after I've thrown an exception in my C code (via the ThrowNew method) I cannot use the, for ...

methods

106 byte By palmmjsg23 at 2007-9-26 4:32:33
What is the difference between accessing a class method by means of importing vs. extending?

Defaulting JRE1.3.1 in IE

362 byte By silvestri at 2007-9-26 4:34:00
Is there any way to force IE5.5 or IE6 to automatically use the JVM provided by the JRE1.3.1 instead of Microsoft's native JVM.I really don't want to convert my applets using the HTMLConvert program. I simply want to create a Java2 v1.3 JApplet and call it with the standard applet tag. Thanks ...

help me!! i don't know how to debug jni program!!

762 byte By zhansy_sniper at 2007-9-26 4:34:40
i have finished a jni program. but when i run the java project, some errors appeared. for i am sure the errors come from the native method ,i set a breakpoint on the native call and debug the project. for the jni program were written with c++, so when i choose "step into" , it dosen't step ...

Compile problems - Help Wanted

3684 byte By Jeff Caswell at 2007-9-26 4:37:12
I am doing something very similar to what is right out of Rob Gordon's JNI book but I am getting compile errors. This should be a simple one for you guys. Please help.Thanks...Here's the code: #include <stdio.h>#include <stdlib.h>#include <string.h>#include "jni.h"#include ...

Communication acrosss JVMs

474 byte By wdzhang at 2007-9-26 4:41:14
I hope some of you could answer my question here.My application has 2 JVMs running, M1 and M2. Both need to access a static class A. Is it possible that M1 and M2 share a common memory copy of this static class A, so that if I call A.setX(), both M1 and M2 could get the same new X value?Or to ...

why the cpu statistic up to 100%?

311 byte By shogun1234 at 2007-9-26 4:42:05
i got a problem when running servlet and jsp on win2000 and nt4.0 server, its cpu statitic up to 100%, all of resource almost be consumed by such strange behavor.what reasons may result in such kind of problem occurr?thanks in advice,please reply to shogun1234@mail2000.com.tw ...

Java system properties in the command line...

292 byte By lschwarz at 2007-9-26 4:43:25
Is it possible to know (at run-time) which system properties have been specified in the command line (using the -Dprop=value argument)?Actually I would like to avoid people running the JVM and using my program overwriting the user.name property.ThanksLionel

urgent problem with System > jni > java bean > jsp

450 byte By siv-viv at 2007-9-26 4:46:35
well i have a jsp page , what im trying to do is that whenever a client views my jsp page then his username (the one which he uses to get himself inside his system or in other words the username used to authenticate him to logon to his computer(OS) ) should be retrieved and shown on the jsp ...

Calling java method from outside of JNIExport Function

4458 byte By RummeL at 2007-9-26 4:46:40
Is it possible? From pure interest I created a dll which creates a c++ win32 API window. However i've ran into a problem, some code:C implementation.#include <jni.h>#include "HelloWorld.h"#include <stdio.h>#include <windows.h> #define APPNAME "test"#define VERSION "1"#define ...