Hello to All !I have a java class, that calls native methods through JNI.This java class use System.out.println() to output debug messages, the native methods use fprintf() to do the same.unfortunately the output of both is mixed up in my output file.I expect the follwing:1. start java app2. ...
302 byte By
lbettoa at 2007-11-27 2:35:54
Hiis there a way (or planned technology) that allows to modify code while the application is running?I mean, besides the class loader, to dynamically load a class, is there a way to unload an already loaded class and load another (compatible) version of it?thanks in ...
242 byte By
DionteWa at 2007-11-27 2:39:25
Hi.Is there a Window's API that I can make use of to get connection statistics for an LAN connection that I can call from Java code using JNI technology?I'm interested in the conneciton duration, bytes sent and received
Hi,I would like to know what is the default stack size of JVM of jdk 1.4.Is there any command which i can use to find the current stack size set up?Is the heap size & stack size same?Actually i'm getting a java.lang.StackOverflowError when i execute a class ProgramCallDocument which is ...
126 byte By
OldGuya at 2007-11-27 2:40:29
I loaded Java SE 1.6 on two of my computers....AOL Radio would not load on either. Re-installed 1.5 Aol OK....comments?
Unexpected Signal : 11 occurred at PC=0xF5C318DAFunction=(null)Library=/ap02/cfs/hyperion/essbase/j2re1.4.0_01/lib/i386/server/libjvm.soLocal Time = Thu Apr 26 06:15:03 2007Elapsed Time = 34870## HotSpot Virtual Machine Error : 11# Error ID : 4F530E43505002D5# Please report this error at# ...
I am using a very simple "Hello World" JNI example. It can be found googling I'm sure. Really nothing to it. However when I compile, I get that error.wk88:/workspace/newJNI/ jv -Djava.library.path=. HelloWorld Exception in thread "main" java.lang.UnsatisfiedLinkError: ...
676 byte By
golgotia at 2007-11-27 2:56:30
Hi everyone,My problem is I need to call a C++ dll from Java. Some tools like JIntegra are perfect for this, except that my DLL isn't a COM component.So I see 2 solutions, writing a COM wrapper for the dll (in C++, ouch), or using JNI (where I am a newbie).But for the second, all examples I ...
Hi,I am trying to call a dll functionality using JNI from a class that is inside a jar, but i am facing with the java.lang.UnsatisfiedLinkError message.i am able to load the dll but when i try to run any native mathod i get this message.Please help.Eitan.
363 byte By
chintana at 2007-11-27 3:05:03
I m looking for solution to protect Web application from piracy. I want my application run on web server for which it is built, & it musn't run on any other web server. how can i protect my web application from piracy?.Our .Net applications we protect using Hardware ID binding , How can i ...
276 byte By
dimkova at 2007-11-27 3:13:28
java -Xmx seems to work up to about 1500 MB on my PC. It has 2GB RAM.I do not know if it will help but I increased the virtual memory of Windows to 16000MB.So my question is there any way my application can run/have heap bigger than the RAM?
In my java stub program, I am trying to execute a shell program through Runtime.getRuntime().exec(). On forcible termination of the child process (i.e. killing shell program by callling Process.destroy()), it also terminates the parent process i.e. the java main program also. This same program ...
This is my first time posting so I'm sorry If I get this wrong...I am trying to install "Sun Java(TM) Studio Enterprise" which worked fine at home but at work I'm always getting java.lang.OutOfMemoryException. Using jconsole I can see that it sets the max Heap size to 66.7Mb which is used up ...
Hi all,I have been looking online and am a little confused with this whole JNI thing. I am under the impression that in order to use C/C++ functions, you have to write that code in a certain way (JNI_export or Java this and that in a C/C++ file).I have an existing DLL that I want to call a ...
12978 byte By
llpindda at 2007-11-27 3:17:15
Not always but sometimes the JVM crashes in Eclipse when i try to start my RMI server locally. the message i get is the following:An unexpected exception has been detected in native code outside the VM.Unexpected Signal : EXCEPTION_ACCESS_VIOLATION (0xc0000005) occurred at ...
Dear All,I am fairly well of in java/jee. I love listening to music when I am coding. Last Sunday, I thought I should be able to turn on my stereo which is some distance away from my desktop, using my desktop ( and through a java program)... and suddenly I felt like falling in an abyss with the ...
I am running application on Linux CentOS machine with Tomcat 5 jdk1.4.2 and My Sql 5.0.22. System has 1 GB of physical RAM. This is data intensive application.When I load test this application with 16 browsers hitting functionalities continuously for 2 hrs, memory usage becomes very high and it ...
424 byte By
JinKama at 2007-11-27 3:19:38
Pls tell me that where can i download the compiler and other required software?for instance, my window can regconize the cl command for building a dll file in win platform. So i don't know what should i do...=_="I want to build a dll and so file for win32 and linuxMy java app will call the ...
hiI have installed jdk 5.0 on solaris 7 sparc for 64 bit supportI am getting this error while giving java, plz help medl failure on line 717Error: failed /els/install/jdk1.5.0_04/jre/lib/sparcv9/server/libjvm.so, because ld.so.1: java: fatal: relocation error: file ...
two remote machines were connected and application was developed to enable chat but after a random period of time the application exists leaving an error message in the console window...T]he following is the error message## An unexpected error has been detected by HotSpot Virtual Machine:## ...
I am monitoring some events on C++ side and I get the time the event generated in milliseconds. ( DWORD evTime).So I want to send this to a Java method in milliseconds, so that I can construct a Timestamp object.c++ code:// DWORD evTime is time in millisecondsjenv->CallStaticVoidMethod(jcls, ...
7766 byte By
Liusua at 2007-11-27 3:38:25
The error trace like this:## An unexpected error has been detected by HotSpot Virtual Machine:## EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x10001d9c, pid=1944, tid=3204## Java VM: Java HotSpot(TM) Client VM (1.5.0_07-b03 mixed mode, sharing)# Problematic frame:# C [sample.dll+0x1d9c]# T H ...
505 byte By
Aldricha at 2007-11-27 3:39:01
new HelloWorld().printName("Aldrich");C++:JNIEXPORT void JNICALL Java_nativeloader_HelloWorld_printName (JNIEnv *env, jobject obj, jstring name){cout<<"NAME: "<<name;}Output:NAME:0007FAC8Question:How will i make it print ...
548 byte By
Noaa at 2007-11-27 3:39:23
Hello,I'm trying to use Runtime.getRuntime.maxMemory() on websphere 6.1I know that the max heap size is 256MB and i keep getting from the maxMemory method 1.98GB.I know that there is an open bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4686462 but it talks about a permanent dif of ...
Hi,I have a Java class calls C calls others java class ... in C , i need to use JNI_GetCreatedJavaVMs with a LoadLibrary.(Visual Studio 2005, JDK 1.6, JRE 1.6)static JavaVM *FindCreatedJavaVM(void){JavaVM *jvm = NULL;jsize jvm_count = 0;jint res=0;#ifdef __STATIC_LIB_JVMres = ...
Hi, We have got the following problem.application threads were stopped for a long time after Minor GC hava finished. Minor GC takes usally less than 1sec but a time application threads were stopped tekes often 100 sec.What's jvm doing then? alternatively we want to get more information when ...
413 byte By
ACaycia at 2007-11-27 3:41:26
Hi,I am reading the Garbage Collection with 5.0 JVM in the following link http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.htmlI am looking at graph in section 3. Is it correct of me to say that?PS Eden Space + PS Survivor Space = Young Generation (From graph)PS Old Gen = Tenured (From ...
I was trying to call Unsafe.defineClass() method of the class Unsafe but it always returns nullthe line code isdefineClass(name, arr, 0, arr.length) ;I opened the jvm.dll in hexeditor and found that there is no entry for this method in jvm.dll also.is this an error or I should use a different ...
151 byte By
flexeda at 2007-11-27 3:49:29
Is there any posibility to increase heap size dinamically, without restarting JVM with a line command like -Xmx256mIf so, please help me.
Hi,I am new to explore this fields...But I cant find any topics or threads talking about it at google.And I hasn't any clue now...So I need your help...Thank you very much
Hi,in the line:env->CallIntMethodA(bonhomme,move,arg2)I get "Access violation reading location 0x00000000"Initialization of the jvm is working fine, I'm also able to launch the main function of my class and the function is also found by:move = env->GetMethodID(bonhomme, "setPosition", ...
1872 byte By
fommila at 2007-11-27 4:04:56
Hi all,I have a numerical C library which I wish to link to using JNI. The binary will be shipped in the jar file to keep everything "clean" for the client.Unfortunately the SUN System.mapLibraryName method is completely useless when it comes to bundling binaries that are specific to an ...
Hello all. These days i've been asked to make a little aplication for a PDA and while looking for information about j2me it says jni its not supported. But the app i need to make needs to use some library written in C, and my question is if there is any way o making an application in j2me that ...
1657 byte By
AlexHua at 2007-11-27 4:08:03
Dear All,here is my environment:Fedora Core 6/Tomcat 5.5.23/JRE 1.5.0_11_b03.My Goal is to develop a web service to connect to a legacy DB with a C library.There is a shared library a.so that contains C APIs to connect to that legacy DB.so I decide to use JNI to access this DB through its ...
670 byte By
hillmia at 2007-11-27 4:10:41
On the command line, when I type 搄ava -version?I getjava version "1.6.0_01"Java(TM) SE Runtime Environment (build 1.6.0_01-b06)Java HotSpot(TM) Client VM (build 1.6.0_01-b06, mixed mode, sharing)when I type 搄ava -Xms32m -Xmx128m?or 搄ava -Xms32m -Xmx500m?I getUsage: java [-options] class ...
Hello everybody,i tried the example at http://java.sun.com/javase/6/docs/technotes/guides/awt/AWT_Native_Interface.htmlon Linux, but unfortunately there are no instructions how to compile the native code.So I tried the following steps:1. javah -classpath bin MyCanvas2. g++ -shared -fPIC -o ...
584 byte By
ACaycia at 2007-11-27 4:17:46
Hi,I am trying to understand the behavior of having multiple JVMs specifically the classloading. Are the application classes loaded only on one of the JVMs? Or they are loaded to all of the JVMs. If they are loaded only on one of the JVMs, then can I specify which class load to which JVM?Also ...
8613 byte By
velshina at 2007-11-27 4:20:03
I'm seeing a default java 1.6 memory usage of over 250MB when running an empty main() that just sleeps when the jvm's run with -Xms16m -Xmx32m. I've already read this thread: http://forum.java.sun.com/thread.jspa?threadID=651637&start=0&tstart=0I've tried tweaking ...
615 byte By
ACaycia at 2007-11-27 4:20:30
Hi,I think it is fair to say that in order to tune an application, you need determine 1. the right heap size2. the right garbage collection schemeI think I can answer the item 1. You can run your application for period of time say couple of days without any interruption, i.e. shutting down the ...
216 byte By
Aldricha at 2007-11-27 4:23:13
Good day to you all,i have created a test.so, but i cant write to /usr/lib. how could i use/load test.so without putting it inside /usr/lib folder.Thanks,AldrichNoob java programmer
HI Guys,I am new to JNI,I am working on some tutorial stuff for using Native code.I have cretaed a c++ source code Hello.cpp and compiled it to Hello.exe.Can somebody tell me how to cretae a DLL of it to be used in Java.Thnx in advance
I posted this question in the "Java programming" forum before: http://forum.java.sun.com/thread.jspa?threadID=5172497 but since I didn't get replies I am now trying it here.I am performing a sequential computation on a linux pentium 4 machine with hyperthreading, j2se 5.0 ergonomics classifies ...
116 byte By
ACaycia at 2007-11-27 4:34:53
Hi,I am using JDK 1.5.0_11-b03. What does "-XX:+AggressiveHeap" do exactlyThanks,Mustafa
There appears to be a regression in 1.6.0_01-b06 vs. 1.5.0_09-b03: modifications made to an instance field while in a synchronized block are not visible in a subsequent synchronized block. I.e. register or processor memory caches are not being flushed and/or reloaded.A hacky workaround can be ...
1052 byte By
yovasa at 2007-11-27 4:36:31
I have a x64 bit server with win 2003 server and 14 gig rami have jdk-1_5_0_07 (32 bit)and tomcat55 installed ,I have a webbased java application running , I am having frequent tomcat crashes . Following are my java settings ...
98 byte By
DanDia at 2007-11-27 4:37:39
Please, how can I programmatically get the bytecodes of a method at an application runtime?
I'm working on a small jni project where and I'm trying to get the shared object to link up correctly. I was able to get it to work just fine until I added a reference to a std call. For example:c code:JNIEXPORT jint JNICALL Java_JNITest_gduif_1init (JNIEnv *env, jobject obj, jint ...
I am having a tomcat application running on solaris 9 and it starts using about 100% CPU after some time. I tried prstat -L and got the threads that were consuming the max CPU. On doing a truss for the process Id I found out the following about those thread. There were about 4 thread that were ...
HiWhat is the maximum number of threads that can be spawned from a 64-bit jvm with jdk 1.5? The application runs on SunOS 5.10 Generic_118833-24 sun4u sparc SUNW,Sun-Fire-480RThanks
292 byte By
avdo77a at 2007-11-27 4:53:46
I am trying to sort large document of around 1,000,000 records into file but I can't do it.I receive the following message:Cputime limit exceeded52.760u 8.240s 1:46.94 57.0% 0+0k 0+0io 2098pf+0wIs this fixable? Do you know what's the cause of the problem?