Make your own free website on Tripod.com

Setting up Java environment in your computer

First, go to the following website to download jsdk package (about 30M):

   http://java.sun.com/j2se/1.3/

Choose the one large bundle option (downloading all software in one single .exe file). Double click it to run installation. Use all default settings.

Second, go to the following website to download and install the j2sdkee package (about 11M) with the same method:

   http://www.java.sun.com/j2ee/j2sdkee/

Third, set up your own directory (could be any, e.g. c:\java or c:\myjava) to place your own Java programs.

Fouth, save the following lines into file "jpath.bat" in your c:\ root. Edit the file to change the "c:\jdk1.3" and "c:\j2ee" to whatever is really in your computer, and change "c\000Frank" to your own java directory.

   cd c:\000Frank
   set PATH=C:\JDK1.3\bin;C:\JDK1.3;
   set CLASSPATH=.;C:\J2EE\lib\j2ee.jar;c:\jdk1.3;c:\000Frank;

Now suppose your own java directory is "c:\java", your jdk is installed in directory "c:\jdk1.3.1" and j2sdkee is installed in "c:\j2sdkee", then the changed jpath.bat should be:

   cd c:\java
   set PATH=C:\JDK1.3.1\bin;C:\JDK1.3.1;
   set CLASSPATH=.;C:\j2sdkee\lib\j2ee.jar;c:\jdk1.3.1;c:\java;

Finally, go to the following website to download and install Textpad:

   http://www.textpad.com

After all these, your computer is ready to run.

To write a java code, open Textpad, write a simple code such as

   public class Test {
      public static void main(String [ ] args)
      {
         System.out.println("Hello the world!");
      }
   }

and save it as "Test.java" in your own java directory (c:\java). Then open a DOS window, at c:\, type in "jpath" and return. What it does is to point the "path" and "classpath" environment variable to your java software. Then the present directory should be your java directory. Then type in "javac Test.java" to compile the program. Then type in "java Test" to run it. You should be able to see "Hello the world!".

There may be lots of things you don't understand in this process, but this setting up process can save you many days of effort (I spent more than a week asking everywhere to figure out this process). You will understand what it mean as your study progresses. For a quick answer, go to my java tutorial website

   http://programmingtutorial.tripod.com

section 6.1.