views:

68

answers:

2

Hello!

What is the most painless and multi-platform way to use scripting?...
...for things such as

  • Compilation
  • Web application deployment
  • Web server controlling
  • Other misc. tasks around web servers...

NOTE: I'm in the Java ecosystem.

Sure, there is Apache Ant, which is pretty multi-platform, but it isn't scripting.

+1  A: 

Depends entirely on what environment you're working in.

For Java you can either use the JavaScript ScriptEngine that ships with the Sun JDK. Alternatively you could use Groovy, which is a separate download but works on all modern JREs.

For general scripting I'd personally choose Python, because it's available almost everywhere and reasonably compact, while being an awsome language.

The only scripting environment that you'll find on almost all computers these days (no mater what OS/Hardware) is a JavaScript engine. But usually that's confined to the browser and doesn't really allow interaction with anything outside the browser.

Joachim Sauer
+1: Python is multi-platform. Many (but not all) Windows-isms are hidden cleverly by the `os` module.
S.Lott
+1  A: 

I recall reading that Java and Javascript are not not related - so Joachim Sauer's answer puzzles me...

Meanwhile, the original question lists compilation; web application deployment; web server controlling and other misc tasks around web servers.

That's a very broad spectrum, but then the question wasn't 'which the best scripting language?' but 'What is the most painless and multi-platform way to use scripting?' which is not necessarily the same thing.

As BerggreenDK said 'can you elaborate?'

pavium
Java and Javascript are not related, but all recent versions of the Sun JRE contain a JavaScript ScriptEngine that can be used to execute JavaScript code.
Joachim Sauer