Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

java.lang.UnsatisfiedLinkError auf Solaris

Empfohlene Antworten

Hallo,

ich versuche derzeit ein auf Windows geschriebenes Java Native Interface (JNI) Projekt (1Jar, 2DLL's) auf Solaris zu portieren.

Mein Jar-File funktioniert einwandfrei.

Eine dll wurde von einem ehemaligen Kollegen als normlib.a auf Solaris portiert.

Ich habe nun ein weiteres c++ File geschrieben, welches die JNI-Funktionalität beinhaltet und zusätzlich die

schon vorhandene normlib.dll bzw das normlib.a als Library verwendt.

Auf Windows funktioniert dies auch einwandfrei.

Nur auf Solaris...

Ich habe mein c++ File zu einem lib.so umgewandelt (aber weis nicht ob alles richtig eingebunden ist).

Wenn ich nun mein Jar-File aufrufe kommt ein

java.lang.UnsatisfiedLinkError: no lib in java.library.path

at java.lang.ClassLoader.loadLibrary

...

Daher ich glaube das ich einfach einen Path nicht richtig gesetzt habe und er das so-File in einem ganz

anderen Verzeichnis als dem aktuellen sucht.

--> Was muss ich denn alles gesetzt haben ? PATH,... ?

Oder das die Compilierung meiner c++ Sourcen nicht stimmte.

--> pwd: /usr/sfw/bin

./g++ /Sylvi/scr/norm.cpp -I /Sylvi/src/include -L /Sylvi/src/library

-G -o lib.so

(im src : norm.cpp | im src/include: jni.h, jni_md.h, norm.h |

im src/library: normlib.a)

Ich brauche dringend Hilfe !!!

:confused:

Danke Sylvi

Es hat leider nichts gebracht.

Er sagt immer noch, dass er die Lib nicht finden kann.

Vielleicht ist ja echt ein fehler in einer der shared libraries ...

Kann ich unter Solaris irgendwie die Exportfunktionen einer .so ausgeben lassen ?

LG Sylvi

Keine Chance habe die .a zu einer .so neu compiliert. Habe die 2. .so neu compiliert und versucht mein Jar-File zu starten.

Ich habe es auch mit dem :

java -Djava.library.path=/Sylvi/norm_solaris/ -cp norm.jar package.Start 12345678

java -Djava.library.path=./ -cp norm.jar package.Start 12345678

---------------------------------------------------------------

Aber es läuft wieder auf den java.lang.UnsatisfiedLinkError hinaus.

Ich weis nicht mehr wo das Jar noch sucht. Doch leider muss ich den Fehler bis morgen finden.

In welchem Pfad sucht Java auf Solaris eine C++Library ???

:(

LG Sylvi

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.