Property to property in command line?

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 ...

JVM timing problem

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 ...

JNI and multiples library instances (dll, so, etc)

301 byte By lucianomx_a at 2007-11-27 0:09:48
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 ...

java.lang.outOfMemory

580 byte By bhaarat_javaa at 2007-11-27 0:12:13
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 ...

Trouble with JNI interface that use Microsoft COM object.

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, ...

Trouble with NewStringUTF

1896 byte By Passion4Javaa at 2007-11-27 0:15:37
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 ...

2G array size limit. Any future workarounds?

1000 byte By coconut99_99a at 2007-11-27 0:16:11
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 ...

JVM Maximum Heap Size Problem

1310 byte By coconut99_99a at 2007-11-27 0:16:14
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 ...

My Application Unable to Load dll no Exception Thrown.

219 byte By Akash5495a at 2007-11-27 0:19:16
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

Shutting down one application using another.

151 byte By Dheeraj_Gabaa at 2007-11-27 0:25:06
Hi All,Is it possible to shutdown a java application from another java application. If possible, please suggest.Thanks in advance,

JNI HELP URGENT -- Can we call one pure C/C++ class from the native methods

141 byte By Anand_Bala2007a at 2007-11-27 0:25:12
HI ALLI hava one doubt in JNI. Can we call one pure C/C++ class from the native methods?Thanks & RegardsAnand

capture event of an aplication A from another one B without acknowledge A

265 byte By sumitkchauhana at 2007-11-27 0:25:35
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...

Shutdown hook problem

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 ...

JNI HELP URGENT -- Problem when calling C++

1823 byte By Anand_Bala2007a at 2007-11-27 0:34:58
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 ...

Exception while calling native method

429 byte By Akash5495a at 2007-11-27 0:35:11
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 ...

Calling Java Method From C

1673 byte By Shashank.Tilwallia at 2007-11-27 0:36:33
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 ...

Populating C Strucutre.

225 byte By Shashank.Tilwallia at 2007-11-27 0:41:54
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.

using InContext SetWinEventHook

3184 byte By kteegalaa at 2007-11-27 0:45:22
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 ...

NewObject() fails

2902 byte By minashokrya at 2007-11-27 0:51:00
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 ...

Why cant I delete C++ pointer in JNI DLL

2032 byte By knightweba at 2007-11-27 0:54:37
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 ...

JNI-Very Urgent Converting String Array to Charcter Array in JNI

587 byte By Anand_Bala2007a at 2007-11-27 0:56:56
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[][] ...

JVM Core Dumping.

567 byte By Lemon_Jellya at 2007-11-27 0:57:36
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 ...

Java VM: Java HotSpot - applications bringing down JVM

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 ...

native compile option when compiling src files

512 byte By vpalkondaa at 2007-11-27 1:00:51
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 ...

Java6u1 (or any other J2SE release) much slower on Vista than on XP

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 ...

JR2 Download problem

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

how to call functions defined and packed in a .dll file

414 byte By Mohamed_Asifa at 2007-11-27 1:06:10
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 ...

VERY URGENT undefined symbol: __gxx_personality_v0 Error

269 byte By Anand_Bala2007a at 2007-11-27 1:11:22
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

Objects getting tenured in sudden/short bursts

6192 byte By Srini_Padmanabhana at 2007-11-27 1:14:49
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 ...

rational purify error

2553 byte By sudheer786a at 2007-11-27 1:17:54
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 ...

Urgent help needed on writing errors in to windows application logs

317 byte By javashivua at 2007-11-27 1:21:01
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 ...

EXCEPTION_ACCESS_VIOLATION

8562 byte By student14a at 2007-11-27 1:30:15
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 ...

How to set values of members of a class (if the member is another class)?

6126 byte By johngummadia at 2007-11-27 1:30:33
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 ...

Extremely long(10 minute) Full GC times

1093 byte By GrubHubMikea at 2007-11-27 1:31:21
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 ...

multiple C++ files

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 ...

VERY URGENT Problem in calling .dll from another java class

403 byte By Anand_Bala2007a at 2007-11-27 1:42:58
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 ...

how do i compile all this?

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 ...

Finding System information

169 byte By Vikas_uka at 2007-11-27 1:46:05
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

JVM Hotspot compiler crashed

12770 byte By RT_at_NCIa at 2007-11-27 1:48:47
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 ...

Problem in calling .so file in Linux

437 byte By Anand_Bala2007a at 2007-11-27 1:49:47
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 ...

Need help with JNI inside of a COM DLL

1610 byte By markus-karga at 2007-11-27 1:51:22
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 ...

Multithreaded CPU load on Windows

5144 byte By ch0rlt0na at 2007-11-27 1:51:39
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;/** * ...

Need Help With CallVoidMethod

1305 byte By powerdroida at 2007-11-27 1:51:55
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 ...

How to solve memory heap error in java..

298 byte By Ragav_Msca at 2007-11-27 1:58:00
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

what actually is JAVA_OPTS?

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 ...

java.lang.UnsatisfiedLinkErrorplease help me its very urgent

3190 byte By javashivua at 2007-11-27 2:03:36
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: ...

Singleton concept

2744 byte By KhanhPhama at 2007-11-27 2:07:28
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 ...

MonitorEnter - happens-before?

1071 byte By ThreadAskera at 2007-11-27 2:11:44
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 ...

UnsatisfiedLinkError: Is it me, or my C++ compiler

1601 byte By MrRage54a at 2007-11-27 2:23:09
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 ...

Sun JVM hangs with IE7

5459 byte By Poonam_Marwaha at 2007-11-27 2:27:58
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 ...