Mac Osx Set Library_path Rating: 7,1/10 3619 votes
Check your PATH Setting
I've tried repeatedly installing jzmq on Mac OS X. Whatever I do, I hit a brick wall with this exception: java.lang.UnsatisfiedLinkError: no jzmq in java.library.path I have successfully installed (pkg-config and) libzmq and libjzmq into. In this tutorial, we show you how to set $JAVAHOME environment variable on latest or older Mac OSX. Mac OSX 10.5 or later. In Mac OSX 10.5 or later, Apple.
- May 23, 2015 At some point in the past I followed directions in 'Oracle Database Client Installation Guide for Apple Mac OS X (Intel)' so that I could use sqlplus on my MacBook.Following the directions, I set the DYLDLIBRARYPATH environment variable in my.bashrc. Today, I noticed this.
- May 23, 2015 At some point in the past I followed directions in 'Oracle Database Client Installation Guide for Apple Mac OS X (Intel)' so that I could use sqlplus on my MacBook. Following the directions, I set the DYLDLIBRARYPATH environment variable in my.
In the instructions below, $INSTALL_DIR refers to the path to the new install directory, /path/to/dakota/install/directory/Dakota.
Make sure Dakota executables (and optionally test files and current directory) are available on the PATH by typing 'which dakota' at command line prompt. If your PATH variable is set correctly, the path to the dakota binary should be displayed.
If your PATH variable is NOT set correctly, you will get a message like the following:
The following setup will make the dakota command and other helper programs available at the terminal. If you prefer you may refer to the dakota executable using its fully-qualified path. Note, however, that some examples will require modification to work properly if dakota and related helper programs are not on your PATH.
To persist the PATH to Dakota across terminals/sessions, make the following changes to the appropriate shell login script. If you prefer to just test in your current terminal, execute the commands directly in a terminal.
Make Changes in Bash Shell
- Edit your Bash startup file in your favorite text editor. For Linux, this is ~/.bashrc. OS X terminal runs a login shell, and so the start up file may be ~/.bashrc, ~/.bash_profile, ~/.bash_login, or ~/.profile. See the manpage for Bash for more information about the differences between login and non-login shells.
- Modify and export PATH, PYTHONPATH, and (if using a Dakota release prior to 6.8) (DY)LD_LIBRARY_PATH variables. Type the following line, replacing $INSTALL_DIR with the absolute path to your installation directory, e.g. $HOME. You need not add the gui path if you are not using the Dakota GUI, or PYTHONPATH if you do not plan to use the dakota.interfacing Python module.
On Linux:
On OS X:
- Save and close file.
- Update changes in your shell window.
Make Changes in C shell
- Edit the startup file ~/.cshrc in your favorite text editor.
- Modify and export PATH, PYTHONPATH, and (if using a Dakota release prior to 6.8) (DY)LD_LIBRARY_PATH variables. Type the following line, replacing $INSTALL_DIR with the absolute path to your installation directory, e.g. $HOME. You need not add the gui path if you are not using the Dakota GUI, or PYTHONPATH if you do not plan to use the dakota.interfacing Python module.
On Linux:
On OS X:
- Save and close file.
- Update changes in your shell window.
(MAC OS X)
How to Load a Java Native/Shared Library (.jnilib)
There are several ways to make it possible for the Java runtime to find and load a native shared library (.jnilib) at runtime. I will list them briefly here, followed by examples with more explanation below.
- Call System.load to load the .jnilib from an explicitly specified absolute path.
- Copy the shared library to one of the paths already listed in java.library.path
- Modify the LD_LIBRARY_PATH environment variable to include the directory where the shared library is located.
- Specify the java.library.path on the command line by using the -D option.
- Put the .jnilib in /Library/Java/Extensions/.
1. Call System.load to load the shared library from an explicitly specified absolute path.
Mac Os X 10.11 Download Free
This choice removes all uncertainty, but embeds a hard-coded path within your Java application. Example:
2. Copy the shared library to one of the paths already listed in java.library.path
To view the paths listed in java.library.path, run this Java code:
Note: The java.library.path is initialized from the LD_LIBRARY_PATH environment variable.
The loadLibrary method may be used when the directory containing the shared library is in java.library.path. To load 'libchilkat.jnilib', call System.loadLibrary('chilkat'), as shown below.
3. Modify the LD_LIBRARY_PATH environment variable to include the path where the Chilkat shared library is located.
For Bourne Shell, K Shell or Bash, type:
Mac Os X Set Library_path Download
For C Shell, type:
4. Specify the java.library.path on the command line by using the -D option.
For example:
Mac Os X Set Ld_library_path
Additional Notes:
Macos Set Ld_library_path
From developer.apple.com: 'JNI libraries are named with the library name used in the System.loadLibrary() method of your Java code, prefixed by lib and suffixed with .jnilib. For example, System.loadLibrary('hello') loads the library named libhello.jnilib. Java HotSpot also recognizes .dylib as a valid JNI library format as of Mac OS X v10.5.'