Domanda

I'm trying to run the example from this question about using the BMC remedy API. However I'm getting the below error message when trying to run the example, it appears to compile fine.

As I understand it I need to reference arapi71.jar. However that library is actually sitting in a different domain, so I can't reference it directly. I've copied over the whole folder that it sits in to my PC and added to the build path, this may be the issue, I'm new to using frameworks etc so if that's the problem let me know.

If that's isn't the problem and it should be ok to pull over all that info and reference it, what else could I be missing? This site here has some ideas about the path's etc, but it seems they are mostly on linux and I'm not 100% sure what it correlates to on windows (7 by the way though I don't think that makes a difference to environment variables). It mentions that not being able to find the .dll file could be an issue, this is in the folder, so I would assume it could still find it in there?

Any help would be much appreciated!

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.bmc.arsys.api.Proxy.ARInitialization()J
at com.bmc.arsys.api.Proxy.ARInitialization(Native Method)
at com.bmc.arsys.api.Proxy.<init>(Unknown Source)
at com.bmc.arsys.api.ProxyJRpcBase.<init>(Unknown Source)
at com.bmc.arsys.api.ProxyJRpc.<init>(Unknown Source)
at com.bmc.arsys.api.ProxyManager.createProxy(Unknown Source)
at com.bmc.arsys.api.ProxyPool.get(Unknown Source)
at com.bmc.arsys.api.PoolingProxyManager.getProxy(Unknown Source)
at com.bmc.arsys.api.ARServerUser.createEntry(Unknown Source)
at CreateEntry.main(CreateEntry.java:34)
È stato utile?

Soluzione

dann.dev,

From your stacktrace it appears that the directory that contains the arapi71.jar and all the native implementation is not on your Windows path. You need to add the directory containing all the jars and dlls to your Windows path so that those files are found at runtime.

Typically, I run java apps that use the Remedy API with a wrapper batch file that adds the API directory to the path before executing the app.

Something like:

set PATH=%PATH%;<api directory>

java <params> MyApp

should configure what you need.

Hope that helps, Ed

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top