The finalize method

584 byte By stonest at 2007-9-26 8:02:19
I'm developing a rmi server that makes some jni calls to C++ dll's. The problem is that when I shut the server down, (currently done by Ctrl+C) I want the server to call a clean up function in the dll.I thought the way to do it would be to have a finalize method call this function for me, but ...

kaffe Segmentation fault on arm-linux?help!!!,please!!

249 byte By xuanyonghe at 2007-9-26 8:03:10
Hello:I successfully crosscompiled kaffe for arm-linux.but when I test it with HelloWorldApp programe,the system reported Segmentation fault.What's the reason?I really need your help.Thank you.Best Regards.

multi Cpu and threads

694 byte By pszawlow at 2007-9-26 8:04:12
Hi all,I work on a dual Pentium CPU with Win NT 4 and use Java3D. When I monitor the CPU load when running a java 3d application then both CPUs are working for that application.Now I started to learn about threads and noticed that there is a method called currentThread() returning a single ...

JNI Probs!!!

1326 byte By dugg_ee at 2007-9-26 8:04:15
hi, having some real headaches trying to compile my C++ code while linking to 'jvm.dll', this is the command i issue at the dos prompt:"cl -Ic:\jdk1.3\include -Ic:\jdk1.3\include\win32 -MT invoker.cpp -link c:\jdk1.3\jre\bin\classic\jvm.dll"then the output is as follows:"Microsoft (R) 32-bit ...

JVM.dll not in classic directory.

878 byte By smiths at 2007-9-26 8:04:38
I have a C++ application which uses JNI_CreateJVM() to create a virtual machine and then make calls into it. When I compile, I build against the JDK1.3\lib\jvm.lib file, and when I run the code it works fine, but only when I include the path to the JDK\jre\bin\classic\jvm.dll. If I try to run ...

Can i implemented JNI on already written C++ dllss

208 byte By balamuralid at 2007-9-26 8:04:40
Hi,I am new to JNI. I have some dlls written in c++.can I use directly JNI on those dlls without changing the C++ code?. please let me know.Murali

Where javaw.exe is ?

235 byte By ValeriK at 2007-9-26 8:09:28
I'm preparing InstallShield installation...I have to find javaw.exe file and full path to this file/it's java bin directory/.How can I do that ?Thanks in advance !!!Best Regards,Valeri

Unable to locate jvm.dll

401 byte By SWP at 2007-9-26 8:11:20
How do I get my native program to load the default VM?Unless I put my program in the same directory as jvm.dll it won't run.I assume that I could do other things to add the folder that the jvm.dll file is in to the paths searched for DLLs, but I would have to determine that at run time. ...

Out Of Memory Error

642 byte By javamaheshb at 2007-9-26 8:12:38
hello,Iam creating two objects of a class at a time.In this class one of the method calls another class,which is used to extract required text data and put that extracted data in vectors.My Problem is, when iam creating first object its working fine, but for second object its giving Out Of ...

HELP!!! URGENT!!!How do I make JNIEnv and jobject global

1412 byte By mon03 at 2007-9-26 8:16:01
Hi!My JNI code uses a library made by another company. The mentioned library accepts requests but does not return the result/answer of requests in the usual way as return result. Instead, it calls my JNI callback method. The problem here is that my JNI callBack method in turn needs to call my ...

JNI FindClass Error!!!

525 byte By asiriw at 2007-9-26 8:16:04
Hi AllI am writting a C++ wrapper for some Java methods I wrote. The methods I wrote make use of the jaxp1.0.1, XML parser package and the xqlpdom_1_0_2 package. The problem is that when I comment out the import statements which import the above packages the FindClass method succeeds. Otherwise ...

c++ to java migration

133 byte By surdee at 2007-9-26 8:16:40
Need some points/documents that explain the performance improvements when migrating a web based C++ application to java

How to avoid a stop of the JVM when logoff?

