The Java programming language is an easy programming language to set up. Even though there are many IDEs out there, it is possible to set up a computer for Java programming without any IDE. I will leave the computer specifications up to the reader assuming that the system is efficient enough for coding a programming language. In addition, the article will have hard drive paths that are consistent with the Windows 8 environment.
You may want to find out where this path are located if you are using a different operating system. The purpose of this article to show you have to set up a computer for coding in the Java programming language without an IDE install. This is because some teachers at the University will prohibit the use of IDE especially in introduction Java classes like Java I. I do understand the logic behind their reasoning.
Since Java is a language, these teachers want to make sure that you learn the grammatical rules (syntaxes) behind writing in Java. Coding without an IDE will deprive you of the IntelliSense mechanism, which helps you correct the syntax in your code. Doing this you will learn from your mistakes without getting use to the IDE corrective engine. Once you learn the syntax then you could write code with less mistakes and this could make you increase your writing speed.
Let us jump into setting up your computer to code Java code without the aid of IDEs.
The Shopping List
To be able to set up your computer to compile without an IDE you will need two items downloaded from the internet. The first item you will need is the latest Java distribution. You could find it by pointing your browser to http://java.com/download. Please note that in Windows 8 the Java application will only work in desktop mode.
At the time of this article, the latest Java version is 7.25. After you downloaded this application then you will need to download the Java Development Kit. The JDK could be download from http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html. At the time I wrote this article the latest Java version is 7.25. You will see at the top of the page that there are two versions of the JDK 7.25, Java SE Development Kit 7u25.
To download the Java SE Development Kit 7u25 click on “Accept License Agreement” and then click on the exe version for the operating system (32-bit or 64-bit). You want to take note on the Java versions. If you happen to have the Java version different from the JDK version then you will get compilation errors. You could find yourself one day re-writing your code thinking that you have done something wrong in the code and lose an entire day of coding.
Please also note to download either the 32-bit or the 64-bit version of the application depending on your operating system version. Save both applications in a single folder in case, you need to re-install them again. Now that we have both items, let us look at the process.
The Process
To get your computer ready to compile without an IDE we will need to complete four processes. We will need to set up the Java Environment. Then we will need to set up the JDK. Next, we will set up the development folder. Finally, we will test by creating your first Java application. Let us set up the Java Environment.
The Java Environment
To install the latest version of Java (7.25) you will start by right clicking on the downloaded file and select “Run as Administrator.” When the computer asks if you want to allow the program to make changes to your computer then you click on the Yes button. After you click the yes button, the Java Setup window shows up with options to cancel, install, and to change the destination of the folder. All you want to do here is to click on the install button.
Once you press the install button, the window disappears and after a few seconds, another Java Setup window shows up. This window I usually refer to as the CrapWare window. This is because you will find options to install toolbars on your computer. If you are like me, you will uncheck all selection before you click the next button.
After you press on the next button, the installation process begins. You will now see a new window that has the progress bar for the installation. Once the bar reaches the far right then the window disappears only to be replace by a window that say your installation is complete. Upon clicking the close button, a browser window will open.
The page that shows up is the Java verification page, which you can always access at http://www.java.com/verify. This page could be handy later because it tells you the Java version that is installed on your computer. It will also tell you if you have an issue with the Java version that is installed on your computer. Press the red verify Java version button on the browser.
At this point, you want to give permissions to the browser so the Java application could run on your browser. There will usually be a bar at the top of your browser asking for application permission. If you are like me, you will press on the option that says, “Always run on this site”. Next, you will see a Java pop-up window asking if you want to run the application.
You want to click the Run button. Now you should see a message on your browser that says “Congratulation! You have the recommend Java Installed.” At this point, you can close the browser window. Now let us set the JDK.
The Java Development Kit
The next application to install is the Java Development Kit or JDK. At the time this article was written the latest Java version is 7.25. Right click on the application and select “Run as Administrator.” When the computer asks if the application could makes changes to your computer then click the yes button.
After you click “Yes”, you will see the JDK Setup window. At the setup window, you want to click the next button. In the next window, you want to click on the Next button. Now you will see the progress window.
When the progress bar reaches all the way to the right, you will get another window asking if you want to change the location of the files. Here you want to click on the Next button. Next, you will get another progress window. When the progress bar reaches all the way to the right you will get the message that the application was installed successfully. Here you want to click close.
Let us set the development folder.
The Java Development Folder
Since we will be using the Command Prompt for compiling Java applications, we want to minimize the writing to make it easier for us to compiler. Therefore, you want to create a java folder in the C drive. Once you are done then the path will look like this C:\java. After this is done we want to set up windows to use the javac.exe application found at C:\Program Files\Java\jdk1.7.0_25\bin but inside the newly created C:/java folder.
For this, we will need to edit the windows path. To set the new path open windows explorer, right click on computer, and select system properties. In the system properties, select the advance system setting. In the system properties, windows select the Environment Variables in the Advance tab.
You will see the Environment Variable window. Here make sure NOT TO DELETE ANYTHING. You will see system variables section at the bottom of the window. In here, you want to scroll down until you see the Variable named “Path”.
Click Path then click on Edit. Go all the way to the far right end of the line and place a “;” then type C:\Program Files\Java\jdk1.7.0_25\bin and click the okay button. Click the okay button two more times. If you have, more windows open you want to close them at this time. Now let us create your very first Java application.
The Hello World
Now let us try to write a Java application to make sure that the computer is now able to compile without an IDE. You could open the notepad application that came with your Windows machine but I prefer Notepad++, which could be downloaded from http://notepad-plus-plus.org/. As a programmer, you could really enjoy this application because you could use it for any programming language you may be working on. In Notepad you want to copy and paste this code:
public class HelloWorld{ public static void main (String[] args){ System.out.println("\n\n\n\nHello World!"); System.out.println(" "); System.out.println("\nYou can compile without an IDE!" + "\n\n\n\n\n"); } }
Then you want to save this to the c:\java folder under the name HelloWorld.java. Now open the Command Prompt and type:
cd c:\java
–to open the folder.
Next type:
javac HelloWorld.java
–to compile the application.
Finally type:
java HelloWorld
–to run the application.
You now should be looking at the following text on your Command Prompt window:
Hello World!You can compile without an IDE!
You just programmed you very first Java application. Happy coding.