• (2 Pages)
  • +
  • 1
  • 2

Putting Java on Your Flash Drive Bring Java Anywhere! Rate Topic: -----

#1 iNaStY v3  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 63
  • Joined: 03-February 08

Posted 05 February 2008 - 02:43 PM

Tired of installing the Java Runtime Environment on every computer you want to work on? Below is a tutorial showing how to install Java on a USB Memory Stick!

***System Requirements***
You will need a solid state USB disk drive with at least 200 MB capacity

***Step-By-Step How-To***
Before starting the steps below, plug in your USB drive and determine which drive letter it gets.

1. Start by opening your browser (which better be Firefox ;) ) and go to Sun Microsystems and in the upper left hand corner of the screen, point your mouse to 'Java' and select (click) on 'Download the Latest JDK'

2. You will be redirected to a Java SE Downloads page, and we're interested in the first option (currently JDK 6 Update 4). Select the 'DOWNLOAD' link next to the name

3. Select the appropriate platform (should be Windows) and check the box agreeing to the License agreement

4. You will then be prompted to select the files you wish to download (I recommend the Offline Installation so you download the complete installation file and the rest of the installation process will go quicker. The other options download additional files during the installation process)

5. Download the file, saving it where you want (Desktop will do fine) and when finished, run the setup file.

6. After the installation initializes, select 'Run' and accept the License Agreement

8. Next you will be prompted to select the Directories you want to save the install files (again, the Desktop will be fine for now) then select 'OK' at the bottom of the window. At the next screen you're taken to, Click the 'Start' Button

9. After that completes (about 10 minutes or so) accept the THIRD License Agreement

NOW PAY ATTENTION AND READ 10 AND 11 BEFORE CONTINUING

10. You will be taken to a 'Custom Setup' screen, allowing you to select the program features you want installed. Technically, the only one you actually need is the first option, 'Development Tools'. The other items listed below aren't needed and you can install them if you want.

11. Now, in that SAME WINDOW in the bottom right hand corner you'll see 'Change...' Select that and change the destination folder to your USB drive, and \jdk6 (or whatever you want to name the folder, I called it \Java)
IF YOU DON'T DO THIS JAVA WON'T INSTALL ON YOUR USB

12. When done, click 'Next' and let it install! (this will take some time)

***Set Up Your USB***
1. Open a DOS command window (either START -> Programs -> Accessories -> CommandPrompt or just START -> Run -> cmd)

2. In cmd, type k: and press enter (replace k: with the letter for your USB drive)

3.Type notepad.js.bat and press enter. A notepad window will appear. Click 'Yes' to create a new file

4. Type the following line into the notepad window:
set Path=\jdk6\bin;%Path%


replacing \jdk6 to whatever you named the folder in Step 11 above

5. Save the file and exit notepad

6. In the DOS window, type js and press enter (js is for java startup)

7. To see if the installation went ok, type javac . You should get a list of compiler options.

***THE INSTALLATION IS NOW COMPLETE!***

Please let me know if anyone has problems with this :D

Is This A Good Question/Topic? 4
  • +

Replies To: Putting Java on Your Flash Drive

#2 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1868
  • View blog
  • Posts: 20,280
  • Joined: 17-March 01

Posted 05 February 2008 - 02:47 PM

Nice tute and a great idea. I HATE downloading JRE everytime I get on a new box.


Vote for this tutorial on DZone if you found it useful: http://www.dzone.com...humb_drive.html
Was This Post Helpful? 1
  • +
  • -

#3 iNaStY v3  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 63
  • Joined: 03-February 08

Posted 05 February 2008 - 02:52 PM

View Postskyhawk133, on 5 Feb, 2008 - 02:47 PM, said:

Nice tute and a great idea. I HATE downloading JRE everytime I get on a new box.


Vote for this tutorial on DZone if you found it useful: http://www.dzone.com...humb_drive.html



thanks skyhawk! I was surprised not to find a tut like this on here already. I'm not sure if it work for other runtime enviornments, but I don't see why not. Plus, since you can buy a good 4 GB flash drive now for like $40 a couple hundred megs ain't no thang lol
Was This Post Helpful? 0
  • +
  • -

#4 skyhawk133  Icon User is offline

  • Head DIC Head
  • member icon

Reputation: 1868
  • View blog
  • Posts: 20,280
  • Joined: 17-March 01

Posted 05 February 2008 - 02:53 PM

And, for submitting this tutorial, you've automatically been entered to win one of the DIC 1GB thumb drives... so they could be free ;)
Was This Post Helpful? 0
  • +
  • -

#5 iNaStY v3  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 63
  • Joined: 03-February 08

Posted 05 February 2008 - 03:03 PM

