Posted: Wed Sep 05, 2007 4:33 am Post subject: Invoke a map using Java API
Acolyte
Joined: 15 Jun 2005 Posts: 51
I am trying to invoke a map using Java API for TX. When I try to run the below program I am gettting an Exception
Program:
import com.ascentialsoftware.dstxpi.*;
public class WTXClient
{
//private static String szInputBuffer = "This is my input data";
public static void main(String[] args)
{
try
{
System.out.println("Starting...");
// Initialize the API
MMap.initializeAPI(null);
// Load a map
System.out.println("Creating instance of Compliance check map...");
MMap map = new MMap("D:\\Austin\\New Folder\\Sample Map.mms");
// Run the map
map.run();
// Clean up
map.unload();
MMap.terminateAPI();
}
catch( MException e )
{
e.printStackTrace();
}
}
}
Exception:
C:\Java\jdk1.6.0\bin>java Example1
Exception in thread "main" java.lang.UnsatisfiedLinkError: no dstxjpi in java.li
brary.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at com.ascentialsoftware.dstxpi.MBase.<clinit>(Unknown Source)
at Example1.runMap(Example1.java:19)
at Example1.main(Example1.java:
I'd say your PATH or LIBPATH/LD_LIBRARY_PATH or java.library.path environment variables are not set up correctly in the shell that is running your program.
The documentation on the Java API for running Maps should tell you what's missing. _________________ I am *not* the model of the modern major general.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum