Java Scripting Redux

I like developing quick apps in Java - I think with all the available .jars out there, it's pretty quick and easy to put together a functional script that isn't too verbose, yet is clean and easy to read and does quite a lot. But why hasn't Sun made Java easier to use as a Scripting language?

To me it would take two things: a directory where you could throw every .jar you can think of in and it would automagically be on the CLASSPATH (yes I know about the /ext/ dir in the JDK, but it doesn't ever work for me). And secondly, I want to be able to refer to .java files instead of .class files, like in Python. I don't need another syntax (Groovy) and I don't need any more magic besides these two basic things. Why hasn't this been done yet?

I'm doing some work on my server and I wanted to add some Java apps to crond. But the level of effort I need to make to do this is annoying - basically, I have to set up a small Ant project and a custom .sh script as a wrapper around my class. To develop I have to use Ant, to test I have to use a .sh file which uses some magic to automatically add the .jar files in my lib to my CLASSPATH. This is all a pain in the ass. The Perl and Python guys just write some code, throw it into a text file and they're done. Why isn't Java that easy to use on the server? You figure Sun of all companies would want to use Java like this in Solaris, etc., no?

And with JDK 1.5 coming and there's nothing like this coming that I know of, so I'm just going to have to wing it. Maybe I'll just unpack all the .jars I have into a big directory somewhere on my server... (yeah, that'll be manageable).

-Russ

< Previous         Next >