Topic Options
Rate This Topic
#135322 - 09/05/06 12:06 PM Setting path for java API in linux
remedybuff Offline
Stealth Member

Registered: 05/05/06
Posts: 76
Loc: New Jersey, USA
Hi,

Could someone please specify as to how to specify the path for Remedy Java API in linux, as I am getting the below mentioned error...

Exception in thread "main" java.lang.UnsatisfiedLinkError: no arjni63 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1517)
at java.lang.Runtime.loadLibrary0(Runtime.java:788)
at java.lang.System.loadLibrary(System.java:834)
at com.remedy.arsys.api.Proxy.<clinit>(Proxy.java:51)
at com.remedy.arsys.api.DefaultProxyManager.getProxy(DefaultProxyManager.java:60)
at com.remedy.arsys.api.ARServerUser.verifyUser(ARServerUser.java:726)
at com.remedy.arsys.api.ARServerUser.login
..........

Top
#135327 - 09/05/06 08:59 PM Re: Setting path for java API in linux [Re: remedybuff]
Marie Offline
Stealth Member

Registered: 09/05/06
Posts: 23
Loc: MidWest
basically this means that the file arjni63.dll is not in the path. So bottomline is add this to the path and try it again.

Because I only have your goal of getting rid of the error I'll give you a few options:

If you do not have root access you may need to contact your sysadmin to help you out with the path for permanent usage but for now you can just export these environment variables. I'd suggest that you set the current environment to a temp variable (for each) or at least save the environment to a file first.

in Linux, Unix you have:
LIBPATH
CLASSPATH
JAVA_HOME
PATH=$LIBPATH:$CLASSPATH:$JAVA_HOME:[and everything else in $PATH]
**on Unix (HP-UX) all the PATH vars are delimited with a colon so it may be the same on some flavors of linux.

If your server is shared with many other apps and you don't want everything in the environment then you could also find the startup of java and change the classpath line in the startup; some people prefer it that way but I think it is too hard to maintain. But here's what you would do:

${JAVA_HOME}/bin/java -classpath $CLASSPATH $JAVA_ARGS $PROG_NAME
**note assumes you use these vars or you replace them with what you use.


If you are writing code or have a java program that calls this then you can do this:
System.loadLibrary("libName")...an alternative would be to use System.load("libPath\libName")

Hope that helps

Top