Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to set up java.library.path in eclipse in linux?
How to set up java.library.path in eclipse in linux? [message #304682] Wed, 14 June 2006 05:50 Go to next message
Eclipse UserFriend
Originally posted by: brandonchen.realtek.com.tw

Hi,

I need to run a JNI .so object for java in linux system.
This line System.loadLibrary("myJNI") will casue error message:

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

Thus I guess I need to set up the path for java.library.path in eclipse. How
to set up the path? Appreciated for any reply!

Sincerely,

Brandon
Re: How to set up java.library.path in eclipse in linux? [message #304700 is a reply to message #304682] Wed, 14 June 2006 09:58 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brandonchen.realtek.com.tw

Sorry for the second post.
The plug-ins project we are doing needs to reference to some .so objects.

Here is another question:
1. The plug-ins will be exported as Jar files. Is it possible to include the
..so objects into the jar files? In other words, the .so objects are inside
the jar files and the users only need to import these jar files to run the
program.
Is this a good appraoch?

2. How to set up the java.library.path permanently?

Appreciated for any help..,

Brandon


----- Original Message -----
From: "Brandon" <brandonchen@realtek.com.tw>
Newsgroups: eclipse.platform
Sent: Wednesday, June 14, 2006 1:50 PM
Subject: How to set up java.library.path in eclipse in linux?


> Hi,
>
> I need to run a JNI .so object for java in linux system.
> This line System.loadLibrary("myJNI") will casue error message:
>
> java.lang.UnsatisfiedLinkError: no myJNI in java.library.path
>
> Thus I guess I need to set up the path for java.library.path in eclipse.
How
> to set up the path? Appreciated for any reply!
>
> Sincerely,
>
> Brandon
>
>
Re: How to set up java.library.path in eclipse in linux? [message #304707 is a reply to message #304700] Wed, 14 June 2006 11:26 Go to previous message
Paul Webster is currently offline Paul WebsterFriend
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Brandon wrote:
> Sorry for the second post.
> The plug-ins project we are doing needs to reference to some .so objects.
>
> Here is another question:
> 1. The plug-ins will be exported as Jar files. Is it possible to include the
> .so objects into the jar files? In other words, the .so objects are inside
> the jar files and the users only need to import these jar files to run the
> program.
> Is this a good appraoch?
>
> 2. How to set up the java.library.path permanently?
>

For just normal java projects, you can set the native library location
on the project properties>Java Build Path, on both the Source and
Libraries Tab. Then when you run within eclipse, eclipse will take care
of setting java.library.path for you.

For plugins, you can put the .so in the root folder of the plugin and
use the Bundle-NativeCode header. There's a section in Alex's article
on it: http://www.eclipsezone.com/articles/eclipse-vms/

Later,
PW


Previous Topic:MultiPageEditorPart and removePage
Next Topic:Dedicated console in Eclipse 2.x
Goto Forum:
  


Current Time: Fri Apr 26 01:34:56 GMT 2024

Powered by FUDForum. Page generated in 0.03122 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top