Running SDK from a USB key?

G

gordon.is.a.moron

Hello, the kinds folks that replied to my Book Recommendations thread
probably
know what I'm up to here. I was just wondering whether you can run the
J2SE SDK
straight from a USB key without molesting the host machine. This is
because I'm
pondering using it (and if possible a C++ equivalent) in a net cafe.
Totally impractical,
I know, but I'm curious as to if it would work. I suspect that
installation would require
some registry gubbins being installed on the host (Windows) machine?

Gordy
 
L

Luc The Perverse

Hello, the kinds folks that replied to my Book Recommendations thread
probably
know what I'm up to here. I was just wondering whether you can run the
J2SE SDK
straight from a USB key without molesting the host machine. This is
because I'm
pondering using it (and if possible a C++ equivalent) in a net cafe.
Totally impractical,
I know, but I'm curious as to if it would work. I suspect that
installation would require
some registry gubbins being installed on the host (Windows) machine?

Gordy

I don't know about running the JDK from a key . . but it is easy enough to
run Putty from a USB key ;)

Have you considered setting up a remote server (Linux) and just working
remotely?
 
T

Tom Hawtin

Luc said:
I don't know about running the JDK from a key . . but it is easy enough to
run Putty from a USB key ;)

Putty is designed to be easily used from an internet cafe.

I don't see any reason why the JDK shouldn't work from a flash drive. It
wouldn't have file associations, paths or be installed into the browser,
but it should just run. I switch between various JDKs on Linux simply by
specifying the path to the binary I want to run each time.

Tom Hawtin
 
L

Luc The Perverse

Tom Hawtin said:
Putty is designed to be easily used from an internet cafe.

I don't see any reason why the JDK shouldn't work from a flash drive. It
wouldn't have file associations, paths or be installed into the browser,
but it should just run. I switch between various JDKs on Linux simply by
specifying the path to the binary I want to run each time.

Tom Hawtin

If you were running on a Windows machine I would suggest making a batch file
to setup your paths - and just use %1 for the drive letter - so you can
specify it while calling the batch file.
 
L

Lew

Luc said:
If you were running on a Windows machine I would suggest making a batch file
to setup your paths - and just use %1 for the drive letter - so you can
specify it while calling the batch file.

Some Linucex, like Fedora, use the alternatives mechanism. Another alternative
is to use a symlink or mountpoint (UNIX) or drive mapping (MS) to peg the
JAVA_HOME directory to the USB - e.g.,
export JAVA_HOME=/media/EXTUSB/java/
or
set JAVA_HOME=U:/java/
, respectively.

These will, of coure, fubar if the USB drive is disconnected, but that
shouldn't be a real problem.

-- Lew
 
T

Thomas Schodt

... I was just wondering whether you can run the J2SE SDK
straight from a USB key

I'm curious; why don't you just try it?

Or, if you did try it, and you encountered problems - why do you not
mention this? And possibly even describe what you tried and what
problems you encountered.
 
G

gordon.is.a.moron

I don't know about running the JDK from a key . . but it is easy enough to
run Putty from a USB key ;)

Have you considered setting up a remote server (Linux) and just working
remotely?

I can't set up a remote server. Although you've just given me an idea,
I could in theory use my PC that is about 10k miles away as a server,
but I'm not convinced that would be too practical. Worth pondering
though.

Thanks,

Gordy
 
G

gordon.is.a.moron

If you were running on a Windows machine I would suggest making a batch file
to setup your paths - and just use %1 for the drive letter - so you can
specify it while calling the batch file.


Good idea. Looks like it would work then, which is good.

Gordy
 
G

gordon.is.a.moron

I'm curious; why don't you just try it?

Or, if you did try it, and you encountered problems - why do you not
mention this? And possibly even describe what you tried and what
problems you encountered.



Good question, really. I don't have a lot of time, is the main reason.
So I wanted to know the likelihood of it working before spending ages
mucking about only to find it was never likely to work.

I forgot to mention the machines run on Windows (it being a netcafe
and all).

Good point, though. Maybe I'm just lazy? ;)

Gordy
 
T

Thomas Kellerer

Hello, the kinds folks that replied to my Book Recommendations thread
probably
know what I'm up to here. I was just wondering whether you can run the
J2SE SDK
straight from a USB key without molesting the host machine. This is
because I'm
pondering using it (and if possible a C++ equivalent) in a net cafe.
Totally impractical,
I know, but I'm curious as to if it would work. I suspect that
installation would require
some registry gubbins being installed on the host (Windows) machine?

Yes. It's possible. Simply copy the installed JDK from another machine.

The big question is: what do you understand with "running the JDK"?

You can certainly run a Java based application without "installing" the JDK
e.g.: e:\jdk\bin\java -jar MyApp.jar, assuming your USB Stick is e:\

You can also compile a .java file using e:\jdk\bin\javac MyClass.java

Only the browser plugin for running applets require a proper JDK installation.
If you need to run Ant, make sure JAVA_HOME is defined to point to your USB stick.

Setup of environment variables for your IDE depend on your IDE. NetBeans will
run happily if you give it the path to the JDK on the commandline (--jdkhome) or
through netbeans.conf


Thomas
 
G

gordon.is.a.moron

(e-mail address removed) wrote on 11.03.2007 23:52:


Yes. It's possible. Simply copy the installed JDK from another machine.

The big question is: what do you understand with "running the JDK"?

You can certainly run a Java based application without "installing" the JDK
e.g.: e:\jdk\bin\java -jar MyApp.jar, assuming yourUSBStick is e:\

You can also compile a .java file using e:\jdk\bin\javac MyClass.java

Only the browser plugin for running applets require a proper JDK installation.
If you need to run Ant, make sure JAVA_HOME is defined to point to yourUSBstick.

Setup of environment variables for your IDE depend on your IDE. NetBeans will
run happily if you give it the path to the JDK on the commandline (--jdkhome) or
through netbeans.conf

Thomas

By running the JDK (I should have said using, really) I mean having
the compiler
as well as just the JRE, since I want to write and compile on the USB
key. Not
having applet/browser support would be fine though, since I'm not to
worried about
applets at the moment (is anyone?).

As for using putty, probably not a good idea since the network
connection here
is horribly slow and the practicalities of running from my home PC
with the
time difference/distance etc. isn't really very sensible.

Thanks everyone, though. Looks like it's do-able for what I want,
anyway.

Gordy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top