Launching another VM instance using Runtime.exec()

635 byte By mandap at 2007-9-26 4:47:41
Hi,I have two separate Swing applications, say A and B. I need to launch B from A using Runtime.exec() - essentially I am launching another VM instance from one VM. I am encountering strange problems - B's main window comes up, but GUI doesn't update; sometimes B comes up and GUI updates, but ...

Delphi Double Linked List to Java

129 byte By Rex_RacerX at 2007-9-26 4:48:35
Does a Delphi Double Linked List correspond to any data type in Java?Thanks for your time,Nate

recompiled code - translation?

1758 byte By swingfreak at 2007-9-26 4:50:40
hello everybody out there,I have a little , but hard problem. I recompiled a class and everything is running fine, but one method was not really goog recompiled and it llok like a mix of VM-Instruction-code, assembler and java.May someone can translateHere is it: private static String ...

Can't seem to pass parameter to Java func from C

2088 byte By arsalanz at 2007-9-26 4:52:03
Hi.I'm writing a very simple program that creats a Java Hashtable from C and then returns it to the calling Java program; which prints it.Everything seems to be coming along fine, but Hashtable.put() throws a NullPointerException. I just can't seem to figure it out.The code's attached ...

JVM Signal Handling on NT and HP-Unix

1321 byte By kdastgir at 2007-9-26 4:52:38
HiI'm trying to catch various JVM shutdown signals in my application so that the application can do some clean-up before shutting down. Here is the code that i've written...sun.misc.SignalHandler jvmSignalHandler = new sun.misc.SignalHandler(){public void handle(sun.misc.Signal sig){// Do ...

outOfMemory Exception

135 byte By karine3 at 2007-9-26 4:54:29
I am getting runtime error outOfMemory Exception. I tried -mx64m but it didn't work.any suggestions?thanks

Weak References and the GC

840 byte By charlie76 at 2007-9-26 4:56:10
I'm developing a client for a server, and there are times when I need to refresh some data from the server. I was thinking about putting this data in a WeakHashMap because I only need it during the display of one dialog. The data takes up a large amount of memory, and I don't want to hang ...

Urgent!! i need help on invoking the JVM from C++

1811 byte By roshanpaiva at 2007-9-26 4:56:57
Hi.. I have tried invoking the JVM and calling a java class through c++ but all i get is "can' find class java.lang.NoClassDefFoundError (Wrong class path?)anyone has any ideas as to what i need to do.. i have set the path and classpath variables to my <jre>\bin\classic and ...

What is the first class/method called for JVM startup?

101 byte By 6tr6tr at 2007-9-26 4:57:37
What is the point of start when I type: java MyClassat a command prompt?

static method but instance field

934 byte By oscar121 at 2007-9-26 5:00:05
Greetings,I can't figure out how to modify a Java instance field from C, given the following :public class CFunctions {static { System.loadLibrary("mycfunctions"); }static public native int acfunction(String nativeInfo);}public class SomeOtherClass {String cNativeInfo;int ...

problem with loading library after creating jvm

287 byte By zeeshanarif at 2007-9-26 5:00:23
HiI have invoked jvm using C++. Now in my java class, I am trying to load a library something.dll.FindClass method returns 0. When I load the class without loading the library, it runs fine.Any suggestions?Thanks in advance.Zeeshan

JVM Memory Usage....

441 byte By lmitul at 2007-9-26 5:00:39
Hi all, 1) I am facing problem with cpu memory usage with my program even if i am setting -Xmx1m flag to simple HelloWorld program, CPU usage is around 3.4 MB. Is it should be like this only or what?2) For my real program CPU usage is most important and for that i have several jars in my ...

JVM does not come up...

1178 byte By zhivagoa at 2007-9-26 5:00:40
I've a java program when invoked normally (javac myClass), gives the following error:Exception occurred in main() of java.awt.Framejava.lang.ClassFormatError: AppLayer/CGroup (Code of a method longer than 65535 bytes)Well, I can understand this error. Still, without changing anything, if I ...

