Running JAVA on Linux

Note in this series of instructions, you are told to recompile the kernel. This step may not be necessary on your system. If desired, you may skip recompiling the kernel, then if it does not work, recompile your kernel.

  1. Copy the file "jdk1.2pre-v2.tar.bz2" from blackdown.org to "/usr/local".
  2. Bunzip2 kv jdk1.2pre-v2.tar.bz2
  3. Type "tar xvf jdk1.2pre-v2.tar". This will install the file to "/usr/local/jdk1.2". Rename it to /usr/local/java by typing "mv jdk1.2 java".
  4. Get ready to re-compile the kernel. In "/usr/src/linux/fs/binfmt_java.c" modify "_PATH_JAVA" from "/usr/bin/java" to "/usr/local/java/bin/java" and the PATHAPPLET line to "/usr/local/java/bin/appletviewer"
  5. Start kernel compilation by typing "cd /usr/src/linux" and "make config" and go through the configuration setup. Use the file in documentation for a guide. See the section in "The Linux Users Guide" on "Recompiling the Kernel".
  6. Install the new kernel, and re-run lilo to set it up for use.
  7. edit "/etc/profile, adding the path "/usr/local/java/bin" to the path statement.
  8. Rename /usr/bin/java and /usr/binappletviewer to *.bak so they aren't run since they are in the path before the correct java path.
  9. To run java type "java cp ChatServer.jar ChatServer".