March 24, 2005

Java Geek Trick du Jour

Programming-fu

I'm trying to compile some sample classes to learn how to use Apache Axis the Java webservices system. Part of Java is that it needs to know where to load class libraries from. This is normally set by the CLASSPATH environment variable.

Java stores class libaries in 'jar' files, (java archive). Unfortunately, some apps need dozens of jar files to compile / run, and the CLASSPATH variable can only point to individual JAR files, not say "This directory full of jar files".

So a fellow on #java suggested this:

export CLASSPATH=`echo mydir/*.jar | tr " " ":"`

Cute. Loads up the CLASSPATH variable with all the jars in a directory.


Posted by dbs at March 24, 2005 10:17 AM

Trackback Pings

TrackBack URL for this entry:
http://mt.homeport.org/cgi-bin/mt-tb.cgi/1039

Subscribe without leaving a comment

Email Address:


Linux // Mac Webgame Reviews
A Way to Kill Some Time - Fantastic Contraption
Ikariam - Civilization goes Web!
It's GROW time again!
Darwinia Mini-Review
Rampant Eye Candy

View all games...
Reviews (Most recent 5)
Battle for Wesnoth : A free turn based strategy game
Photo Managers - Digikam rocks
Journeying Abroad - Life without Mozilla
Calendar sharing. Nirvana found?
Another Linux user. Our ranks grow.

View all reviews...
Recent Geekitude
Perl GRRRR.
My iPhone - 2 weeks on.
A WeekBlog - A Post a Day - CONGOv2
So... shiny...
iPhone over Palm - It has it's faults, but...

View all geekery...