Re: [Geotools-devel] How to compile a Java program containing geotools
David, this is a general Java development question, not specific to GeoTools. There are many ways to create something runnable. The basic problem is that you need to package your .class files into a runnable .jar file, and also ensure that all dependencies are available at runtime on the classpath. You also need a JRE (your JDK comes with one, other users will need one). In Eclipse you should be able to File/Export/Java/Runnable JAR file and bundle all your dependencies into the JAR. http://www.google.com/search?q=eclipse+runnable+jar+file+tutorial This is crude and unsuitable for real applications because it makes it hard to manage dependencies (and comply with the LGPL), but might be suitable for experimentation. For real applications, there are open source installers that bundle your runnable JAR, its dependencies, scripts, and even a JRE. I have used izPack (but that was years ago). There are others: http://stackoverflow.com/questions/184060/java-application-installers http://www.google.com/search?q=java+application+installer JEE servlets have their own deployment technology: WAR files; These can be generated by Maven and Eclipse. Other platforms like Eclipse RCP have their own patterns. Kind regards, Ben. On 19/12/12 20:28, David Shi wrote: > Hi, Ben, > Thank you very much for your suggestions. > It is a new program with a mixture of external Jars, including Geotools. > It runs in Eclipse. > But, it fails when an executable is to be compiled. I need to find Step > by Step guides on how to create an executable or Jar. > The information on the Internet is very confusing. > Which application should I use to create my first executable easily? > Regards. > David > > > > > *From:* Ben Caradoc-Davies > *To:* David Shi > *Cc:* "geotools-devel@lists.sourceforge.net" > > *Sent:* Wednesday, 19 December 2012, 2:15 > *Subject:* Re: [Geotools-devel] How to compile a Java program containing > geotools > > Is this someone else's program or are you writing a new one? > > There are many build systems, including make, ant, maven, and sbt, all > of which can be used to build programs containing GeoTools. > > If you are writing a new program from scratch, tools like maven that can > use maven repositories will help you automatically get the GeoTools > dependencies that you need. > > Kind regards, > Ben. > > On 18/12/12 20:05, David Shi wrote: > > Hi, > > > > Can anyone give me the step by step guide to compile a Java program > > containing geotools? > > > > Regards. > > > > David > > -- Ben Caradoc-Davies <mailto:ben.caradoc-dav...@csiro.au>> > Software Engineer > CSIRO Earth Science and Resource Engineering > Australian Resources Research Centre > > -- Ben Caradoc-Davies Software Engineer CSIRO Earth Science and Resource Engineering Australian Resources Research Centre -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] How to compile a Java program containing geotools
Hi, Ben, Thank you very much for your suggestions. It is a new program with a mixture of external Jars, including Geotools. It runs in Eclipse. But, it fails when an executable is to be compiled. I need to find Step by Step guides on how to create an executable or Jar. The information on the Internet is very confusing. Which application should I use to create my first executable easily? Regards. David From: Ben Caradoc-Davies To: David Shi Cc: "geotools-devel@lists.sourceforge.net" Sent: Wednesday, 19 December 2012, 2:15 Subject: Re: [Geotools-devel] How to compile a Java program containing geotools Is this someone else's program or are you writing a new one? There are many build systems, including make, ant, maven, and sbt, all of which can be used to build programs containing GeoTools. If you are writing a new program from scratch, tools like maven that can use maven repositories will help you automatically get the GeoTools dependencies that you need. Kind regards, Ben. On 18/12/12 20:05, David Shi wrote: > Hi, > > Can anyone give me the step by step guide to compile a Java program > containing geotools? > > Regards. > > David -- Ben Caradoc-Davies Software Engineer CSIRO Earth Science and Resource Engineering Australian Resources Research Centre-- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] How to compile a Java program containing geotools
Is this someone else's program or are you writing a new one? There are many build systems, including make, ant, maven, and sbt, all of which can be used to build programs containing GeoTools. If you are writing a new program from scratch, tools like maven that can use maven repositories will help you automatically get the GeoTools dependencies that you need. Kind regards, Ben. On 18/12/12 20:05, David Shi wrote: > Hi, > > Can anyone give me the step by step guide to compile a Java program > containing geotools? > > Regards. > > David -- Ben Caradoc-Davies Software Engineer CSIRO Earth Science and Resource Engineering Australian Resources Research Centre -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d ___ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] How to compile a Java program containing geotools
mvn compile See http://docs.geotools.org/latest/userguide/tutorial/quickstart/index.html Ian On 18 December 2012 12:05, David Shi wrote: > Hi, > > Can anyone give me the step by step guide to compile a Java program > containing geotools? > > Regards. > > David > > > -- > LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial > Remotely access PCs and mobile devices and provide instant support > Improve your efficiency, and focus on delivering more value-add services > Discover what IT Professionals Know. Rescue delivers > http://p.sf.net/sfu/logmein_12329d2d > ___ > GeoTools-Devel mailing list > GeoTools-Devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-devel > > -- Ian Turton -- LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial Remotely access PCs and mobile devices and provide instant support Improve your efficiency, and focus on delivering more value-add services Discover what IT Professionals Know. Rescue delivers http://p.sf.net/sfu/logmein_12329d2d___ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel