strange new world

java is a strange world. I am use to ./configure && make && make install. edit a config file or two, then run it. Not so with java.

First you have ant, which is java’s answer to configure && make apparently. But instead of

./configure –enable-foo

they decided that

java -Dant org.apache.tools.ant.Main -DFOO=true

is better. Obviously for some definition of ‘better’ other than mine.

Now I need tomcat and servlets running. Its simple really, but there is no info on tomcat’s site. Apparently all you do is copy the file.war to /opt/tomcat5/webapps then go to http://yoursite.foo:8080/file/ is there any info out ther for this? no

of course my fav is the errors, for example typing ant in the src dir gives you:

Traceback (most recent call last):
File “/usr/bin/java-config”, line 123, in ?
run(option_list)
File “/usr/bin/java-config”, line 41, in run
func(args)
File “/usr/lib/python2.4/site-packages/java_config/jc_options.py”, line 337, in __call__
print env['CLASSPATH']
File “/usr/lib/python2.4/UserDict.py”, line 17, in __getitem__
def __getitem__(self, key): return self.data[key]
KeyError: ‘CLASSPATH’

Of course this is a distro issue, I think. But I have never seen an error message so arcane from configure. Its usually “can’t file libfoo.so”

It would be really nice if languages didn’t require an entirely new support infrastructure.

End Rant

Comments (2)

  1. Mr Coffee wrote::

    Interesting rant. Fortunately it is all wrong, based on no experience with Java. That’s ok, we’ve all been there.

    I don’t know what distro you use, but it obiously has interesting ideas about Java.

    Here’s my advice. Remove any distro specific Java stuff. Next, download your JDK of choice from java.sun.com and install it. Next do the same with ant.

    Two of your rants will dissapear: you can run and by simply starting the ‘ant’ command. And the weird python error from the distro-specific java wrapper will also be gone.

    Then start readin the Tomcat documentation. A lot of docs are included. There are also at least 50 books out there and many many articles about getting started with Tomcat. On developerworks, OnJava, JavaWorld, etc.

    EndRant.

    Mr. C.

    Thursday, November 24, 2005 at 2:36 am #
  2. zion wrote::

    I couldn’t find a quick howto on setting up tomcat with servlets. Yes, there is a ton of documentation, but I don’t need a book to try out a servlet! I had to go and ask a java guy how to do this and he didn’t even know about any docs because quote, “its too simple to document”.

    But thats the entire point of a distro! To manage packages. If something goes out of the mainstream they better have a good reason for it, and I haven’t seen one for java.

    Thursday, November 24, 2005 at 11:23 am #