123 byte By
prateeka at 2007-10-2 14:05:09
hello every bodyi hav some problem i want to access each of the process running on system can i get it
678 byte By
gevasa at 2007-10-2 14:07:26
We have a win-dll that uses the invocation-API to run some java-processes.We have a java-Application that uses this dll via jni native functions.The java-Application uses java 1.3.1. The dll uses Java 1.5.Wen starting the Application we get errors like "_JVM_SupportsCX8@0" not found in ...
I'm accessign a java class from C using JNI: The JVM exists and I can access the class fine:jclass cls;//java classcls = (*env)->FindClass(env, "MyClass");However when I put the class in a package I can't access it cls = (*env)->FindClass(env, "mypackage.MyClass");Does anyone know How I ...
Dear All,How can I programmatically determine that whether an object is ready to be garbage collected? I know that the garbage collection process is not guaranteed to occur until the JVM is close to running out of memory. Yet, it is also said that an object is ready for garbage collection if ...
This is my first stab at JNI.I need to call the following C function in a piece of legacy code from within my Java application:int foo(int argc, char *argv[]);This function is typically called from the C program's main() hence - the same parameters.Ideally, my java method would either 1. ...
Hi,I use a DLL that exposes methods from a class named MyClass. The main problem is that in DLL code MyClass doesn't have package, so I have methos like: Java_MyClass_MyMethod.Now I need to use the DLL from a packaged class and CAN NOT change the DLL methods name.Is there a way to do this? (I ...
330 byte By
jslowa at 2007-10-2 14:11:12
student class was created with the student records and a courseRegistration class. the program read the student data and write the output in another file. my question is on how to create a class PadUtility that has public string padLeft (String, int) and string padRight that will help in ...
254 byte By
sanja at 2007-10-2 14:12:12
Hi,I am getting following error message"SPARC V8 processor detected; Server compiler requires V9 or better.Use Client compiler on V8 processors. on solaris 2.8 (sun4d)" What may be the reason?Thanks,Sanjay
500 byte By
Loyadaa at 2007-10-2 14:12:55
Hi everybody,I need to read and write to the serial port (just a common RS232)from my Java application, running under Windows.The Java Communications 3.0 API (javax.comm) works with Linux and Solaris only, as I understand it.Do you know a way to read and write to a serial port from a Windows ...
570 byte By
nirvaa at 2007-10-2 14:14:37
I'm developping a C++ application embedding a jvm. Everything works fine except a problem of handle leak under windows.It appears that the AttachCurrentThread function allocates 6 handles (1 thread type and 5 event type handles) but the DetachCurrentThread releases only 4 of them (2 Event ...
I have deployed my application in Oracle 10gAS, its is using sun hotspot and jdk version is 1.4.2.From Oracle support I got the information saying the default is set by the vendor and its 64MB.Could anyone tell me how to find heapsize using any command or thru .jar files. basically i need to ...
1714 byte By
gevasa at 2007-10-2 14:16:51
Hi!I'm changing the classloader of the current thread with following code (using the jace-Wrapperclasses for JNI):using namespace jace::proxy::javastd::vector< net::URL> urls;urls.push_back( net::URL("file","localhost", jarfile.getAbsolutePath()));lang::ClassLoader newLoader( new ...
I have written a FTP Server that is used by the clients to upload xml over to the server.Currently it is using a console and it is printing stuff out on a console.I have tried a lot to implement a logger class so that all console messages get written to a file.But it has not been working out at ...
While running eclipse, my java virtual machine crashes. I am running the linux version on openSuSE 10.0. I have re-installed both java 1.42, java 5, and eclipse. Now the error is right at eclipse startup as opposed to a random point. Any assistance would be much appreciated.This is the error:VM ...
Hi I created a noddy JNI app that consists of a Java Class: MyJavaa javah generated file: MyJava.ha C DLL created using borland: MyCDllMyJava has one native methodpublic class MyJava{{System.loadLibrary("MyCDll");}//staticpublic static native void outputTestString();}//MyJavaAll the above works ...
395 byte By
kaps81a at 2007-10-2 14:22:23
Hi.JNI + Generics ?I just managed it to call methods like MyClass.f(String a) but i cannot figure out how to call methods with generics in its signatures.The signature string i used for the former method is: "(Ljava.lang.String;)V" and it works well but what is the corresponding signature ...
Does each single instruction take the same time to execute as all the others (like a normal pipelined machine), even if one takes arguments and the other is just an instruction that requires no arguments?
Hi,I want to print reports from internet explorer using an applet and java plugin (1.5.0_04).The applet it isn't signed. The code which give me trouble is :...PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);..Sometimes (very often) the "services" array is empty ...
205 byte By
Jguya at 2007-10-2 14:23:02
Does JVM create an exe to run the final application? If that is the case why isn't java providing a technique to save that exe instead of running the 'java' command always when we want an output?
Hi. I was wondering how you can throw and catch exceptions in a dll written in c using JNI which calls java classes. I program is working; however, I need to catch some exceptions that are defined in the java classes. Please help. Thanks in advance.
1325 byte By
lenta at 2007-10-2 14:23:20
Hi,Class loaders are suppose to throw constraint violation (Linkage Error) if a class with the same name is loaded by two separate class loaders if the class being loaded are not the same class. How is this equality of classes checked for? Does it have to come from the same location (jar file) ...
Hi. I want to create a c-struct whose values are assigned by getting fields from java using jni. For example,in java: I have some variables, such as: string a;byte[] b;someClass s; // this is another class who has its own variables}Now, I am able to get the values for each variable; however, I ...
5407 byte By
mettkeaa at 2007-10-2 14:24:42
Hello all:I'm having a problem with a multi threaded application. The application is used to bridge an exsisting C++ application with an exsisting Java application so I went with a JNI implementation. After I completed my implementation, I found that the bridge would crash after a few hours ...
7992 byte By
sphynxa at 2007-10-2 14:25:52
Hello!I have some problem with Java Virtual Machine. I have runned my program many times and there was the same JVM error after a few minutes of execution. My programs is listening to the network interface, captures packets using JPCap and stores some information about traffic in the ...
456 byte By
atulsama at 2007-10-2 14:26:02
I have manually uninstalled microsoft jvm from my machine and after that installed sun JVM manually i.e by set up not online but my browser is not considering and still giving message of jvm not available please install. Why?I tried1. j2re-1_4_0_04-windows-i586.exe2. j2sdk-1_3_0_05-win.exe3. ...
Hi,We are running application server using java 1.5, tomcat 5.5 ...The problem is that the JVM is allocating memory continuously.If we look at the JVM memory from JConsole everything is OK the amount of memory allocated in the heap does not grow significantly.If we look at the JVM memory ...
I'm working with jni for java and c in fedora core. I could compile sucessfully but at the last step while executiton it is giving the follwing errorException in thread "main" java.lang.UnsatisfiedLinkError: no HelloNative in java.library.pathat ...
Hi,i'm compiling the jni code but it is giving some errors likedbmaplib.cc: In function `_jbyteArray* Java_ReadFile_loadFile(JNIEnv*, _jobject*, _jstring*)':dbmaplib.cc:17: error: base operand of `->' has non-pointer type `JNIEnv_'dbmaplib.cc:26: error: invalid conversion from `void*' ...
569 byte By
mikew75a at 2007-10-2 14:34:47
Hello All,I've just changed my monitor, and at the same time my screen resolution, and since then, I can't see any java 2 applet anymore.I have 2 screens on my computer, when I switch the window on the smaller screen, after refreshing the app, it appears correctly, if I switch it back to my ...
Sorry for this requirement posted here.i want to know where i can get the java virtual machine source code.plz,tell me .thank in advance!!!
All,I am struggling with a problem I can not seem to find a solution for. I hope someone else can see something I am missing.I have some code:jarFile = new File("somejarfile.jar");scriptName = new String("scriptToLoad");ClassLoader loader = new java.net.URLClassLoader(new URL[] { ...
Hi allIm working in a binding for the xine library, however im getting some mistakes related to native awt starvation, when my native thread calls xine_play() the native thread named AWT-XAWT delays dramatically the processing of all events. Before my thread calls xine_play():Group ...
2018 byte By
ViktorSa at 2007-10-2 14:37:51
I hava problems with inner classes in JasminXT.I wrote:;;This is outer class.source Outer.j.class Outer.super SomeSuperClass.method public createrInnerClass()V.limit stack 10.limit locals 10;create a Inner objectnew Outer$Innerdupinvokenonvirtual Outer$Inner/<init>(LOuter;)V;test function ...
i m unable to set jvm memory
now ,i try to transfer a object over the internet.class OneStep implementsSerializable{...}I use ois = new ObjectInputStream(new BufferedInputStream(socket.getInputStream()));to receive the object ,thenOneStep onestep = (OneStep) ois.readObject();// get objectI want to know how to get the end ...
66 byte By
mb2696a at 2007-10-2 14:40:02
how do i convert a primitive int array in c to a jintArray?
5710 byte By
linjiea at 2007-10-2 14:40:13
Im confused that when a FULL gc will be called?By looking from my output, it seems the jvm called a FULL exactly if new generation was mostly filled up (tenured/permanent generation despite ). is that correct ? is it a truth? im appreciate if any helps..Snippet from gc output (FULL GC spent ...
hi , i am completely new to this part of java . i have worked with rmi and simple j2seand j2me programs . I was wondering how u can make programs that can be run on windows os without using the command line . i read sumthin about jar files somewhere but frankly speaking i dont know anything ...
14725 byte By
GaneshMa at 2007-10-2 14:40:50
Hi All,I am using a C++ dll which calls into Java Code using JNI. I have also gone through the online tutorial on JNI.I have a class named InvokeFop whose code is shown below:class InvokeFop{public:InvokeFop();~InvokeFop();int IsMemoryError() { return m_MemoryError; }const char ...
//java codepublic class postFuncPointer{public static void callback(int flag){switch(flag){case 1://do somethingbreak;case 2://do another...break;default:break;}}}public class Handler{public static native myHandler(postFuncPointer obj);}//C libtypedef void(*FUNC)(int flag);int init(FUNC ...
i pass a object to a native interface and invoke the method of this object.the code follow://java codeclass CallMethod{public static void calljava(){System.out.println("call java method!");}public int i;}public class JNI {public native void jniFirst(CallMethod obj);public static native int ...
i am trying to write infixToPostfix, this is the algorithm, but there are some problems is anyone can check it for me..thankspublic String infixToPostfix(String exp){ stack shunt = new stack();String pofix = "";for ( int i=0;i<exp.length();i++){ switch (exp.charAt(i)){case '(' : { ...
hello, I hope you can help me. In the moment I am trying to use Global Hotkeys. I am able to register global Hotkeys from Java in C++. My problem: I can't invoke an other java method as result of pressing my hotkey. void OnHotKey(void *){printf("invoke my java method");}so I want to do a ...
Hi!I'm trying to execute the command below, but can't get it to work. I have tried diffrent ways, but none of them seems to work :(The command i want to execute (under windows) is:"net localgroup administrators"and copy the output to a string.Here is my code (The commented //Test is just ...
what is heap memory ? how it works ?how to implement concept of heap memory ?pls help me...
665 byte By
pbarvea at 2007-10-2 14:43:47
Hi,I have an activex control which I want to exposed to Java using JNI.I have created required java classes using IBM Bridge2Java and used those in a Swings based application.The user interface of Activex control appears properly if I add object of corresponding java class to a class which is ...
Hello Friend,I have allocated all my Physical memory to JVM ,Means i have 512mb physical memory, and i have allocated 512mb to jvm,is it possible to crash my os,because i have allocated all physical memory to jvm.is it harmful for my pc.plz let me know the ...
294 byte By
fai828a at 2007-10-2 14:44:31
I have a method ,it return String arraybut I don't know how to get the array~~~public static void main(String args[]){String b2=a1();}public String[]a1(){String a2[]={"a","b","c","d"};return a2;}would you mind teach me~thx~
818 byte By
Sibmada at 2007-10-2 14:45:25
Hello good people,I am running a simulation which creates a lot of threads (I can set the number of threads to be created). However, at a certain number of threads, I always get the same exception:-Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread-I have ...
I am running into issues that are similar as reported in bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6345743 is there a public build that has a fix for this issue? (it doesn't seem to be part of update 6