Hi everyone,I want to instantiate java object from php so that i can pass values(string) to/from java code.I got access to variables from PHP application in to java code by using URL .to try instantiating i wrote$abc = new Java( "name of the java code" );but it gives error that it cannot ...
Long story short, I am trying to write a Java program that gets input from and sends output to the Windows console (System.in, System.out). I need it to be aware of each keypress when it occurs, rather than after an entire line is returned.I've been researching this for almost a week now, and ...
Hello,I have written a small C function to display HelloWorld message. I am calling the C function from a java program through JNI. The program is working fine under HP UX 11.11 system. But the program is not working under HP-UX11.23(v2). Could you please let us know why this is ...
I am running through the steps detailed in the JNI tutorial here: http://java.sun.com/developer/onlineTraining/Programming/JDCBook/jniexamp.htmlIs it up to date? For some reason I cannot build the DLL using the Microsoft C compiler.This is what I am trying, and this is what I'm getting:cl /I ...
I am new to java....i want to know that how can i track a requested address sent from IE and also to track the reply coming back to IE for that request....Someone plz help me....Thankz in advance....
Hello,if I call a java-class from c++-code and the java-class imports a package (not java packages, but writen by myself), then the calling misses :-(If I call this class without the imports - it works!C++-Code:jclass cls = env->FindClass(javaClassname.c_str());if (cls == 0) {//error- cls is ...
Hi everyone.I hope someone will be able to help me as it drives me crazy.Here is the whole story:I am currently developing a new system that has something to do with linguistic and text analysis. After months of research, I have finally found the perfect parser. It is the link grammar (for ...
Hi everyone,I have a problem with a program and I am not sure how to do something:I have a system that has to load a dictionary and then do something with it. The whole data structure of the dictionary is written in C.Now I have a library that loads it and I want to use the loaded dictionary ...
I have the following problem:At my home desktop I have the following memory use:- 160 MB Linux (Debian) after start- 50 MB additionally after starting a first java-applikation- 60 MB additionally after starting a second java-applikationSo together 270MB memory (swap memory = 0). Everything ...
Hi there!I've been using Java for so many years without worrying much about the virtual machine concept behind it but recently it produced more and more interest for me. I think I understand how an virtual machine works but there's one thing I would like to know - It's a topic I couldn't ...
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 ...