|
|
 |
Java 2 Standard Edition (J2SE) |
|
Here I will give steps for downloading java, compile and execute a code assuming Windows® platform is used. For a Linux distribution download appropriate files, almost the other things are the same as Windows®.
- Download the Java Development Kit (JDK): First go to the Sun's homepage for java. Go to the J2SE (Core/Desktop), then click on the latest version (e.g J2SE 1.5.0) and click on downloads on left panel then download JDK and if you like netBeans (see below) Windows® platform.
- Install JDK: execute the file you have downloaded with administrative privileges and install it to the default location.
- Compile: Java source codes comes with *.java extensions. Java compiler is a file named "javac.exe" in "bin" folder of directory hierarchy of where you have installed java. Execute it in command prompt ("cmd") with your source code filename as parameter to produce compiled code. For example to compile "test.java" :
D:\Behdad's Documents\ACM\Practice>"C:\Program Files\Java\jdk1.5.0_01\bin\javac.exe" test.java
- Execute: Java compiled files comes with *.class extensions. Java executer (interpreter, virtual machine) is "java.exe" in "bin" subfolder of where you installed java. Run it in command prompt ("cmd") with the classname of compiled code as parameter. For example to execute "test.class" :
D:\Behdad's Documents\ACM\Practice>"C:\Program Files\Java\jdk1.5.0_01\bin\java.exe" -classpath "D:\Behdad's Documents\ACM\Practice" test
 |
|
|
IntelliJ IDEA is an environment for developing java applications like JBuilder from Borland®, NetBeans from Sun, WebSphere from IBM and Java Studio from Sun. This environment is a modern, flexible, complete, structured and user-friendly one which could help programmers a lot with its rich features. I list two most bright ones: three complete code modes and live templates. It is a complete IDE (smart editor, compiler, debugger) and also could be used in enterprise and large projects like J2EE and Enterprise JavaBeans (EJB).
For those who are not familiar with java but wants to use it for acm programming, I've created a template that would free the programmer from some (-boring) io required in almost every acm problem. Download it from here (template.java) then please READ the help section.
|
|
|