402 byte By lyranet at 2007-9-26 8:17:23
we have noted a problem that occurs if theJDK 1.3 java runtimes are used in a system running Window NT. Services with this embedded VM willstart normally and run, but the VM will stop when the user logs off.(This behavior does not occur with JDK 1.2.2 or JDK 1.1.x VM's.)Does somebody know how ...

how to use jni:DefineClass()

246 byte By shark29 at 2007-9-26 8:19:55
hi, is somebody here who can explain the DefineClass(JNIEnv *env, jobject loader, const jbyte *buf, jsize bufLen) -function? nowhere in the net i found a codesnippet. what means 'jobject loader' in the parameterlist?

Analysing .hprof files

233 byte By rabichandani at 2007-9-26 8:22:52
We generate .hprof files which contains information about heap ...and other things .Does anone have an idea as to how to analyse the same?Is there a tool available?HAT 1.0 does not seem to work with jdk1.3

how to ivoke Java within native window

270 byte By CChrisB at 2007-9-26 8:23:18
The JNI tutorial says that JNI can be used (for example)to add applet support to a browser.Whenever I invoke classes via JNI they create their own top-level windows. How can you invoke java so that the application runs within a native window?

How to run JNI in VisualAge 3.5

396 byte By anneff at 2007-9-26 8:24:15
hi, I can run my JNI in command (.java .h .dll .class), but i am failed when i put them in VisualAge 3.5 (professional).problems:1. I am not sure where to put the .dll and .h files, i put them in the resouce.2. i can NOT get the result in the VisualAge, and no error output.it is very important ...

How to Unload Class from VM

502 byte By ambarish_v_vaidya at 2007-9-26 8:26:28
You have a package having 2 classes. These are standalone applications. Both the class represents frames. Parent and Child. You run the application. From the parent u display the child. Now when the appln is running, remove or change the child Class. The appln still runs. I want to unload the ...

Can JNI transfer Image?

226 byte By anneff at 2007-9-26 8:26:50
hi,do you know if JNI can transfer Image from C++ to Java?i know JNI can transfer int, double, and String ..., but how about Image. please give me some info. thank you very much

GDI

1380 byte By ssst at 2007-9-26 8:28:18
Helloo!!I am required to use JNI to efficiently load and paint thumbnail versions of the images that could be found in a directory. I have several questions that I have been pondering about, and I would really appreciate it if someone could kindly enlighten me.I plan to use libraries such as ...

how to write a jobject as return value

757 byte By bercher at 2007-9-26 8:35:42
Problem: I need to set (write) about 5-10 values in my c function to return to the calling java method. The values are all primitive types and jstring. The arguments for the JNI function are all passed by value, so they are only input.To my knowledge I can only use the return value for ...

LinkageError: trying to refine class xx.class (bad class loader?)

523 byte By kumaran2u at 2007-9-26 8:36:20
hi,am trying to define a class thru my custom classLoader by calling ClassLoader.defineClass() method . since fewclasses are generated by this application and need to load those classes into JVM for introspection. when i run the application in Visualage for java its works fine, but when i run ...

Incremental debugging

544 byte By gabollado at 2007-9-26 8:38:17
Hello,I manage to start a SilverStream (an application server) in debug mode adding the parameters: "+Xdebug +Xnoagent +Djava.compiler=NONE +Xrunjdwp:transport=dt_socket,server=y,address=8787"It is woking fine and I can connect remotelly with in VisualCafee and set break points, etc. My problem ...

help - can not create java VM

190 byte By lzhang97 at 2007-9-26 8:39:11
Please help. JNI_CreateJavaVM returns -1 to me from VC++ code on Windows2000. The same code runs on Solaris well.What could be the reason?Thanks,Lan

C to JAVA

286 byte By MSatish at 2007-9-26 8:40:03
Hi,I want to call a JAVA program from a C program. I want to send some input data to the JAVA. Also, JAVA program should return some data back to C. Is this possible? How can I achieve this easily?Any help in this is appreciated.Thanks,Satish.

multiple processes and multiple threads

880 byte By jhermst at 2007-9-26 8:40:12
On a frequent basis, we are seeing a child process spawned from our original process and we have not been able to pinpoint why. We are not intentionally spawning any processes. Would anyone have any idea why this might happen?These child processes come up and die within about a three second ...

want to use the C-code in java

348 byte By amli at 2007-9-26 8:41:00
I want to use a datacompression code written in C with visual java. I am able to make the .dll file but the mapping the data type char * of C to java equivalent is posing a problem. Can anybody suggest the solution or an alternative altogether.Please write the solution to the following email ...

UnsatisfiedLinkError

868 byte By jpearlm at 2007-9-26 8:41:10
hi,our platform is in Unix and we uses JNI to call a C-program.when we run our Java program in shell prompt, it executes the C-program without error. our problem is whenever we run that Java program in i-Planet, we encouter this error:Internal error: exception thrown from the servlet service ...

Just a question about Native Methods

279 byte By NathanEMoore at 2007-9-26 8:41:41
Now my question is can native methods be called from an applet?, return an image? If so will i get speed up in rendering. I am rendering a Fractal so depending on the zoom it takes a while to render, hence i am looking to speed it up.thanksNate

HELP: Norton Anti Virus CE 7.5 cause the illegal operation for java program

1065 byte By otnielp at 2007-9-26 8:42:21
Hi,Currently, my client using Norton Anti Virus CE 7.5 program. This program has a Realtime Virus Protection. When we enable this protection, it will cause our java application got the 'illegal opertion error' and the program will hang. The error message is something like this:This program ...

Using Deprecated API with Apache 1.1.1

1873 byte By raifA at 2007-9-26 8:44:28
I have a piece of source code that has to be run on Apache 1.1.1 and I need to find a replacement for the depreacted API this is the error I get:javac Conn*.java -deprecationConnectionOpener.java:55: Note: The constructor java.io.PrintStream(java.io.OutputStream) has been deprecated.out = new ...

Memeory Use by Java > 1.2 GB

286 byte By futurewizard at 2007-9-26 8:45:07
As per my knowledge java Can not use more then 1.2 GB of memory. What if i'm having more memory and want java to utilize dat. I mean if i have an application which require more then 1.2 GB memory to run sucessfully, what to do. can reach me on rohit@telelogue.com

Calling DLL from iplanet web server

456 byte By johnlin31 at 2007-9-26 8:45:32
I wrote a Java class to call a thrid party Java wrapper class for invoking DLL function calls. When I call this wrapper class from Java applications, it works fine, but when I try to call this from an Servlet, it gives me the following error. -- java.lang.UnsatisfiedLinkError: no COROJDK11 in ...

Oolong- where can i find it?

296 byte By ga11 at 2007-9-26 8:49:16
Ive noticed a few references to Oolong. As far as i know its an application that enables me to write programs usig JVM instruction set and compile it into a class file. Can anyone kindly tell me if i can download it, if so the address of the site.Thanks in advanceG.P.

MULTIPLE JVM

204 byte By HHANHI at 2007-9-26 8:49:33
I've been thinking if is it possible to run multiple jvm with different jdk, in a same server. I'm trying to build up servlet environment and I figured out possible need for different jdk.

serial & parallel port in Java

102 byte By siroj at 2007-9-26 8:54:37
Is it possible to set/unset certain pins in Java? kind regards, J.

Cost of Java Casting

209 byte By jochem1 at 2007-9-26 8:56:14
Hi Im trying to compare the cost of bitshifting to the cost of the casting of Java primitive types.How many atomic operations does casting require? Any comments?Jochem

Pathological Behaviour with Garbage Collection?

880 byte By piersc at 2007-9-26 8:57:38
I'm experiencing what I believe to be very strange behaviour in the GC...Running JDK 1.3.1 on Solaris, at a certain point the JVM starts doing a large number of Full GC's - and doesn't stop (one every couple of seconds - each taking up to 1 second of CPU). This can consume up to 60% of the ...

Rendering Directly to Swing (Please help...!)

1841 byte By ssst at 2007-9-26 9:00:39
Hi. I've got some questions regarding native rendering in Swing and was wondering if you could kindly enlighten me. I have tried to draw straight away onto the underlying peer component. But I wasn't sure how I am supposed to get the drawig surface. The heavyweight component that I obtained ...

Passing Strings as argument in a native method

872 byte By cosmin777 at 2007-9-26 9:03:49
Hi,I have to return from my C++ code a string. I have read that is not recommended to change the String object in the native function, so I chosen to work with StringBuffer. The problem is that when I call CallObjectMethod an exception is raised by StringBuffer.append : NullPointerException . ...

How to loadLibrary() from a Jar file.

549 byte By dhoffer at 2007-9-26 9:06:48
I want to package my native code libraries (DLL's and Lib's) inside a Jar file. This Jar file is my package that uses the native code libraries. When client applications use my package I would like them to have access to all the code including the native code.When the client makes a call to ...

Invalid global pointer in dll

915 byte By jeffyuan at 2007-9-26 9:07:47
I hope someone can help me with this... I wrote a JNI wrapper dll that accesses another commercial dll. This commercial dll exposes all its functionalities through a c++ singleton object. You access this object from an exported global pointer. I assume that this object is either statically ...

runtime exec

296 byte By tulp at 2007-9-26 9:07:49
hello all,I am facing a problem in writing code for a program which uses runtime exec to perform ping function in dos 6.11. please help me if you know about this code.send me code if you can . or atleast suggest me a good source where i can find the same.thanx

How I can find out size of maximum accessible memory for JVM ?

290 byte By Roos at 2007-9-26 9:09:22
Hi All!It is necessary for me to clarify the maximum memory size, accessible for JVM from the application. It is that parameter which transfers with key -mx... at start JVM. How I can make it, not reading directly the data from command file of start of the application?

Accessing typedefs via JNI

593 byte By tonyadamson at 2007-9-26 9:10:56
Hi all,I'm working on an interconnection program and have a Java UI running over the top of a C program which controls the sending and receiving.In my C file, I have a enum for the return status such astypedef enum { Send_Success, Send_Rejected, Send_Timedout} send_status;In the Java UI, I ...

different VMs

394 byte By hawleyjr2 at 2007-9-26 9:11:12
Am I correct in saying there are different Virtual Machines available. Everyone has heard of Sun's Java Virtual Machine (JVM) - Microsoft has their Microsoft VM - and I remember reading somewhere that IBM has a VM also. If all this is correct what are the differences? Pros/cons? I have ...

Applet not appearing under W2K

640 byte By vw5342 at 2007-9-26 9:11:21
I am attempting to test a Java applet under Windows 2000. After some issues of getting the applet to install (had to be an administrator to do that), I attempted to test my applet. However, nothing appears when the html page containing my applet is opened. This is the same for both 1.2.2 and ...

synchronized methods on HotSpot Virtual machine

798 byte By cheung_sy1 at 2007-9-26 9:12:21
I read an article saying synchronized methods are 100 times slower than ordinary unsynchronized methods. Does anyone know if this is true for HotSpot Virtual machine also? And does that mean in a single thread environment, when the thread calls a synchronized method, it is 100 times slower than ...

StackOverflowError upon deserialization

191 byte By jeffmathis at 2007-9-26 9:12:51
I apparently can serialize an object fine. However, upon deserialization, I'm getting a StackOverflowError. Is there something I can tweek to get a handle on this?thanks

JVM Memory Problems

760 byte By Indika1 at 2007-9-26 9:15:51
Hi All, I am running a server side application with HotSpot (server option) ,Weblogic 5.1 on Windows 2000 .I have about 1GB of Physicle memory.When I am running my Applications (Servlets) The JVM just eats up memory and does not release back to the OS.After some time the JVM crashes (OS ...