The machine specifications used in this task are:
Intel Pentium Core 2 Duo, 2.2 GHz,
Windows XP Pro SP2 + periodical patches + periodical updates
2 GB DDR2 RAM
160 GB SATA HDD
17” SyncMaster 713N monitor.
Pre requirement: Java JDK (required to compile and run Java programs). We already installed Java JDK in the previous tutorial.
1. Firstly, go to jgrasp.org to download a latest version of JGRASP for Windows. In this case we download Windows self-extracting exe file. If you don’t have JDK installed, you can download Windows self-extracting exe with JRE version.
2. Double click the Windows self-extracting exe file as shown below.
1. The JGRASP setup welcome page launched. Click Next.
2. Accept the License Agreement, click the I Agree.
3. Choose the JGRASP component to be installed. In this case we select a Standard install type. Click Next.
4. Choose the installation location. If you want to change the destination folder, click the Browse button and find your new installation folder. In this case we choose the given path and folder. Click Next.
5. Choose the Start menu folder for jGRASP shortcuts. We just accept the given shortcut name. Click Next.
6. Choose file associations. Which file extensions you want to associate with jGRASP. In our case we choose file extensions as shown in the following Figure. Click Install.
7. The installation of jGRASP begins.
8. The installation is complete. Click Finish.
9. The shortcuts were added to the Windows Start menu.
10. You can see the jGRASP icon on the desktop. Double click the icon.
11. The following nice splash screen launched.
12. The following is the jGRASP IDE.
13. Let open the previous simple Java code. Compile ( ) and run ( ).
public class Helloworld
// Just for fun!!! A classic Hello World program
public static void main(String args)
System.out.println("Hello bastard Java World!");
14. See the output in the Run I/O window shown in the following Figure.
15. jGRASP also can be used for other languages such as C, C++ and ADA.
16. Let try a simple Java GUI program. Create a new java file named PushCounterPanel, click File > New > Java.
17. Copy and paste the following code.
18. Then save this project to PushCounterPanel. Build this project (make sure there is no error(s)) without running it.
19. Next, create a new Java file, copy and paste the following code sample and finally save it to PushCounter. Compile and run this file. The output is a window with a button, when pushed will generate a count as shown in the following Figure. The Java GUI programming normally will use Visual type IDE such as Java Studio or NetBeans.
20. At this stage we are supposed to be able to do Java programming in more productive way. However JGRASP still lack many features though very nice and simple IDE. JGRASP also can be used for other languages development tool such as Ada, C and C++.
21. Go to jgrasp.org to download a complete JGRASP tutorial in PDF (on the left menu) or download the tutorial in zip file. Next tutorials will provide you a fast track Java programming using the plain old Java codes.