I am trying to run:
SpatialReference poSourceSRS = new SpatialReference();
poSourceSRS.ImportFromEPSG(4326);
String unit = poSourceSRS.GetAttrValue("UNIT");
System.out.println("unit: " + unit);
on a Tomcat 8(Run As.. -> Run on Server), which I linked to eclipse luna, and I get the tomcat error(in eclipse):
SEVERE: Servlet.service() for servlet [package.Servlet] in context with path [/myServlet] threw exception [Servlet execution threw an exception] with root cause
java.lang.ClassNotFoundException: org.gdal.osr.SpatialReference
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1305)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1157)
at package.Servlet.showTileURL(Servlet.java:45)
But when I try to do the same in a java application (Run As… -> Java Application) it works..
I read something about editing catalina.bat but they used Linux and I am on a Windows 7 64-bit. I don’t know what I have to add to catalina.bat