Ticket #152 (new task)

Opened 8 years ago

Last modified 8 years ago

How to get jar files included so can be used for Java service api?

Reported by: surf9 Owned by:
Priority: minor Milestone:
Component: Development platform Version:
Keywords: Cc:

Description

Hi there

I have many jar files I would like to include.

My dir for the java api is:

/java/purpose

Inside the purpose dir I would like to have another folder called dependencies. Inside the dependencies folder I would like to store all the JAR files. I currently have not created the dependencies folder and all files are stored inside the purpose dir.

Inside /java/purpose path I have my .class file.

The java source code has the following import as an example: import org.geotools.data.FeatureSource?;

Currently when I try to compile my .java file I get the following error:

javac WFSJava.java WFSJava.java:4: error: package org.geotools.data does not exist

I've tried setting the CLASSPATH in the terminal using an absolute path to the /java/purpose dir and also tried adding it to the main.cfg using:

[env] CLASSPATH=/java/purpose

I still get the same error message.

Would you have any ideas how I can resolve this?

Thanks,

Change History

Changed 8 years ago by djay

To build your Java ZOO-Service you can use maven as explained here.

Note that you lay take a look at this page to see how some other developers have successfully used maven to build their own ZOO-Services based on the geotools library.

Note that the CLASSPATH variable you have added to your [env] will be used at runtime but the ZOO-Kernel for searching for any dependency. Still, this value will never be used by the java compiler.

Note: See TracTickets for help on using tickets.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png