f



java 1.4 fail with java.lang.UnsatisfiedLinkError but 1.5, 1.6 ok

My JNI program is working with java 1.5 & 1.6 but fail with java 1.4
on a HP-UX B.11.23 U ia64 computer.
Please help even though java 1.4 is old.

$ /opt/java1.4/bin/java -d32 -jar jHw.jar
Failed to load MycompAPI and MycompAPI_64 libraries.
java.lang.UnsatisfiedLinkError: no MycompAPI_64 in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1542)
        at java.lang.Runtime.loadLibrary0(Runtime.java:795)
        at java.lang.System.loadLibrary(System.java:834)
        at com.chrysalisits.crypto.MycompAPI.<clinit>(MycompAPI.java:
47)
        at com.chrysalisits.crypto.MycompHwManager.<init>
(MycompHwManager.java:101)
        at com.chrysalisits.crypto.MycompHwManager.getInstance
(MycompHwManager.java:62)
        at jHw.jHw.<init>(jHw.java:32)
        at jHw.jHw.main(jHw.java:764)
Exception in thread "main" java.lang.UnsatisfiedLinkError: Initialize
        at com.chrysalisits.crypto.MycompAPI.Initialize(Native Method)
        at com.chrysalisits.crypto.MycompHwManager.<init>
(MycompHwManager.java:107)
        at com.chrysalisits.crypto.MycompHwManager.getInstance
(MycompHwManager.java:62)
        at jHw.jHw.<init>(jHw.java:32)
        at jHw.jHw.main(jHw.java:764)

$  /opt/java1.4/bin/java -d32 -version
java version "1.4.2.19"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.2.19-080514-21:19)
Java HotSpot(TM) Server VM (build 1.4.2 1.4.2.19-080515-02:54-IA64N
IA64, mixed mode)

$ /opt/java1.5/bin/java -d32 -version
java version "1.5.0.13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0.13-
_09_may_2008_11_35)
Java HotSpot(TM) Server VM (build 1.5.0.13 jinteg:05.09.08-16:53 IA64,
mixed mode)

$ /opt/java6/bin/java -d32 -version
java version "1.6.0.01"
Java(TM) SE Runtime Environment (build 1.6.0.01-
jinteg_06_jun_2008_13_24-b00)
Java HotSpot(TM) Server VM (build 1.6.0.01 jinteg:06.07.08-04:50 IA64,
mixed mode)
0
TsanChung
1/7/2009 3:00:33 PM
comp.sys.hp.hpux 4408 articles. 1 followers. dewi.bening (7) is leader. Post Follow

8 Replies
1917 Views

Similar Articles

[PageSpeed] 14

TsanChung wrote:
> My JNI program is working with java 1.5 & 1.6 but fail with java 1.4
> on a HP-UX B.11.23 U ia64 computer.
> Please help even though java 1.4 is old.
> 
> $ /opt/java1.4/bin/java -d32 -jar jHw.jar
> Failed to load MycompAPI and MycompAPI_64 libraries.
> java.lang.UnsatisfiedLinkError: no MycompAPI_64 in java.library.path

What this error means is that the library MycompAPI_64 (MycompAPI_64.so 
on *nix machines, MycompAPI_64.dll) cannot be found in the library path 
for Java 1.4.

If you print out the System property "java.library.path" under all the 
versions, you can track down the location of the library and copy it to 
the 1.4 library path.

-- 
Beware of bugs in the above code; I have only proved it correct, not 
tried it. -- Donald E. Knuth
0
Joshua
1/7/2009 3:19:39 PM
On Jan 7, 10:19=A0am, Joshua Cranmer <Pidgeo...@verizon.invalid> wrote:
> TsanChung wrote:
> > My JNI program is working with java 1.5 & 1.6 but fail with java 1.4
> > on a HP-UX B.11.23 U ia64 computer.
> > Please help even though java 1.4 is old.
>
> > $ /opt/java1.4/bin/java -d32 -jar jHw.jar
> > Failed to load MycompAPI and MycompAPI_64 libraries.
> > java.lang.UnsatisfiedLinkError: no MycompAPI_64 in java.library.path
>
> What this error means is that the library MycompAPI_64 (MycompAPI_64.so
> on *nix machines, MycompAPI_64.dll) cannot be found in the library path
> for Java 1.4.
>
> If you print out the System property "java.library.path" under all the
> versions, you can track down the location of the library and copy it to
> the 1.4 library path.
>
> --
> Beware of bugs in the above code; I have only proved it correct, not
> tried it. -- Donald E. Knuth

