[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]


    Search the Q&A Archives


I am trying to access C code through Java using JNI. The...

<< Back to: comp.sys.hp.hpux FAQ

Question by naggarwal@informatica.com
Submitted on 3/24/2004
Related FAQ: comp.sys.hp.hpux FAQ
Rating: Rate this question: Vote
I am trying to access C code through Java using JNI. The version of Java which I am using is 1.4 and the JVM library is 64 bit.The problem is that I am not able to load the native library containing definitions (of the native C functions). A simple program which tries to load the library using System.loadLibrary is giving the following error:

   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
          at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1489)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1397)
   at java.lang.Runtime.loadLibrary0(Runtime.java:788)
   at java.lang.System.loadLibrary(System.java:832)
   at Test.main(Test.java:6)

Is there any restricition on IPF that  all the symbols in a library must be resolved at compile time and there shouldn't be any unresolved symbol at runtime. As we know that this limitation is there on AIX .

Thanks,
Sudhanshu



Answer by Kaamchor
Submitted on 7/6/2004
Rating:  Rate this answer: Vote
Yeah U can not execute any external code using JNI...its for creating paint brush diagrams

 

Answer by boseji@yahoo.com
Submitted on 12/15/2004
Rating: Not yet rated Rate this answer: Vote
You have not put the .dll file in the correct place that is the {your jdk dir}\bin
directory.
try out copying the DLL to this location.

 

Answer by VishalMasih
Submitted on 1/17/2005
Rating: Not yet rated Rate this answer: Vote
Your native libraries might be 32-bit. Check the same.

Also check whether they are in the java.library.path

 

Answer by Rupesh
Submitted on 10/21/2005
Rating: Not yet rated Rate this answer: Vote
Sir, Your problem is pretty similar with what I faced while writing my first JNI linkage .The debug shows that your code is not having access to the compiled DLL or .SO file(o/s dependent) for these first of all please write a Suitable code and then compile it to the appropriate format you may need the DLL to be located in a suitable directory.For further understanding please refer to Sun's Tutorial Book Part Two. otherwise write me on rupesh_joshi@sify.com

 

Answer by chinabusi
Submitted on 3/12/2007
Rating: Not yet rated Rate this answer: Vote
I   wnat c access with Java

 

Your answer will be published for anyone to see and rate.  Your answer will not be displayed immediately.  If you'd like to get expert points and benefit from positive ratings, please create a new account or login into an existing account below.


Your name or nickname:
If you'd like to create a new account or access your existing account, put in your password here:
Your answer:

FAQS.ORG reserves the right to edit your answer as to improve its clarity.  By submitting your answer you authorize FAQS.ORG to publish your answer on the WWW without any restrictions. You agree to hold harmless and indemnify FAQS.ORG against any claims, costs, or damages resulting from publishing your answer.

 

FAQS.ORG makes no guarantees as to the accuracy of the posts. Each post is the personal opinion of the poster. These posts are not intended to substitute for medical, tax, legal, investment, accounting, or other professional advice. FAQS.ORG does not endorse any opinion or any product or service mentioned mentioned in these posts.

 

<< Back to: comp.sys.hp.hpux FAQ


[ Home  |  FAQ-Related Q&As  |  General Q&As  |  Answered Questions ]

© 2008 FAQS.ORG. All rights reserved.