Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am currenlty working in a controlled enviroment where I dont have access to admin rights. Now, I am looking for some way to install Java on this vary machine. I have got a java installer.

Is there exist some way to achieve this?

share|improve this question

migrated from stackoverflow.com Sep 9 '11 at 7:07

This question came from our site for professional and enthusiast programmers.

6  
I don't think so. A workaround is to install the JDK on a machine you have full control of. Then copy the whole directory to the controlled machine, I've never seen a JDK that really requires any registry keys... –  home Sep 9 '11 at 6:58
    
@home: Correct. See heraly.be/wiki/doku.php?id=java:setupportablejava for proof that it works. –  unforgettableid Jan 15 at 2:44
    
Dear OP: 1. Why didn't you have admin rights? 2. Why didn't the sysadmin install the JDK for you? 3. Perhaps you could have created a VM on the machine, and installed the JDK into the VM. 4. Really, you could have used a Windows equivalent of the Unix fakeroot tool. This is a tool which lies to applications and makes them think that they are running as the local administrator when they are, in fact, not. I don't know whether or not a Windows equivalent of fakeroot exists. –  unforgettableid Jan 15 at 2:48
    
My two penneth as a sys admin. If it's a controlled environment then that's for a reason. Installing SW introduces risks and unknown incompatibility issues. Speak to your IT department, we genuinely aren't there to just say no. We want to help users the best we can. Not to mention installing SW is probably against the IT policies and could get you in hot water with your boss –  Joe Taylor Mar 31 at 10:22

3 Answers 3

You can download the JDK and extract it. You will find a tools.zip file that you need to extract in a folder under the user path. Then you have to locate all the .pack files (they are in \lib and \jre\lib folders) and unpack them in the same folders with the unpack200 command, available itself in the \jre\bin folder.

I created a script to do this that just asks you the folder where you unzipped tools.zip and then it executes all the necessary commands.

Here you can find the whole procedure and the script:

echo off
REM Author: Molinari Davis - www.davismol.net
REM Version: 0.1
REM Date: 29/08/2014

if "%1"=="/processFile" goto processFile
SET /P commandPath=Insert the jdk folder path: 
SET commandName=\jre\bin\unpack200.exe
FORFILES /p %commandPath% /s /m *.pack /c "cmd /c call "%~f0" /processFile @path"
goto :EOF
:processFile
SET outputName=%2
SET outputName=%outputName:pack=jar%
SET fullCommand=%commandPath%%commandName% %2 %outputName%
REM echo %fullCommand%
%fullCommand%
if %ERRORLEVEL% GEQ 1 (
    echo ERROR in extraction of file: %outputName%
) else (
    echo Extracted file: %outputName%
)
share|improve this answer
    
Hi Davis. Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Especially with links to your own website, we tend to flag this as spam. Please rather post the actual answer here. –  slhck Mar 31 at 12:47
    
Hi and thank you for reply, even I didn't understand downvotes. I provided the solution to the question in my reply (download the file, unzip tools.zip, locate the .pack files and unpack them with the unpack200 command). Then I added a link (yes, it's to my own blog, because I wrote a post on this topic time ago) just to provide an enhancement to the solution and to put at disposal of everybody the script to automate the process and to avoid to do everything manually. If you consider the link as spam just delete it, but the solution still remains valid (and script it's just something more). –  Davis Molinari Apr 1 at 8:46
    
I know, that's why I did not delete the post. I edited it to include the script, since we've seen lots of links go down over the course of several years. In that case, the essential solution is still available here. +1 from me, too. The "spam" rule only applies to users repeatedly posting links to their own blog instead of providing solutions on our site. It's not the case with you, so you're fine. –  slhck Apr 1 at 9:11

Maybe not so good idea, but you can try to download Processing, it is a Java covered programming language as it contains a portable version of Java JDK. You can erase everything except Java an use it.

share|improve this answer
    
I was looking for a way to install a JDK without an installer, so your suggestion looked promising. Are you sure it is a Java JDK? I don seem to be able to find javac.exe –  Peter Hofman Jan 23 '14 at 11:28

You can install it in a per-user location, and place the path to JDK in the Path environment variable. You could use a setup authoring tool like Advanced Installer or InstallShield, of free tools like WiX or NSIS.

That should make it accessible to other apps searching for the JDK tools. Not the best way, but can't see any other choice in lack of admin privileges.

share|improve this answer
    
and for install these installer you need admin rights. It is not seems a solution. –  user710818 May 29 '13 at 7:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.