Sunday, December 2, 2007

Scriptom Frustration

Article Outdated, please see tutorial here

Note: My struggles are unsuccessful so far. Groovy has not been easy to get working. I'll update the post as I figure this stuff out...

-Tres

Groovy + Scriptom
I'll start by saying I'm a beginner with Java. I've been learning it ass-backwards for a project at work, and it wasn't until recently I started stepping into the "code management" world, such as Netbeans, Eclipse, Groovy, etc. The most "English" way to put Groovy, from what I've read is, it's a tool for creating Java programs quickly, without being held victim to the very specific Java syntax (much like C or C++ if you're familiar with either). Essentially, forget putting a semicolon after every line, redundant casting, and squiggly brackets up the wazoo. Groovy claims to be as easy as some of the lazier, more popular and less respected languages, such as VB6 or VB.NET.


Here's my struggles, as a beginner with Groovy install and a sample "Hello World!".

  1. Obtain Groovy from the Groovy website. Immediately, you should see a download link at the top of the page:



  2. Download the "Binary Release" for your platform. Chances are you're on Windows, but Mac and Ubuntu versions are kindly available too.
    Note: "Binary Release" is programmer's terminology for "Built to work on your system." The windows version is more than a binary, it's a full installer, so for "English" sake, you are downloading the Groovy installer for Windows.






  3. The installer is quite time consuming, considering its only 10MB (about the size of two mp3s). Take defaults, and expect an error. Here's what you'll get:


    Note: For the veterans, JAVA_HOME is a common concept. Tools, such as "ANT", require it, and if you're a dedicated Java developer, ANT is and every-day word.

    You could almost say ANT is an essential tool in the Java world (IDE's like Netbeans and Eclipse can't work without it!) but needless to say, JAVA_HOME can be a show stopper for a beginner just trying to learn!

    Warning: If you are running 64 bit Windows, you may need to install the 32 bit version of Java for Groovy to work! In this case, you would be using "Program Files (x86)" in place of "Program Files".


  4. Setting your JAVA_HOME, is much like setting your "PATH" if you've ever done it before in Windows or Linux. Since Scriptom, which is the goal, only works in Windows, I'm only supplying the Windows instructions:

    • Right Click "My Computer" (Through Desktop, or Start Menu)
    • Click Properties
    • Click "Advanced" Tab
    • Click "Environment Variables" button
    • Under "User variables" click "New"
    • Variable Name: JAVA_HOME
    • Variable Value: Java Development Kit installation (JDK). It should be something close to: "C:\Program Files\Java\jdk1.6.0"
    • Click OK >> OK >> OK

      Note:
      Alternately, you can add the value as a "System Variable", which requires Administrator Rights on your PC, but will apply to all Users that log onto your computer!





  5. You'll notice later in the install, Scriptom comes packaged with Groovy.
    Note: If you were paying attention to the installer, you'll also notice that it automatically created Start Menu shortcuts. Unfortunately, this is only an Uninstaller, so don't go there expecting anything useful.
  6. I think it's about time to get started, but I'm not sure how. After downloading the samples from the Scriptom site, and trying the Build.bat script, I'm getting ANT_HOME errors. This has turned out to be a very cumbersome experience. I will update with progress tomorrow.
-Tres

No comments: