JavaSdk
From CodeTurtle
Contents |
Why do I need a Java JRE?
Why do I need to install Java to run a Java application? There's a lot to the answer. The short answer is that Java applications don't run directly in your operating system, they run in a Java virtual machine. You have to install that virtual machine (also known as the JRE, or Java Runtime Environment) in which Java applications, like CodeTurtle, can run.
What's the difference between the JRE and the JDK?
The JRE is just the virtual machine used to run Java applications. That's usually all you need. You download your Java application (like CodeTurtle) and tell the JRE to run it. The JRE then takes over and converts the instructions in the application into something your operating system can use to run the application.
The JDK is effectively the JRE plus development tools (in fact, JDK stands for Java Development Kit). The primary development tool coders typically care about is the compiler (javac). The compiler is used to convert Java code (which the developer writes) into machine language that the virtual machine uses to run.
Why is the JDK recommended for CodeTurtle?
One of the features of CodeTurtle is to compile student submitted projects automatically. In other words, students submit the human readable Java code they wrote and CodeTurtle's first step in grading is to compile those into an application that can be run. In order to compile, CodeTurtle needs the Java compiler. To get that, you need a JDK.
So while CodeTurtle itself can run just using a JRE, in order for it to do everything it is intended to do, it needs access to a JDK.
How do I install it?
If you're on Linux, your life is pretty simple. Use the package installer relevant to your distribution (yum or apt most likely) to install the java package. That will likely take care of putting it in your path for you so you can find the java executable from a command prompt.
If you're on Windows, you'll need to head to [1] and download the JDK. Once it's installed, you probably need to take extra steps to make sure you can access the executables (java for running the application) from the command prompt. I wrote a blog on this in the past for my students that might be of some use.