O baby! lol that sounds like a pretty sweet deal. I'll keep making more tuts as I learn more and more. The Tut and Code Snip part of this site is pretty amazing and extremely helpful
Was This Post Helpful? 0
  • +
  • -

#6 shrestha  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 08-February 08

Posted 08 February 2008 - 08:18 AM

Take a look at http://www.javalobby...cles/tomcat2go/ where you can put Tomcat AND JRE into a thumbdrive and run your application from it.
Was This Post Helpful? 0
  • +
  • -

#7 bhandari  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 9
  • View blog
  • Posts: 754
  • Joined: 31-January 08

Posted 08 February 2008 - 11:33 PM

Great tutorial. Easy to follow.
10/10 :bigsmile: :bigsmile: :bigsmile:
Was This Post Helpful? 1
  • +
  • -

#8 austin101385  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 24-March 08

Posted 24 March 2008 - 01:42 PM

I have a 250GB Western Digital External Hard Drive I'm trying to perform this with. I am on my Dell Inspiron E1505 trying to use the cmd prompt and when I type in "F:" and press [enter], and then "notepad.js.bat" and [enter] I get a message that says 'notepad.js.bat' is not recognized as an internal or external command, operable program or batch file.

Any idea what this means? Thanks
Was This Post Helpful? 0
  • +
  • -

#9 Zalea  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 08-September 08

Posted 08 September 2008 - 10:56 AM

View Postaustin101385, on 24 Mar, 2008 - 01:42 PM, said:

I have a 250GB Western Digital External Hard Drive I'm trying to perform this with. I am on my Dell Inspiron E1505 trying to use the cmd prompt and when I type in "F:" and press [enter], and then "notepad.js.bat" and [enter] I get a message that says 'notepad.js.bat' is not recognized as an internal or external command, operable program or batch file.

Any idea what this means? Thanks


I found this tutorial, as well, and ran into the same problem. Step 3 says "Type notepad.js.bat and press enter. A notepad window will appear. Click 'Yes' to create a new file" and that will work, but it should be notepad js.bat with a space instead of a "." Hope this helps anyone else who had problems.
Was This Post Helpful? 0
  • +
  • -

#10 Unknown Hero  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 17
  • View blog
  • Posts: 51
  • Joined: 04-September 07

Posted 28 September 2008 - 07:50 AM

This will make portable java only for Windows and not for all Windows OS-es... :/
Was This Post Helpful? 1
  • +
  • -

#11 aashu.dwivedi  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 21-April 09

Posted 22 April 2009 - 09:50 AM

it would be nice if you added a shell scrip to change path for linux guys too .
Was This Post Helpful? 0
  • +
  • -

#12 yogesh.kulkarni123  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 08-July 09

Posted 08 July 2009 - 05:26 AM

View Postaustin101385, on 24 Mar, 2008 - 12:42 PM, said:

I have a 250GB Western Digital External Hard Drive I'm trying to perform this with. I am on my Dell Inspiron E1505 trying to use the cmd prompt and when I type in "F:" and press [enter], and then "notepad.js.bat" and [enter] I get a message that says 'notepad.js.bat' is not recognized as an internal or external command, operable program or batch file.

Any idea what this means? Thanks


Just run "notepad js.bat" insted of "notepad.js.bat"
Was This Post Helpful? 0
  • +
  • -

#13 Guest_tnx*


Reputation:

Posted 19 February 2010 - 03:56 PM

If someone have problems with accessing Command Prompt(etc admins disabled it) try this:
run commmand(or path is, for example, C:\WINDOWS\SYSTEM32)
If you execute js.bat, "command" won't work as "command prompt".
You need to manual specify path for each "javac" execution (e.g. i:\jdk6\bin\javac TestClass.java)
Then you can run your compiled class by typing "java TestClass" from the current working directory.
These are limitations only of "command", not "command prompt"
Again, thanks for this good tut ;)
Was This Post Helpful? 0

#14 Guest_kris john vern m. rivas*


Reputation:

Posted 25 February 2010 - 12:51 AM

nice!!!!! good job for installing the java to usv!!!!
java rockzzzz
cxx[]:::::::>
Was This Post Helpful? 0

#15 Guest_fiftylarge*


Reputation:

Posted 13 March 2010 - 11:32 AM

View Postaustin101385, on 24 March 2008 - 12:42 PM, said:

I have a 250GB Western Digital External Hard Drive I'm trying to perform this with. I am on my Dell Inspiron E1505 trying to use the cmd prompt and when I type in "F:" and press [enter], and then "notepad.js.bat" and [enter] I get a message that says 'notepad.js.bat' is not recognized as an internal or external command, operable program or batch file.

Any idea what this means? Thanks


well you need to put a space between the colon and notepad E:<space>notepad
Was This Post Helpful? 0

  • (2 Pages)
  • +
  • 1
  • 2