aspose file tools*
The moose likes Beginning Java and the fly likes usb drive Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "usb drive" Watch "usb drive" New topic
Author

usb drive

Dustin Eldridge
Greenhorn

Joined: Feb 04, 2008
Posts: 20
Is it possible to put all my files on a usb drive and compile them from there. That way I can transport files back and forth to work and home. If so how can this work?
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

What operating system are you running?


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38881
    
  23
I have tried it on Windows and Linux and never had any problems.
Austin Lee
Ranch Hand

Joined: Feb 18, 2008
Posts: 56
Yes, you can, and you can install the compiler on your ubs driver too.
Dustin Eldridge
Greenhorn

Joined: Feb 04, 2008
Posts: 20
I am using Mac OS 10 on one computer at my house. Then I would like to take the usb to work and that is a Windows XP pro machine. If all I need to do is get the java (Which ones I am not for sure javac, java etc..) files (I can find the folder they are in on my mac) and move them to the usb with my lesson files that would be great. I am guessing that it will work.
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by Dustin Eldridge:
...If all I need to do is get the java (Which ones I am not for sure javac, java etc..) files (I can find the folder they are in on my mac) and move them to the usb with my lesson files...

Your .java and .class files can move between a Mac and a Windows machine with no problem, but the applications javac and java are entirely different on these platforms. Macs come with a JDK already installed, but you cannot simply "move" these files to a Windows machine. Instead, you need to download and install a JDK for Windows (if this has not already been done). You will probably want to ensure that the JDK versions match. What version of OS X and Java are you using on the Mac?
Stephen Demaine
Greenhorn

Joined: Feb 23, 2008
Posts: 1
Another thing worth mentioning is that you will have to set your "Environment Variables --> Path" to include the location of your %USB-DRIVE%\Java\Bin directory... for example s:\JavaSDK\Bin. In windows to access this you need to right click on My Computer --> Properties --> Advanced --> Environment Variables is at the bottom. Locate "Path" under "System Variables" and add the location of your %USB-DRIVE%\Java\Bin (entries are separated by semi-colons.)

The reason for this is that when you want to compile a file the Windows operating system looks for the javac.exe compiler in any locations listed in the path.

Hope this helps.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: usb drive