Sunday, September 6, 2009

Portable Java – Run Java from a flashdrive

Portable JDK. If your tired of installing the Java Runtime Environment on every computer you want to work on, this Portable Java tutorial is for you. It explains how to install Java on a USB Memory Stick. Enabling a user to bring Java with them. Moreover, portable programming tools such as portable netbeans can then use the portable JDK environment, eliminating the need to have JDK installed on the host machine.

Run Java from a Flashdrive – Portable JDK:

Upon completion, the user should be able to run Java from a flashdrive. The installation process does take some time, however, once completed is well worth the investment.
  1. Go to the Java Downloads Page and click the Download button next to the latest JDK Update for Windows. We used JDK 6 Update 7
  2. On the next page, under platform, select "Windows", agree to the License agreement and click Continue
  3. On the next page, download the "Windows Offline Installation" package
  4. Once the download is complete, run the file and accept the license agreement
  5. From the Custom Setup menu, install only the Development Tools and Demos and Samples and then Click Change to change the installation path:
  6. JDK Installer Custom Setup
  7. Next, enter the destination for the Portable JDK install. For Example F:/JDK/, then click Ok to continue:
  8. JDK Flash Drive Destination
  9. Now, click Next and the installer will install Java to your USB flash drive:
  10. Install JDK to flash drive
  11. Next, download this js.bat file and save it to the root of your USB flash drive
  12. To test that Java is now running from your flash drive, do the following:
    • Double click the js.bat file from your flash drive
    • Now simply type javac (to get a list of compiler options)

No comments:

Post a Comment