jObjectArray with different Types in it?

220 byte By rowagnera at 2007-10-3 2:27:42
Hi,I need to return three different values (int, byte, string) from a C++ function over JNI into Java. Is it possible to put them into one jObjectArray without converting them?Best RegardsRolf

Debugging a JNI dll

197 byte By helgefredriksena at 2007-10-3 2:28:21
Hello,anyone have any clues on how to debug a JNI dll from visual studio? Just attach to the Java process in question, and place your breakpoint?Regards,Helge Fredriksen

JVM Spec: A reference to an interface that is not a reference to an object?

1741 byte By thpreussera at 2007-10-3 2:29:23
Both bytecode operations checkcast and instanceof take an objectref on the operand stack to check it against some time refered to via the constant pool. While their principal purpose and function are clear, there is, however, a somewhat puzzling section in the spec:The following rules are used ...

JVM issues after applying August Microsoft secuirty patch MS06-040

815 byte By vhbsca at 2007-10-3 2:30:13
We applied Microsoft patch MS06-040 as part of our corporate patching policy. After the patch, java apps that were running fine started to give the following error.java -Xms512M -Xmx1024M -versionError occurred during initialization of VMCould not reserve enough space for object heap(See ...

Java VM Matrix

175 byte By KevEadya at 2007-10-3 2:33:13
Hi everbody,Does anyone know if there is a download for Java 1.5 on Windows Intel 64 bit ?I can only find the AMD 64bit one.Thanks in anticipation.

JVM crash for RCP/SWT application under windows

51294 byte By tessa at 2007-10-3 2:33:16
Hi,We are running an RCP application under windows which uses SWT components .Intermittently the JVM carshes.I doubt SWT is the prime suspect or JVM?We are unable to identify the exact sequence in which the crash occurs.I'm attaching some hs_err_pdi* log files for the abnormal crash.Any ...

JNI and Delphi Issue

3620 byte By jork_berfkina at 2007-10-3 2:35:41
Hello, I am trying to link a Java application to some Modula-2 DLLs and I am using a wrapper I have written in Delphi. I have downloaded the Delphi unit JNI.pas from http://home.pacifier.com/~mmead/jni/delphi/JEDI/DOCS/delphi-jni-1.html -> this contains methods to connect Delphi and Java.I ...

Win32 Handle from Java

636 byte By stephemra at 2007-10-3 2:43:05
I've been using this guide: http://java.sun.com/j2se/1.4.2/docs/guide/awt/1.3/AWT_Native_Interface.htmlI didn't see this doc in the 1.5 stuff and have read lots about deprecated methods, etc. But I'm a bit confused as to whether or not this should work.I realize a canvas with a button. When ...

Writing Java Plugin for Complex C/C++ Program

781 byte By nheilmana at 2007-10-3 2:43:54
Rewriting the C/C++ program is out of the question, but my company wants a plugin that's in Java, using the JNI. The interaction for this plugin requires calling Java methods from the existing C/C++ code, instead of simply calling a separate program. So, I'm writing a test application to make ...

passing a string from a java program to a C++ dll to a VC++ dll

14508 byte By nejal@motorolaa at 2007-10-3 2:43:59
Hi, I am terribly stuck up at a point in my code where I need to do some passing around of strings.I have a java program which passes a string to my C++ dll (through JNI).In the C++ dll i convert thi string i.e. the jstring to a char* as follows:char* cText = (char ...

Help me please.. I have to create JNI+DLL to call dll function

1129 byte By Paisal_da at 2007-10-3 2:49:54
I have following files1. aaa.java2. aaa.class3. aaa.h4. aaajni.cIf source code of aaajni.c has only printf("xxx");everything works fineBut I have to write my source code in aaajni.cto call function in5. bbb.dllEverytime I try to compile my aaajni.cD:\workspace\TestJniDll>cl ...

core dump in 238th call to CallObjectMethod

2400 byte By snirwania at 2007-10-3 2:50:05
Hi,Please can anyone help me with this problem. I have searched net but couldnt find an answer. I have a C code. this function when called in a for loop for 238th time it fails at exactly myjstr = (jstring) env->CallObjectMethod(obj, mid,args,args1);c code:char* getComplexTag(JNIEnv *env, ...

JNI DLL on Windows XP crashes when lots of memory is available.

1201 byte By pete.flugstada at 2007-10-3 2:51:18
I'm using the RXTX COMM jar/DLL for Windows XP (replacement for javax.comm API) from: http://www.rxtx.org/This uses JNI to talk to the Windows SerialPort/COM devices. When I use the stock binaries from the developer (built with GCC 2.95), they seem to work in all situations I test them.For a ...

perm memory usage* ConstMethodKlass

318 byte By SteveSullivana at 2007-10-3 2:51:54
We have been trying to determine what objects are filling up our perm space. We ran jmap and monitored the growth of objects. The ones that are continue to grow are named * ConstMethodKlass, * ConstantPoolKlass and * ConstantPoolCacheKlass. Does anyone know what these are from and what is ...

Consistently high YoungGen (ParScavenge) GC times

922 byte By zarnovicana at 2007-10-3 2:52:10
Expected YGC times are around 0.1s. "Sometimes" my YGC times jump to 10s level and stay there. Because the YGC is long and frequent JVM spends high portion (10%+) of time in GC. It is not a lonely GC peak, it is a GC duration that is consistenly above some level (3s, 5s, 10s or even 20s).Our ...

Tool for generating JNI Wrapper DLL

361 byte By pragati_desaia at 2007-10-3 2:52:31
Hi,In my project I need to access methods from third party C++ DLL using JNI.For that I will have to write a JNI Wrapper DLL.I am a java programmer and have no idea about C++ programming and creating DLLs.Is there any tool available that can generate wrapper DLL for me out of that third party ...

User-defined ClassLoader#findClass is not invoked

2429 byte By Sunny_Daya at 2007-10-3 2:52:51
Hi,The ClassLoader java doc says: Subclasses of ClassLoader are encouraged to override findClass(String), rather than the loadClass(String, boolean) method. I assumed that the user-defined findClass method will be invoked by the loadClass defined in the parent - ClassLoader. Thus I implemented ...

Superfluous bytecode generation?

1237 byte By mkrauskopfa at 2007-10-3 2:56:29
Just curious. Why the code like: public static void main(String[] args) throws Exception {new mk.Dup1(); }is translated/compiled by javac into (using Jasmin syntax): .method public static main([Ljava/lang/String;)Vnew mk/Dup1dupinvokespecial mk/Dup1.<init>()Vpopreturn .end methodAre not ...

How to fix the Memory full issue?

791 byte By JaLearnera at 2007-10-3 2:57:47
Hello,I am trying to check the available memory before loading a table into memory, but I am getting "Memory full" error the first time I run this code and try to load a table but after running the same code couple of times I am able to allocate memory without "Memory full" error. Can anybody ...

Mark objects as permanent

2190 byte By denismoa at 2007-10-3 2:58:41
Hi,we've got an application which is a text processing and analysis tool. It has a main analysis cycle where the application spends most of its time. As it goes, it collects some data and saves them in memory data structures (mostly, hash tables). The amount of the data is big - gigabytes, and ...

jvm Could not reserve enough space for object heap

872 byte By kyle999312a at 2007-10-3 3:04:35
For the past 6 months or so I have been running a JVM with -Xmx at 1024m which was working fine. Recently it just stopped working. There have been no changes to any configuration that I am aware of and I could only get it to launch back up at 512mThe error it was giving is the Could not reserve ...

Trouble launching VM inside of JBuilder

2376 byte By egc2224a at 2007-10-3 3:06:31
I get this error message and don't know what to do:-- Cannot start Java debug process VM --com.sun.jdi.connect.VMStartException: VM initialization failed for: "C:\Program Files\Java\jdk1.5.0_05\bin\javaw" -classpath "C:\Documents and ...

Excecute .bat file from VC++

326 byte By Amodnka at 2007-10-3 3:11:18
Dear All,I have created a java swing application. application.bat file is created to execute this application on mouse double click. Now we need to integrate this with our parent application which is created in VC++. Could any one help me on how to invoke / call bat file from VC++ code.Thanks ...

env->NewStringUTF returns NULL in VC++ code

1610 byte By atul_pa at 2007-10-3 3:14:37
I have a main method in a VC++ class, in which i am creating\instantiating JVM.In main method i am calling a method of my own utility class to create JVM.I am cacheing JVM pointer in a private member variable.While creating JVM i get one environment variable env i.e. JNIEnv interface pointer ...

How to read AIX heap dump

295 byte By remoliechtia at 2007-10-3 3:15:14
Hi thereI have a java core dump generated because of OutOfMemory. I created a heap dump out of this core, but it's not readable by a text editor. The core and heap dump are generated on an AIX.How do I convert the heap dump into something readable?Thanks,Remo

Keep C pointer between JNI Call

398 byte By sdegardina at 2007-10-3 3:15:41
Hello everyone,I'm just starting with JNI.I'd like to know how to keep C pointer between JNI Call.So :I've a C merthod wich create a handle to a specific hardware (a connection).But i don't want to always recreate such handle, i would like to keep it.So, what's the solution ? jniEnv ...

JDK 1.4 - JDK 1.5 Xms-Xmx parameters and performance tuning

382 byte By serkandemira at 2007-10-3 3:16:27
Hi guys,Might Xms - Xmx parameters cause some performance decrease in JDK5.0 theoritacally?I have been doing some benchmarks on our application and noticed such a performance problem. I have put the tests and results into my blog. ...

Call my Java application from C

240 byte By rdifalcoa at 2007-10-3 3:18:50
Is there a way I can create a DLL to a running instance of my Java server that another C++ application could load in order to make calls to my Java server?Basically, I want to add a C api for a few methods into my Java server.

JAVA_HOME and PLUGIN_HOME

346 byte By omyna at 2007-10-3 3:19:29
howdy, im a linux n00b, and just started a java class in school.i am running ubuntu atm, and so far ive found most of it pretty user friendly.im trying to run java_vm but i get an error:"java_vm process: You need to set both JAVA_HOME and PLUGIN_HOME"does anyone know what i need to do to fix ...

Where can I download j2sdk1.4.2_X(64bit) for windows AMD64/Xeon(x64) ?

21 byte By panda.and.bambooa at 2007-10-3 3:19:58
Anybody know ?

What is the meaning of 'Unknown: thread_state' when using -Xprof?

1124 byte By tzaeschkea at 2007-10-3 3:20:15
I'm trying to find a performance bottleneck in my java application.Between 30% and 60% of the execution time are always in "Unknown: thread_state":E.g. (excerpt): Thread-local ticks: 0.2%35 Blocked (of total) 0.0%2 Class loader 0.0%3 Compilation 38.6% 5521 Unknown: thread_stateFlat profile of ...

NoClassDefFoundError

1257 byte By Neo2001a at 2007-10-3 3:20:51
Hi FriendsI have java version "1.5.0_03"Java(TM) 2 Runtime Environment, Standard Edition(build 1.5.0_03-b07)Java HotSpot(TM) Client VM (build 1.5.0_03-b07, mixed mode, sharing)I was executing simple core java inheritence program. earlier it was executing but then suddenly runtime error ...

NewString LPWSTR length

429 byte By newio_a at 2007-10-3 3:21:42
I have a LPWSTR string, and need to get it into java using (*env)->NewString(env, lpwstr, len)Problem is, i cannot get the length of the f'er! Whats the quickest method to get the length of the LPWSTR string?I've looked at that WideToMultiByte **** but i can't make sense of it. Can't ...

Type of the value popped by the astore instruction?

281 byte By Sunny_Daya at 2007-10-3 3:23:07
Hi,I would like to monitor the assignment to a local variable of java reference type. But the astore instruction may pop a returnAddress type value. How may I check if the popped value is of returnAddress type or a reference type? Thank you in advance.-- Sunny

How to get JRE path from C, CPP applications?

378 byte By a1prashanta at 2007-10-3 3:23:18
The JNI_CreateJavaVM fails at runtime because it doesn't get correct JRE path. Can anybody help me get the ways to get correct JRE path at runtime?Do I have to read any registry entries for this?Are there any ENVIRONMENT variables set for this?Do I've to hard-code it?Any pointers are ...

maximum heap size suddenly decreased

1022 byte By fabuleya at 2007-10-3 3:24:22
I have a Windows 2003 64-bit server w/ 20GB that I'm running the 32-bit VM on. For the past several months I have been able to run VMs with the maximum heap set to 1500M. Recently I am no longer able to allocate 1500M. The maximum I can get now is about 1024M. The system has over half of the ...

jmagick produce image in memory?

2075 byte By little1981a at 2007-10-3 3:24:52
Hi friends,I want to produce image via jmagick. But I don't want to produce a real file. So I produce image which save in the memory. When jmagick process completely, image will transfer to client.I wrote sample code, as follows:ImageInfo info;MagickImage image;MagickImage ...

Access violation Exception in JNI VC++ code.

2243 byte By atul_pa at 2007-10-3 3:26:12
I have a main method in a VC++ class, in which i am creating\instantiating JVM.In main method i am calling a method of my own utility class to create JVM.I am cacheing JVM pointer in a private member variable.I am using following code to create an object of class ...

final method

117 byte By bangaru.reddya at 2007-10-3 3:26:46
final methods r not overridden.at what type of sichevation we can use final method?give me any example?

find CPU idle time

203 byte By free-side-disha at 2007-10-3 3:26:53
Can anybody help me out in finding the cpu time or cpu usage percentage for a particular process in windows xp environment.Any suggestion should be of a great help.ThanksMuthu

Hot Spot JVM Crashes Urgent pls help

32301 byte By jagdishraoa at 2007-10-3 3:27:38
Hellow expertsconfig-Java 1.5.0.08tomcat 5.5.17Os :Ubuntu Dapper Linux and Windows Xp PofessionalJasperreports1.2.2.jar for reportsMysql Databse 5.0i am working on a Swings based Java appl where i am using jasper reports.the database is Mysql.i have some reports which are simple listing of ...

Stucking at the System.loadLibrary()

352 byte By barco.pradeepa at 2007-10-3 3:31:55
Hi All,I have created a dll in c++ using a C static library. The dll has been built sucessfully.But when I try to load it using the System.loadLibrary() the there is no response , it stucks there only and control doesn't move to the next line .Please suggest the way to overcome it.Thanks & ...

How to change JVM options from a running JVM

1269 byte By Irisa at 2007-10-3 3:32:42
Hello, I have to launch a remote application on my machine. I managed to do that with code that invokes the main method of the application I want to execute. What I do is to launch an instance of the class containing main function, here is an extract of the code:Object obj = ....; //obj is the ...

Callback to java from another C Thread

821 byte By ilsetraa at 2007-10-3 3:33:25
Hello everyone!I'm fussing around with the following problem.I call a c native method (InitX) from a java. This method in c creates a thread, that listens for something. If something is received within this thread, the thread does a callback to the java method receive(jbyteArra ba) in order to ...

JVM Hotspot error and Core dump

5402 byte By ssr075a at 2007-10-3 3:35:20
Here is the output from gdb against the error. If anyone has an idea of what could be causing it, please let me know.ThanksShankarGNU gdb Red Hat Linux (6.3.0.0-1.90rh)Copyright 2004 Free Software Foundation, Inc.GDB is free software, covered by the GNU General Public License, and you ...

building jdk source code on red hat 9

7959 byte By ap_mitraa at 2007-10-3 3:36:07
Hi,I`ve been trying to build jdk 1.5(scsl version) on red hat 9. The following errors have been repeatedly bothering me. If anyone has compiled the source code successfully, please help me out.I`ll post the errors here:linux i586 1.5.0-internal build started: 06-08-19 20:34if [ -r ...

Calling JavaMethods from C

263 byte By santhosh143a at 2007-10-3 3:38:11
I have worked on JNI.In that i usually use C methods in and create a dll and use those methods in java.But i want to write my application in C and call Java methods.Is there any way to do this.Tell me step by step so that i can understand well.Thanks a lot

Calling JavaMethods from C

263 byte By santhosh143a at 2007-10-3 3:38:12
I have worked on JNI.In that i usually use C methods in and create a dll and use those methods in java.But i want to write my application in C and call Java methods.Is there any way to do this.Tell me step by step so that i can understand well.Thanks a lot

Threads not completing on native side

1500 byte By crasypantza at 2007-10-3 3:39:49
greetings. i'm attempting to send and receive data to and from a usb device. i have all the driver code completed and a C++ class i'm using to represent the device. in my .dll i declare an instance of this object, "MyDevice device." in java when i load the library, device's constructor is ...

prevent JVM to exit when native code calls exit(1)

175 byte By tk@mailinator.coma at 2007-10-3 3:41:41
Hello,Does anyone know if it is possible to prevent the Java Virtual Machine to quit when exit(1) is called in a native method?Thanks in advance!TK