tags:

views:

148

answers:

6

In my company I have many guys who want to learn Java. They don't have the admin rights to install anything. They don't even have the JRE.

Is it possible for them to compile and execute their Java programs from a PC which has the JDK and JRE?

Thanks a bunch in advance!

+2  A: 

If you have Java installed on your machine then zip that whole directory and give that to those guys. They can extract it to their machine, they don;t need admin rights for that. Thats it you are done and can use javac and java to compile and run. You can add the bin directory to your PATH then you can executes these command from anywhere.

Also you can login to a remote machine where JDK is installed and the logged in user have execute permission.

Bhushan
I will try that. Thanks.
ZiG
A: 

If they are able to log in to a PC which has the JDK and JRE installed, then they should be able to compile and run their Java programs from that PC. It shouldn't make a difference whether they're logging in remotely or locally. Java can be run remotely in much the same way that any other program can be run remotely - although exactly what that way is probably depends on what method of remote login is used (SSH, remote desktop, etc.).

David Zaslavsky
A: 

Theoretically, they could use a remote desktop solution like VNC to compile and run their programs on a different computer, but it's going to be sluggish and uncomfortable to use, probably giving them a bad impression of Java. Besides, if your company's IT policies are as paranoid as it sounds, you'll most likely never get the permission to run a VNC server.

It would be much better to lobby management to have a JDK installed on these people's PCs. Stress the value of their emplyoees acquiring new skills.

If the company is dysfunctional enough that this is not permitted, seriously consider getting a job somewhere else.

Michael Borgwardt
A: 

yes, check out Java6's The Java Compiler API. It allows you to compile code given in string and has nice error support.

01
A: 

This will be very painful for them to use going forward. Couldn't you get the JDK installed?

As described in another answer, you should be able to copy a pre-installed JDK to the local drive, just setup a batch file to setup a JAVA_HOME and add to path.

You can also copy Eclipse locally - you don't need to install it.

Fortyrunner
+2  A: 

Dude, you have an organizational problem, not a java problem. If the higer-ups don't want programmers hacking on the regular boxes, then you really shouldn't be trying to bypass the protection. Way to get in serious trouble.

Do it the right way - speak to someone with the authority to get the jdk & eclipse (or netbeans, if you insist) installed.

As a last resort - anyone who wants to learn java will have a home PC or a laptop. Just remember, if you have to use your home PC to learn java, then you owe your employer nothing by way of loyalty or obligation to use your new skills working for them.