I had done this for java 1.6, 1.5 and 1.4 respectively but it did not
solve "java.library.path" problem.
export CLASSPATH=3D.:/opt/java6/jre/lib/ext
export SHLIB_PATH=3D.:/opt/java6/jre/lib/ext

export CLASSPATH=3D.:/opt/java1.5/jre/lib/ext
export SHLIB_PATH=3D.:/opt/java1.5/jre/lib/ext

export CLASSPATH=3D.:/opt/java1.4/jre/lib/ext
export SHLIB_PATH=3D.:/opt/java1.4/jre/lib/ext



0
TsanChung
1/7/2009 3:53:09 PM
On Jan 7, 10:53=A0am, TsanChung <tsanchung.w...@gmail.com> wrote:
> On Jan 7, 10:19=A0am, Joshua Cranmer <Pidgeo...@verizon.invalid> wrote:
>
>
>
> > TsanChung wrote:
> > > My JNI program is working with java 1.5 & 1.6 but fail with java 1.4
> > > on a HP-UX B.11.23 U ia64 computer.
> > > Please help even though java 1.4 is old.
>
> > > $ /opt/java1.4/bin/java -d32 -jar jHw.jar
> > > Failed to load MycompAPI and MycompAPI_64 libraries.
> > > java.lang.UnsatisfiedLinkError: no MycompAPI_64 in java.library.path
>
> > What this error means is that the library MycompAPI_64 (MycompAPI_64.so
> > on *nix machines, MycompAPI_64.dll) cannot be found in the library path
> > for Java 1.4.
>
> > If you print out the System property "java.library.path" under all the
> > versions, you can track down the location of the library and copy it to
> > the 1.4 library path.
>
> > --
> > Beware of bugs in the above code; I have only proved it correct, not
> > tried it. -- Donald E. Knuth
>
> I had done this for java 1.6, 1.5 and 1.4 respectively but it did not
> solve "java.library.path" problem.
> export CLASSPATH=3D.:/opt/java6/jre/lib/ext
> export SHLIB_PATH=3D.:/opt/java6/jre/lib/ext
>
> export CLASSPATH=3D.:/opt/java1.5/jre/lib/ext
> export SHLIB_PATH=3D.:/opt/java1.5/jre/lib/ext
>
> export CLASSPATH=3D.:/opt/java1.4/jre/lib/ext
> export SHLIB_PATH=3D.:/opt/java1.4/jre/lib/ext

I had copied all the required files to /opt/java6/jre/lib/ext, /opt/
java1.5/jre/lib/ext, /opt/java1.4/jre/lib/ext.

java.library.path for java 1.4 is set up as:
/opt/java1.4/jre/lib/IA64N:/opt/java1.4/jre/lib/IA64N/server:/opt/
java1.4/jre/../lib/IA64N:.:/opt/java1.4/jre/lib/ext:/usr/lib

Why java 1.4 still fail?
0
TsanChung
1/7/2009 4:04:11 PM
TsanChung wrote:
> My JNI program is working with java 1.5 & 1.6 but fail with java 1.4
> on a HP-UX B.11.23 U ia64 computer.
> Please help even though java 1.4 is old.

Which java version did you compile with?

   BugBear
0
bugbear
1/7/2009 4:12:31 PM
On Jan 7, 11:12=A0am, bugbear <bugbear@trim_papermule.co.uk_trim> wrote:
> TsanChung wrote:
> > My JNI program is working with java 1.5 & 1.6 but fail with java 1.4
> > on a HP-UX B.11.23 U ia64 computer.
> > Please help even though java 1.4 is old.
>
> Which java version did you compile with?
>
> =A0 =A0BugBear

I compiled with java 1.4.2.08 on another hpux computer and copied the
files to this hpux computer.

The build machine info are:
# java -version

java version "1.4.2.08"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.4.2.08-050401-17:46)
Java HotSpot(TM) Server VM (build 1.4.2 1.4.2.08-050401-19:15-
PA_RISC1.1 PA1.1, mixed mode)

# uname -a
HP-UX hp2 B.11.00 U 9000/785 2003725330 unlimited-user license

0
TsanChung
1/7/2009 4:38:11 PM
On Wed, 7 Jan 2009 07:00:33 -0800 (PST), TsanChung
<tsanchung.wong@gmail.com> wrote, quoted or indirectly quoted someone
who said :

>My JNI program is working with java 1.5 & 1.6 but fail with java 1.4
>on a HP-UX B.11.23 U ia64 computer.
>Please help even though java 1.4 is old.

see http://mindprod.com/jgloss/jni.html

