2. Software to Install

Before you begin programming, you need to install some basic tools.

2.1 Java/Groovy

For Java and Groovy you will need to install the following:

  • JDK (Java Development Kit) such as JDK 8.
  • IDE (Integrated Development Environment) such as NetBeans 8.
  • Groovy: A dynamic language similar to Java that runs on the JVM (Java Virtual Machine).

Install Java and NetBeans 8

Download and install the Java JDK 8 with NetBeans. Open NetBeans and select “File” ⇒ “New Project…” ⇒ “Java Application”

Install Groovy

Go and install Groovy.

Trying it out

After installing Groovy, you should use it to try coding. Open a command prompt and type groovyConsole and hit enter to begin.

In the groovyConsole, type the following and then hit Ctrl+r to run the code:

1 print "hello"

Since most Java code is valid Groovy code, you should keep the “Groovy Console” open and use it to try out all of the examples from this book.

You can also easily try out Scala and JavaScript in the following ways:

  • For JavaScript (JS), just open your web-browser and go to jsfiddle.net.
  • For Scala, just type scala in your command prompt or terminal.

2.2 Others

Once you have the above installed, you should eventually install:

  • Scala: An object-oriented language built on the JVM.
  • Git: A version control program.
  • Maven: A modular build tool.

Go ahead and install these if you’re in the mood - I’ll wait.

2.3 Code on Github

A lot of the code from this book is available on github.com/modernprog. You can go there at any time to follow along with the book.