What about memory freed by Garbage Collector?

953 byte By cbayes at 2007-9-26 5:00:44
I just want to know how manages the unused memory the garbage collector.If you observe the amount of memory allocated by a GUI (swing) java application, you'll can see that seems to grow up for ever. If, for example, you open a dialog, the memory used by the program grows and never decreases. ...

weak,soft and phantom references

103 byte By ga11 at 2007-9-26 5:00:57
Can anyone kindly differentiate between weak. soft. phantom references?G.P.

redirecting standard error

709 byte By juszczec at 2007-9-26 5:01:00
HelloI've got:legacy c code that writes to standard errorJNI c code that calls the legacy stuffjava code that calls the JNI c codeI want to capture standard error and have it available in the java code AND I don't want to redirect stderr to a file and then read that back in.I ...

loadlibrary - Access Denied (java.lang.RunTimePermission)

781 byte By tho88 at 2007-9-26 5:09:04
Hi guys,I was wondering if you could help me.I am working in a Windows NT environment where I have developed a EJB to call some C methods via a DLL. In my java source code, I call the loadlibrary() function to load the DLL in order to call the C method.Unfortunately, I am getting "Access Denied ...

Unsatisfied Link error

909 byte By yeahking at 2007-9-26 5:12:13
Hi, I know that there are a lot of question related to this topic. But I couldn't find a solution to it.I got this Unsatisfied Link error when I ran the program:Exception in thread "main" java.lang.UnsatisfiedLinkError: /.autofs/homes/guest1/jhuang/project/samples/JNI/libhello.so: ...

attaching window system tray icon events to java frame

261 byte By zeeshanarif at 2007-9-26 5:13:38
I need to bring java frame to front on an event with the icon placed in the system tray. Like if I click the mouse on it.. the frame should come to front.Any body who can help, I will really appreciate.Thanks in advanceZeeshan

Help needed in UnsatisfiedLinkError

626 byte By ai_khim at 2007-9-26 5:13:59
Hi, I had this error when I try to run my java application:java.lang.UnsatisfiedLinkError: no Authentication in java.library.pathat java.lang.ClassLoader.loadLibrary (ClassLoader.java:1312)at java.lang.Runtime.loadLibrary0(Runtime.java:749)at java.lang.System.loadLibrary(System.java:820)at ...

Calling ActiveX ocx from Java using JNI

749 byte By stmoong at 2007-9-26 5:14:31
Hi.How can we call methods in an activex component using JNI without using the bridges?Say, I have a java application which calls a java class. This java class calls the C code, which in turn calls the ActiveX component methods. Is this possible without using the bridges?I tried using the ...

Javah : Class Not Found Error

829 byte By isaacmadhusudan at 2007-9-26 5:15:43
Hi .,I am trying to write my first native method under all windows (98/2000 and even under NT) environments , and I have written a simple java source(say MyProgram.java) ,as it is shown at the Javasoft documentation. This file compiles cleanly and I get the MyProgram.class.But when I then run ...

How much memory does JVM takes?

154 byte By potluri_durga at 2007-9-26 5:16:16
Dear all,How much memory does JVM utilizes to run? Is the memory usage depends on any factors? Thanx in AdvDurga

Unable to create multiple instances of JVM

556 byte By devp1991 at 2007-9-26 5:17:07
.I want to call a Java function from within C++ object. I have written an examplewhere I am creating instance of JavaVM inside a thread. The JavaVM is not gettingdestroyed even when the thread exits. Now I am not able to create another instance ofJavaVM from a new thread. Please suggest me how ...

JNI - (Java) Pass a String to C++/Return a String from C++

1576 byte By sinsai at 2007-9-26 5:19:29
I am trying to "Pass a string to C++" using JNI<~~~I am successful. If I "Return a string back to Java"<~~I am successful also. When I "pass a string" to a C++ function(within C++), I can't "return a string". To make it more understandable, using Java, I need to pass a String to C++. In ...

Multithreading

565 byte By JAndi at 2007-9-26 5:20:14
OK, there is a method with a synchronized block inside and there are two threads A and B which try to gain access to the object.Now thread A notices that it can't make use of the object, because it's locked.What will happen to A now? If both threads have a normal priority and use 50% CPU time ...

What class handles deciding if method called is Private/Public,etc?

194 byte By 6tr6tr at 2007-9-26 5:21:53
What class is the one that handles whether or not the caller has access to a method (i.e. when they call, it checks that it is private or whatever, and then allows calling or not)?

Capturing video from native side

563 byte By iceDani at 2007-9-26 5:22:48
Hello,I have a video camera for capturing video using mil libraries. I am using AWT Native Intrface for displaying the image into a Canvas. The problem is that the capturing function (from a dll in C) is delivering events to the canvas paint() method and the canvas is being painted all the time ...

Urgent - JVM API

563 byte By whitematter at 2007-9-26 5:24:26
Hi,How can I find out programmatically, if an instance of my applet is already running in the JVM? Does the JVM expose any such API?The problem is as such. I have an applet that runs in a browser. The classes that if refers to are all singleton. Now if a user opens a new browser using ...

Is it a bug in JNI...CallVoidMethod(..) giving runtime error?

457 byte By zeeshanarif at 2007-9-26 5:25:49
Hi I have invoked jvm using C++. I called the main method of my application and it is running fine.When I try to invoke another method of the same class that is not static by GetMethodID(..) and then CallVoidMethod(..), the ID is coming out fine but the call to the method is giving a runtime ...

Copying jbytearray into unsigned char array.

606 byte By rasikfulzele at 2007-9-26 5:25:57
I'm accessing jbytearray from Java to C++ program and want to copy the jbyteArray in C++ into array of type 'unsigned char' and of same length . Following code I wrote:JNIEXPORT void JNICALL Java_UserFrontEnd_ImageSensor_FPMMatch(JNIEnv *env, jobject, jbyteArray minut){unsigned char ...

Conversion of a C++ object to java(urgent!!)

80 byte By Jerrin at 2007-9-26 5:26:46
How can i convert a c++ object(returnred my JNI) to a java object?

JNI and GNU and Solaris, oh my!

441 byte By rmm2 at 2007-9-26 5:27:07
Hello,I have a problem and I'm really hoping somebody can help me with it. I'm trying to get a Java program to work on Solaris, which uses JNI code compiled with the GNU gcc compiler. My Java program hangs, typically when it is trying to start a thread or check the state of a thread.Does ...

How do I make a Word Doc?

56 byte By 6tr6tr at 2007-9-26 5:27:28
How do I use Java to make a word document?

How to call C functions from native functions?

727 byte By yeahking at 2007-9-26 5:28:38
Hi, I want to call a C function from a JNICALL?i wrote somthin like this:#include "ParamInput1.h"#include <jni.h>#include <stdio.h>#include "testPhase1.h"JNIEXPORT void JNICALLJava_ParamInput1_phase1(JNIEnv *env, jobject obj, jdouble tSim, jdouble tSup,jdouble iSim){ double ...

compile with jdk 1.2.2 and run with 1.3.0

259 byte By rpachipala at 2007-9-26 5:29:12
I am having a JVM crash when I run my application in jre 1.3.0. It says "Hot spot VM error". I compiled the application originally with jdk 1.2.2Is this supported? Are there any known problems associated with this?ThanksRavi

Calling C function that has Void* pointer

326 byte By derekcameron at 2007-9-26 5:31:39
HiI am trying to use some c functions in java using the JNI. This C function has 3 inputs, 2 integers and a void* pointer. I can import the 2 integers from java but dont know how to deal with the void* pointer.I would be greatful if someone could help me with this problem.ThanksDerek ...

Can a Native App load a JPanel?

425 byte By quietline at 2007-9-26 5:33:39
Does anyone know how (or if) I can have an application's window (built in c++) load a jPanel as it's only window contents?In other words, I have a java class file that is a jPanel (with a bunch of other things on it of course) that I want to basically be the gui of a window of a c++ native ...

