[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Setting up a Java development environment the debian way.



Alan Chandler wrote:

[snipped...]

So my questions are:

1) What tools do I need to develop the application. This includes code editiing, build environment, unit testing, I tried to setup eclipse on my workstation but there are unsatisfied dependencies (java runtime?).

You'll need a build tool and Ant is probably the easiest and best to use:

http://packages.debian.org/cgi-bin/search_packages.pl?keywords=ant&searchon=names&subword=1&version=stable&release=all

If you're developing web apps, then the Struts frame work is very handy:

http://packages.debian.org/cgi-bin/search_packages.pl?keywords=struts&searchon=names&subword=1&version=stable&release=all

I would suggest looking at all the Apache commons libraries that are
available via an apt-get install.

http://packages.debian.org/cgi-bin/search_packages.pl?keywords=commons&searchon=names&subword=1&version=stable&release=all

I would say that most of these libraries are out of date as you can
download newer versions from the Apache website. I do this and manually
mange them, it means I've always got the latest version with bug fixes,
new functionality etc.

For unit testing, then you can't go wrong with JUnit:

http://packages.debian.org/cgi-bin/search_packages.pl?keywords=junit&searchon=names&subword=1&version=stable&release=all

If you want to get fancy then you could download Hibernate and use
this to communicate with Postgres. This is waht I'm going to be doing
with a small project in the near future:

http://www.hibernate.org/

2) What run time environment

You'll also need a servlet engine so either Tomcat 4 or Tomcat 5,
depending on what version of the JDK and servlet API you want to use:

http://packages.debian.org/cgi-bin/search_packages.pl?keywords=tomcat&searchon=names&subword=1&version=stable&release=all

There only seems to be Tomcat 4, so you'll be limited to Servlet 2.3
and JSP 1.2.

Finally you'll neeed a decent JVM, I download the Sun ones and build
.deb's using this website as a guide:

http://serios.net/content/debian/java/

Just remember to set a JAVA_HOME env variable for Tomcat etc to pick up
and use. I've defined mine in /etc/environment and this seems to work
okay, although what you do when you change from JDK1.5 to JDK1.4 with
update-alternatives I don't know...

Obviously all this from standard debian packages if that is possible

In some cases it will be easier to download and manually manage certain
packages, as you either can't get them or the versions you can get with
apt-get are too old.

There doesn't seem to be any decent Java IDE's that come as a .deb
package. Netbeans and Eclipse seem to be the two popular ones and ASAIK
both come as .bin's so you could manually install them. OTher than that,
you could use vi or emacs...

Cheers,

--
bob [at] bobarnott [dot] com                   http://www.bobarnott.com/
------------------------------------------------------------------------
"Crash programs fail because they are based on theory that,
 with nine women pregnant, you can get a baby in a month."
                                                    -- Wernher von Braun



Reply to: