483 byte By
balpoxa at 2007-11-27 0:05:51
I need to set an already set property at the command line to a new property.Is it possible to do something iike:java -Dmy.prop=user.dir MyAppI can't set it up within java code because this property is used before by a 3rd party application.I've tried java -Dmy.prop=${user.dir} MyAppbut ...
1134 byte By
LooyeDa at 2007-11-27 0:06:39
Hello,we encounter a time synchronisation problem with the call System.currentTimeMillis(). My guess is, that it has to do with the virtual enviroments (HP/UX machine, with a couple of virtual oracle enviroments).we can see a time difference between different Oracle containers. In a couple of ...
Usually we load the native labrary (dll, so, etc) inside a static statement. So, we'll have only one instance of this native library per multiples class instances.How to get one-to-one ? One class instance to one native library instance ?Does someone know ...
HelloOur application is trying to read a csv (in bytes) from a report generation software through SDK. When the file size is around 50 Megs..we can read the csv fine. but if the file size is around say 100 Megs...our application throws a java.lang.outOfMemory error while trying to read the data ...
3818 byte By
MFabiena at 2007-11-27 0:14:39
I try to call COM object from JNI code.This is the C code:void initializeComAPI(){if (!initialized){OleInitialize(NULL);// Create the RSS COM object and retrieve the default interface IID_IRSSComponenthr = CoCreateInstance(__uuidof(RSSCOMObject), NULL, CLSCTX_ALL, IID_IRSSComponent, ...
I am using a dll and JNI ... and getting ACCESS VIOLATION EXCEPTION ... so I'm doing something wrong.When I test the C code, it seems to work... so my problem is somewhere between adding the JNI and pointers/jstrings.Here's a piece of it..#include <windows.h>#include ...
Hi,If you are one of the people working with large 3D image volumes, you know this problem. Currently, some of the analyze image volumes we deal with are in the dimension of 10,000 x 10,000 x 14, or 1024 x 1024 x 1024, and the technology is improving to give us even higher resolution ...
Is there a pure Java solution that let us dynamically change the maximum heap size required?The reason that I am asking is because the GUI program that I wrote works in many situations. The key problem is that the data users load can range from 10MB to 4GB. Most people who uses the GUI ...
Hi All, i am usingSystem.loadLibrary("cygProcessControllerNative"); to load the dll library.But it simply not moving out of this line,and there is no exception thrown.pls help me.Cheers:Akash
Hi All,Is it possible to shutdown a java application from another java application. If possible, please suggest.Thanks in advance,
HI ALLI hava one doubt in JNI. Can we call one pure C/C++ class from the native methods?Thanks & RegardsAnand
I have a Application A, that launches another application B, i want to capture the events of application B into A.The main issue is that i don't want to write any code in B for this.Is there any technique to do this?Thanks in advance...
357 byte By
kynamara at 2007-11-27 0:33:55
Hi!I have a problem with shutdown hook!If i start my app from cmd(java -jar myjar.jar) the shutdown hook works fine but if i start my app by double clicking the jar file the shutdown hook don't work!What could be the problem!I don't like the first way because i get the cmd and i can't hide ...
HiI am creating one TempCalcJava fileclass TempCalcJava {public native void displayHelloWorld();static {System.loadLibrary("hello");}public static void main(String[] args) {new TempCalcJava().displayHelloWorld();}}and i create .class and .h file for this java file/* DO NOT EDIT THIS FILE - it ...
Hi All, My problem is that i am able to load the dll library but when i am calling native methos in my java code its throwing exception saying--Exception in thread "main" java.lang.UnsatisfiedLinkError: Initializeat testmain.Main.Initialize(Native Method)at ...
I again did the whole things from strach but failed again.1. I wrote the C program#include <jni.h>#ifdef _WIN32#define PATH_SEPARATOR ';'#else#define PATH_SEPARATOR ':'#endifint main() {JavaVMOption options[1];JNIEnv *env;JavaVM *jvm;JavaVMInitArgs vm_args;long status;jclass ...
Hi,I would like to populate data from Java to C Structure. The structure has about 8 to 10 elements. What is the best way of achiv. this. Can I send a collection to the Native method & populate the C struct.
Hi,I'm calling SetWinEventHook from Java code. In the C++ wineventProc function I pass back the handle of the window that fired the event into a Java method . For IN_CONTEXT, I'm using GetModuleHandle("DllName.dll"). For OUTOF_CONTEXT , I'm using GetModuleHandle(NULL). Works fine with ...
Hi all,I have a very strange problem with JNIwhen I call NewObject() function the caller function returns immediately with no indication about what happens (exception or whatever).the specification says that if the object can not be instantiated NULL should be returned! but this doesn't happen ...
Hi,I'm new to JNI and pretty rusty on C++, normally I stick to 100% Java, however I had a need for some native magic. My code works well and does the job I needed however my (old) knowledge of C++ tells me that I need to clean my objects up when I'm done. However I am unable to delete a ...
I am writing a java console application. while running that needs to pass some arguments from command prompt. So i need to process those all arguments in c++ code using JNI.The following is my JavaCode:class RetArray{public native int readArray(String[][] ...
Hello.I was hoping somebody could dig me out with a problem I am having with core dumping.Using Solaris 10 and java 1.5.0_01I know a few changes have been made to java dumping depending on java version etc.For the above version its possible to pass -XX:+HeapDumpOnCtrlBreak to the jvm so that a ...
8486 byte By
tecomana at 2007-11-27 0:59:18
Since migrating to Java 5 I am having this problem continually. Not only my applications, but also Netbeans , kill the JVM, and bam! Every class involved here compiles clean, without so much as a warning (I use -Xlint on the compile) - I'm using JDK 1.5.0_10. I am including below the whole ...
OK, I don't know how much performance is improved in 1.6.Is there a compile time option in javac to compile the sources to the native.I know I loose the portability by doing so but I have valid reason to do so.We are shipping a jav aproduct in a closed box and the OS is fixed. I am not worried ...
566 byte By
elhh82a at 2007-11-27 1:04:38
I am writing a java based program that gets loaded via the the command prompt Java -classname. The applications runs many times slower on my new Vista install than on windows XP. Anyone have experienced this before? Any tips or suggestions in speeding things up?If it will help, the application ...
244 byte By
Omargaa at 2007-11-27 1:05:35
I am having problems downloading the jr2 from the download page. In fact, I am unable to download anything from this site, tried download manager and others also did no work. All I get is a small .exe file that does not work. Help please
hi,my client have provided me with a .dll file which implements all functions tasks.earlier we created a applications in vb that accessed functions from the .dll file provided by client.now he wants java implementation of the same application written in vb.now how to access functions in .dll ...
Hi i got this error when i run the JNI Appln in linux Exception in thread "main" java.lang.UnsatisfiedLinkError: libnativelib: /root/Anand/JNIWORKFOLDER/libnativelib.so: undefined symbol: __gxx_personality_v0what is the problem?Thanks
Hello,I have observed the following behavior on one of our production servers running a real time system: a) frequently, a large number (easily about 100 MB) of young generation objects are tenured over a short period of time (generally in the 2-3 minute time frame but sometimes less)b) to see ...
Hi all,I was facing a strange error while trying to run build after the "make depend" and "make all" was sucessful in solaris 5.4.When I tried to attach dbx and run the build on solaris 5.4 release , it shows a wrong a memory address which is cascaded and dumps . Neither of the memory is ...
Hi all,we have web based application. Whenever there is critical errors encounters in our application we need to write that errors in to windows event viewer, application logs. Please help me on how to do this.do we have any specific API for this ?thanks in ...
i have an application which receive data from serial port and send it to the database , but an exception occurs and i don't know what does it main so the following is what i received at the saved file which is result from the exception:## An unexpected error has been detected by HotSpot ...
Hi, I'm a C++ programmer but new to Java. I have a structure (or class in Java) that has two members, one int and another GUID (which is another class). I'm trying to access that from C++ DLL and I can access the int member but when I try to access members of GUID, it fails. Can someone guide ...
I have a problem that seems unrelated to traditional GC tuning. Full Garbage Collection on my server (x86, Linux, 2 proc, 2GB memory, 1GB Heap) is taking in excess of 10 minutes. The frequency of the Full GC is about every 8-10 hours. I've combed some posts for issues related to long GC, but ...
520 byte By
Yo_Soa at 2007-11-27 1:31:46
Hi,I've been playing with JNI a bit, and i couldnt find information on the following issue: I want to run C++ functions from different .cpp files from my java class. I've played around with one .cpp file, and am wondering how to use more. Can I do it through one .cpp file thats been adapted ...
HI ALLI am creating one native class file . And i am accessing the native methods from another pure java class. When i run the pure java class the native method implementation is not working. The passed variables are displayed . But the function not running fully. I run in linux ...
3721 byte By
Yo_Soa at 2007-11-27 1:45:56
Hello folks, So here's my problem, Im doing this project with a couple of friends, and im the java guy (theyre c++). Im trying to understand how it all works together. I've been through the hello world examples, and now i want to play with more than one c++ file. how do i link it all ...
Hi i want to know that how can i find Syatem information in Java. Is there any way to get all the hardware and software information and display it using Java code
Hello,The JVM crashed in one of our Solaris production environments. The cause of the crash appears to be the HotSpot compiler. It seems that the JVM was trying to compile frequently used code and then it crashed. I have checked the forums and I found one other message with the same Internal ...
HIi am creating one native library in Linux machine. Then I make my application as .jar file .The application is located on Windows machine. Then i run my apllication on Linux.But when i am calling the native library it gives java.lang.UnsatisfiedLinkError -- Intialize().i set the environment ...
I am writing a COM DLL and need some help. :-)A.exe is calling by means of COM B.dll (which is my COM dll).As a result, B.dll gets loaded into memory by Windows OS.B.dll uses JNI to create a Java VM.No problem so far.As a result of A's call, now:B.dll uses the VM to run the actual ...
Hi,I'm trying to determine whether my Pentium D running 32bit Windows XP is load-balancing between the two CPU cores correctly. To do this I'm running the following small test app. (It's a complete app and should compile for anyone)import java.text.DecimalFormat;import java.util.Random;/** * ...
I'm having trouble getting a call to a java method to work after invoking a jvm successfully. Find class and getmethodid work correctly, but the call to the method using CallVoidMethod returns an error (listed below).Anyone know what I might be doing wrong?The native code snippet:jclass ...
Hi all..I am facing a problem of "OUT OF MEMORY ERROR" Java heap error...I think my project is having a memory leaks..Is there any tools to find and debug the memory leaks..please provide me a simple method to come out of this problem...Thanks in
423 byte By
kmthiena at 2007-11-27 1:59:44
hi guys,I am using jboss4 and i am wondering what actually is the below :JAVA_OPTS="-Xms256m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"will it increase JVM performance? if I have 1GB of RAM in server and this server only running jboss4, how should ...
Hi all, In my application i am trying write errrors in to windows application log. so i created a simple java standalone application to simulate that . Its runs fine by using java command . After that i integrated that to my application .there i am getting errorjava.lang.UnsatisfiedLinkError: ...
Hi,If i have a singleton object like this:public class MyInstance extends Thread {private String myName = null;private static MyInstance instance = null;private MyInstance() {System.out.println("Constructor called");myName = "MyInstance";}public static synchronized MyInstance getInstance() {if ...
Hello,Does JNI's MonitorEnter/MonitorExit guarantee a happens-beforerelationship on native side memory like "synchronized" does on Javaside ( http://java.sun.com/docs/books/tutorial/essential/concurrency/syncmet...)? I.e. obviously it should provide happens-before for any JavaObjects that get ...
Hey everyone,First post and it抯 a question ;). I抳e got a JNI implementation that I haven抰 touched in over a month and wanted to add some more functionality to it. Up till now this project has always been one way communication from the DLL -> java, but now things have changed and I need to ...
Hi,I am running a SSL VPN site. This site run a java appletin SUN JVM. Everything works fine with IE6 and IE7 if I stay on same page but in IE7 if I go to another tab IE7 hangs. MSJVM works fine in this case. I have approached IE tech support but as per there analysis below problem seems to be ...