JNI & jar files : use jar file in CLASSPATH when java is called from C code

520 byte By jccarrion at 2007-9-26 5:33:50
Before creating my JVM from my C code, I set its options and particularly :options[0].optionString = (char *) "-Djava.class.path=.:./toto.jar:<my CLASSPATH>when toto.class is in current directory, my C code can find itwhen toto.jar contains toto.class, my C code can find itwhen toto.jar ...

Why my program only runs once?

616 byte By yeahking at 2007-9-26 5:35:51
Hi, my friends:I have a java gui and a bunch of C files doing the calculation. But my program only runs once. It crashed the second time I run it. here is the error message:Local Time = Thu Aug 30 11:16:20 2001Elapsed Time = 18## The exception above was detected in native code outside the VM## ...

Invoking java methods from C/C++ on the machine with different JREs

1102 byte By kgemborys at 2007-9-26 5:37:06
I implemented Windows NT Service instantiating JVM and invoking several java methods. Everything works but I have an issue with running the service on the machine where multiple different versions of JRE have been installed. The service is calling java methods that require JRE 1.3 or later so I ...

Macintosh

161 byte By angelofraietta at 2007-9-26 5:37:55
Can I run Java programs that I devlop on my Windows machine on a Macintosh. If yes, where do I get the virtual machine to do it and how do I do it.

Here's a wierd one for ya' (JNI - JVM Maladies!)

2799 byte By KHeston at 2007-9-26 5:39:14
I'm at my wit's end, sorry for the abstract manner in which I'm going to describe this, I don't have time to write a novel about the intricacies of what the C code described herein does and I'm sure you won't have time to read it.I'm using JNI to wrap some C that's about a billion lines ...

Something you may not have noticed

968 byte By andyba at 2007-9-26 5:39:44
If you have publicly declared static variables declared in a class eg.package com.domain.package;public class AClass {public static final int A_CONSTANT 12;}javah will transform these constants into #defines whose names follow the name mangling conventions for classes run through javah.The ...

JNI with different versions of jdk

540 byte By hairsinl at 2007-9-26 5:40:02
HiWe currently have some JNI code that is running under jdk1.1.8. We are trying to upgrade to jdk1.2.2, and are fidning that the JNI is not working.Using jdk 1.2.2 I have re-compiled the Java class with the native methods, re-generated the javah header file, and made sure that the C program ...

function not found even though it's there.

555 byte By arsalanz at 2007-9-26 5:40:18
I getException in thread "main" java.lang.UnsatisfiedLinkError: startUpat com.directi.foundation.services.rrp1_4.RRPSession.startUp(Native Method)atcom.directi.foundation.services.rrp1_4.RRPSession.startSession(RRPSession.java:84)at ...

Join the Microsoft boycott!

107 byte By eeyvind at 2007-9-26 5:41:26
Join the Microsoft boycott.Check out: http://www.geocities.com/virtualexp/ms.htm

Threads that die in the middle of method calls

497 byte By cesnell at 2007-9-26 5:41:46
I'm having an issue where a thread dies in the middle of a method call and goes back (not sure if it really returns) to the main method. I'm using a SAX Parser for XML (Crimson) and after a minute or so of parsing the xml the parser stops in the middle of the characters()method. No exception ...

Obtaining a system information

626 byte By Tsoy78 at 2007-9-26 5:42:15
Hi, I have the environment, which runs Java web application. basically user makes some input on the website via interface, and gets a message to wat, and there are bunch of Jobs running on a background, via JMS. When it is done, user will get email about the completion of his task. (User is not ...

Difference in JRE and JVM.

244 byte By y2k4life at 2007-9-26 5:43:10
What is the difference between Java Runtime Environment (JRE) and the Java Virtual Machine (JVM)? Is this just a semantics thing? Is JVM and JRE the same, or is the JRE a bigger piece which contains the JVM? GB