Home > Default > 1.3 JNI libraries compatible with 1.4?

1.3 JNI libraries compatible with 1.4?

October 11Hits:0
Advertisement
I'm having some problems migrating my software from J2SE 1.3 to 1.4 (on Linux).
I've not recompiled anything, hoping for Sun's binary code compatibility...
Strangely enough, the first time I executed my program with the 1.4 VM,
everything worked just fine. The same program had been running in the 1.3 VM just before that.
But after rebooting the machine I encountered the first problem - the java program could
not find my JNI libraries anymore, generating a UnresolvedLinkError.
*Why did my 1.3- but not the 1.4-environment find the JNI ?
Before, I didn't need the LD_LIBRARY_PATH variable, but now I used it and set it to the directory where the JNI libs are. This solved the UnresolvedLinkError problem - fine!
BUT, when I now start up my program it takes about 2 minutes to get it up and after that it works
real slow....
Running with the -verbose flag I see that it hangs for a long while after loading the PlainSocketImpl
<snip>
[Loaded java.util.Vector$1 from /usr/j2re1.4.0/lib/rt.jar]
[Loaded java.net.Socket from /usr/j2re1.4.0/lib/rt.jar]
[Loaded java.net.ServerSocket from /usr/j2re1.4.0/lib/rt.jar]
[Loaded java.net.SocketOptions from /usr/j2re1.4.0/lib/rt.jar]
[Loaded java.net.SocketImpl from /usr/j2re1.4.0/lib/rt.jar]
[Loaded java.net.PlainSocketImpl from /usr/j2re1.4.0/lib/rt.jar]
*Why is it hanging after that line?
*Is it necessary for me to recompile my JNI libs?
*Why is it working so slowly?
Please help me out!
Regards
/ Lelle

Answers

I just wanted to tell you that now I've recompiled my Java files but the program still
stalls on start-up as before.
I've not yet recompiled the JNI files, although I can't see why that should be needed.
My command line looks as follows:
/usr/j2re1.4.0/bin/java -server -verbose -verbose:jni -classpath /usr/Shared.jar:/usr/Server.jar ServerClass 123 JNIlib1 JNIlib2 JNIlib3 JNIlib4
(123 is the port number for the server to listen to.)
Something fishy is obviously happening during or after loading java.net.PlainSocketImpl
<snip>
[Loaded java.net.SocketImpl from /usr/j2re1.4.0/lib/rt.jar]
[Loaded java.net.PlainSocketImpl from /usr/j2re1.4.0/lib/rt.jar]
[Dynamic-linking native method java.net.PlainSocketImpl.initProto ... JNI]
Any ideas anyone?
/ Lelle

Read other 4 answers

Tags:

Related Articles

  • 1.3 JNI libraries compatible with 1.4?October 11

    I'm having some problems migrating my software from J2SE 1.3 to 1.4 (on Linux). I've not recompiled anything, hoping for Sun's binary code compatibility... Strangely enough, the first time I executed my program with the 1.4 VM, everything worked just

  • [Newbie] Bundling App classes+ util jars with jni librariesNovember 30

    Hi, first off, im a noob if it gets to creating archives... I can make a simple archive if I dont have special depedancies but beyond that... :) I have my app's classes and two utility jar files which also need respective jni libraries. Can I pack al

  • Help building JNI librariesNovember 30

    All - I'm currently working on a program which will solve Linear Programming problems. To do so, I would like to use the COIN-OR libraries which are implemented in C++ and I've decided to use JNI to do so. I've successfully compilied my java app, cre

  • C++ Libraries compatible between VS Update versions?November 30

    It is save to link a DLL compiled with VS 2013 Update X, with a DLL compiled with VS 2013 Update X + 1?Hi Acki_, Glad to receive your reply. As I pervious provided the link for you, I just want to tell you that since the VS has the feature of backwar

  • Two jni libraries having the same methodsNovember 30

    Hello, I have two version of the same library like abc_v1.dll and abc_v2.dll. They have the same methods but acting differently. I want to load one of them and for some cases load the other one. But only the firstly loaded library methods are being c

  • Progblems Running a C program with JNI on LinuxOctober 11

    Hi We are having a problem running a C program which uses JNI to start a virtual machine. We can compile it up ok and it finds all the correct libraries and everything is fine as far as we are aware but when we try to run the program the error we get

  • Invocation JVM and JNI library communicationOctober 11

    How do I communicate between my application that creates a VM, and the JNI libraries (with native functions) loaded by classes within the invoked VM?-Global variablesI doubt global variables inside the C app can be >accessed from JNI native methods.W

  • Calling an external C function from a C file in JNINovember 30

    Hello, I am trying to call an external C function, from a C file which is being called by a Java file. I am getting an unresolved symbol error. I have tried many things like, making the external C function in the format of JNI, etc, etc. It is still

  • Swing with third party librariesNovember 30

    I know that within the Java SDK there is an extensive ability to create 2D and 3D graphics for use in an application. However, what is the situation with 3rd part libraries (e.g. specifically looking at Open Inventor from numerical algorithms group).

  • Graphics librariesNovember 30

    I know that within the Java SDK there is an extensive ability to create 2D and 3D graphics for use in an application. However, what is the situation with 3rd part libraries (e.g. specifically looking at Open Inventor from numerical algorithms group).

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.714 s.