Check the library path in both cases.

Your native code must be on the library path.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
PM Steven Harper is fixated on the costs of implementing Kyoto, estimated as high as 1% of GDP.
However, he refuses to consider the costs of not implementing Kyoto which the
famous economist Nicholas Stern estimated at 5 to 20% of GDP
0
Roedy
1/8/2009 12:41:51 AM
On Jan 7, 7:41=A0pm, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> On Wed, 7 Jan 2009 07:00:33 -0800 (PST), TsanChung
> <tsanchung.w...@gmail.com> wrote, quoted or indirectly quoted someone
> who said :
>
> >My JNI program is working with java 1.5 & 1.6 but fail with java 1.4
> >on a HP-UX B.11.23 U ia64 computer.
> >Please help even though java 1.4 is old.
>
> seehttp://mindprod.com/jgloss/jni.html
>
> Check the library path in both cases.
>
> Your native code must be on the library path.
> --
The library path of java 1.4 & 1.6 are printed by the java program:
System.out.println(System.getProperty("java.library.path"));

/opt/java1.4/jre/lib/IA64N:/opt/java1.4/jre/lib/IA64N/server:/opt/
java1.4/jre/../lib/IA64N:/opt/java1.4/jre/lib/ext:.:/usr/lib
/opt/java6/jre/lib/IA64N:/opt/java6/jre/lib/IA64N/server:/opt/java6/
jre/../lib/IA64N:/opt/java6/jre/lib/ext:.:/usr/lib

My native code is copied to both /opt/java1.4/jre/lib/ext and /opt/
java6/jre/lib/ext.
I do not understand why java 1.4 do not find it but java 1.6 find it.

0
TsanChung
1/23/2009 8:24:23 PM
On Jan 23, 3:24=A0pm, TsanChung <tsanchung.w...@gmail.com> wrote:
> On Jan 7, 7:41=A0pm, Roedy Green <see_webs...@mindprod.com.invalid>
> wrote:> On Wed, 7 Jan 2009 07:00:33 -0800 (PST), TsanChung
> > <tsanchung.w...@gmail.com> wrote, quoted or indirectly quoted someone
> > who said :
>
> > >My JNI program is working with java 1.5 & 1.6 but fail with java 1.4
> > >on a HP-UX B.11.23 U ia64 computer.
> > >Please help even though java 1.4 is old.
>
> > seehttp://mindprod.com/jgloss/jni.html
>
> > Check the library path in both cases.
>
> > Your native code must be on the library path.
> > --
>
> The library path of java 1.4 & 1.6 are printed by the java program:
> System.out.println(System.getProperty("java.library.path"));
>
> /opt/java1.4/jre/lib/IA64N:/opt/java1.4/jre/lib/IA64N/server:/opt/
> java1.4/jre/../lib/IA64N:/opt/java1.4/jre/lib/ext:.:/usr/lib
> /opt/java6/jre/lib/IA64N:/opt/java6/jre/lib/IA64N/server:/opt/java6/
> jre/../lib/IA64N:/opt/java6/jre/lib/ext:.:/usr/lib
>
> My native code is copied to both /opt/java1.4/jre/lib/ext and /opt/
> java6/jre/lib/ext.
> I do not understand why java 1.4 do not find it but java 1.6 find it.

Problem is solved!
My native code cause load error with java 1.4 but not java 1.6.
Changing the compile options solve this problem.
0
TsanChung
1/23/2009 9:42:40 PM
Reply:

Similar Artilces:

Serialization between Java 1.1.4 and Java 1.4.1
Hello, It seems to me to be in some kinda trouble. I wanted to implement communication between Java applet and Server through sockets and Serialization. So, I serialize Object, send it to server which deserialize it with no problems. In other direction problems came out since Object serialized under Java 1.4.1 seems to be not deserializable under Java 1.1.4. (MS VM). If applet si run under J2, there are no problems, but I cannot push people to download some 15MB of new JRE just to accomplish my requirements, especially if applet needs not implementation of features of new JRE... ...

Java 1.4.2 Vs 1.5 Vs 1.6
I'm sure this question has been posted but I've not found anydefinitive answer.I maintain a product line that consists of a dedicated Linux systemrunning Java to provide a GUI interface as a control system forunderlying hardware. I've been working to move to jdk 1.5 (not hardbut I'm busy) and now this new DST thing which is not covered by theversion I've been porting to (1.5.0-b64) makes me want to rethingabout going to the latest 1.6. It seems every version change hadproblems in the beginning and I didn't even try 1.6 because of that.Now I'm thinking about it again...

java web server 1.1.3 and java 1.4.1 problem
Hello I have got a weird problem with Java web server v 1.1.3 running with java version "1.4.1_01" Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-b01) Java HotSpot(TM) Client VM (build 1.4.1_01-b01, mixed mode) I have added the following paths to my classpath: D:\JavaWebServer1.1.3\lib\jws.jar D:\JavaWebServer1.1.3\servlets The servlets directory contain servlets and I can run them through localhost/servlet/<servletname> However if I add a new (my own)servlet to that directory, I am not able to run them. It shows HTTP 404 - File not found. I think, one has ...

Java 1.4.2 Vs 1.5 Vs 1.6 #2
I'm sure this question has been posted but I've not found any definitive answer. I maintain a product line that consists of a dedicated Linux system running Java to provide a GUI interface as a control system for underlying hardware. I've been working to move to jdk 1.5 (not hard but I'm busy) and now this new DST thing which is not covered by the version I've been porting to (1.5.0-b64) makes me want to rething about going to the latest 1.6. It seems every version change had problems in the beginning and I didn't even try 1.6 because of that. Now I'm thinking abou...

How advanced is java 1.6 with respect to java 1.1 ?
I've learned java 1.1 using a relatively old video tutorial and realized it only later. Is java 1.1 similar to java 1.6 or is it radically different ? And if its similar, what additional features do I need to learn ? broli wrote: > I've learned java 1.1 using a relatively old video tutorial and > realized it only later. > > Is java 1.1 similar to java 1.6 or is it radically different ? > > And if its similar, what additional features do I need to learn ? Everything you have learned is still valid (except for a few very obscure points). But there has added some ...

Is java 1.6 compatible with java 1.5?
Hello, I want to use a tool which works on java 1.5 and I have java 1.6 installed on my machine. Getting lot of errors when trying to build the tool. I am guessing that version difference is the reason. Is it? arshad wrote: > Hello, > I want to use a tool which works on java 1.5 and I have java 1.6 > installed on my machine. > Getting lot of errors when trying to build the tool. > I am guessing that version difference is the reason. Is it? Oh, yes, absolutely, of course; what else could possibly be amiss? I mean, just *look* at the text of your forty-second error message...

RMI between Java 1.4 and Java 1.5 problem
When attempting to RMI between a 1.4 client and a 1.5 server ( with a 1.5 interface, remote object, stubs and skeletons using the -vcompat rmic flag ), I get the following error: java.lang.ClassNotFoundException: java.rmi.server.RemoteObjectInvocation Handler (no security manager: RMI class loader disabled) The plot thickens. The 1.4 client will connect to the 1.5 server if I run the 1.4 client classes in a 1.5 jvm. However, when I run the 1.4 compiled classes in a 1.4 jvm I get no joy. Any ideas anyone? The context is this: getting a Java strored procedure in an Oracle database ru...

Java 1.4 versus Java 1.5 Certification
I haven't got any Java Certification before, and I want to get one. I am thinking should I take Java 1.4 or Java 1.5? I even saw Java 1.2 exam is still available on sun's site. I guess it makes more sense to take Java 1.5 exam since it is the latest Java version. Can either Java 1.4 or 1.5 exam be the prerequisite for other advanced Java exams? please advise. thanks jrefactors@hotmail.com wrote: > I haven't got any Java Certification before, and I want to > get one. I am thinking should I take Java 1.4 or Java 1.5? > I even saw Java 1.2 exam is still available on sun&#...

JBoss (java 1.4 + hibernate -> java 1.5)
hi, I'm searching for a documents describing the things to get in mind so that if I build now application for java 1.4+hibernate to be as much as possibly 1.5 ready, with minimum changes afterwards. Examples, links, documentations, whitepapers .... are welcome. I'm talking primary about JBoss. tia i also meaned ejb 2.1+hibernate -> ejb3.0 :) iraptor@gmail.com wrote: > i also meaned ejb 2.1+hibernate -> ejb3.0 :) I don't recommend you to use ejb2.1 as it is completely different from ejb3, as EJB3 beans are just empowered POJOs. Instead, you probably should use j2ee1...

Call Java 1.5 Jar from Java 1.4 JVM ?
Is it possible to call a Jar file complied with Java 1.5 from a 1.4 JVM ? I have done a wee bit of testing and I get : "class file has wrong version 49.0, should be 48.0" To be honest, this is preretty much what I expected, but I need to do some investigation on this. The reason is this: App A <----> App B App A is a 3rd Party component we use and it's being moved to Java 1.5 (we have no access to the code base) App B uses a JAR file from App A (subclasses off it and calls APIs) However, App B is Java 1.4 and is part of a framework that that is 1.4. App B and the Fr...

Tips for backporting Java 1.6 classes into Java 1.5?
I'm writing a Swing app, and I wanted a way to filter certain rows out of a JTable. I search Sun's API to see if they had any facilities for doing this, and I while I couldn't find such an API for 1.5, there is one for 1.6: javax.swing.RowFilter (http://download.java.net/jdk6/docs/api/javax/swing/RowFilter.html) So I have a bit of a dilemma here. I don't want to have to "wait" for 1.6 to come out. I don't want to actually use a beta version of 1.6 (forcing my clients to do the same). But I don't want to implement this functionality myself, only...

1 - 1, 1 -1, 1-1, 1
Hi, I have a question regarding lexical analysis. I recently came across a bug in our lexical analyser in phc (www.phpcompiler.org), that I am unsure how to solve. This is the problem: our current definition for integer constant looks something like INT ([1-9][0-9]*)|0 In particular, note that it does not allow for an (optional) "+" or "-" at the start of the integer. This means that the strings "1 - 1", "1 -1" and "1-1" all generate the same sequence of three tokens INT(1), OP(-), INT(1), for which the syntax analyser generates the subtr...

1.1.1.1 ?
hi my firewall logs dropped packets from an internal IP address trying to contact 1.1.1.1 through port 9999. Any ideas whether 1.1.1.1 is valid IP? and what is port 9999?? thanks mike wrote: > hi > > my firewall logs dropped packets from an internal IP address trying to > contact 1.1.1.1 through port 9999. Any ideas whether 1.1.1.1 is valid > IP? and what is port 9999?? > thanks These trojans *BlitzNet*, *Backdoor.Oracle*, *Backdoor.Spadeace* uses port 9999 -- S.S. "StarScripter" <Star@privacy.net> wrote in message news:<bv8ejj$p54t3$1@ID-185702.new...

java.lang.UnsatisfiedLinkError: no HwAPI_64 in java.library.path for jdk 1.6 on hpux
I had installed jdk 1.6 on hpux. I specified LD_LIBRARY_PATH and CLASSPATH on bash. I copied the libHwAPI.sl JNI shared library file to /opt/java6/jre/ lib/ext. Please help to fix "no HwAPI_64 in java.library.path" error. $ java -version java version "1.5.0.08" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0.08- _04_may_2007_06_31) Java HotSpot(TM) Server VM (build 1.5.0.08 jinteg:05.04.07-11:53 IA64, mixed mode) $ which java /usr/bin/java $ ls -ld /usr/bin/java lrwxr-xr-x 1 root sys 25 Mar 12 12:42 /usr/bin/ java -> /opt/java1.5/jre/b...

Web resources about - java 1.4 fail with java.lang.UnsatisfiedLinkError but 1.5, 1.6 ok - comp.sys.hp.hpux

'jni' Top Users - Stack Overflow
current community chat blog Stack Overflow Meta Stack Overflow Stack Overflow Careers your communities Sign up or log in to customize your list. ...

Arduino - ReleaseNotes
ARDUINO 1.6.5-r2 - 2015.06.17[ide]* Windows: fixed a problem that prevented opening the IDE when double clicking a .ino fileARDUINO 1.6.5 - 2015.06.15[ide]* ...

AquaMinds Software - Support
AquaMinds provides free product support via knowledgebase search services, downloads and updates. We highly recommend that you sign-up for our ...

Profile for rasputin
Articles - News - Weblogs - Buzz - Books - Forums Welcome Guest Sign In Advertisement Nickname rasputin Registered since: October 8, 2003 Short ...

Issues - chromium - An open-source project to help move the web forward. - Google Project Hosting
My favorites ▼ - Sign in chromium An open-source project to help move the web forward. Project Home Downloads Wiki Issues Code Search New issue ...

Index for the letter U : Java Glossary
Canadian Mind Products Java & Internet glossary : U words


Bugs, Errors, Known Issues
Use the coupon code bunny-walks today and save!

Fixing OpenCV's Java bindings on gcc systems
Photo by Julian Schroeder I just spent quite a few hours tracking down a subtle problem with OpenCV's new Java bindings on gcc platforms, like ...

The LLVMdev June 2014 Archive by thread
June 2014 Archives by thread Messages sorted by: [ subject ] [ author ] [ date ] More info on this list... Starting: Sun Jun 1 02:02:17 CDT 2014 ...

Resources last updated: 2/11/2016 6:24:50 AM