7

I'm currently working in a controlled environment where I don't have administrator rights. I am looking for some way to install the Java Development Kit (JDK) on this machine anyway.

Is this possible? If so, how?

7
  • 7
    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, 2011 at 6:58
  • @home: Correct. See heraly.be/wiki/doku.php?id=java:setupportablejava for proof that it works. Jan 15, 2015 at 2:44
  • 2
    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, 2015 at 10:22
  • 1
    @JoeTaylor: Interesting points which I hadn't considered. Still, in some places, a software installation request can take a month or more to be fulfilled. It can make it frustrating to get work done. No wonder that more and more workers nowadays bring a personal laptop to work. Oct 8, 2015 at 17:18
  • @JoeTaylor: As for me, I share a (home) laptop with others and want to install a JDK in my account and my account only. Oct 8, 2015 at 17:31

5 Answers 5

2

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.

1
  • and for install these installer you need admin rights. It is not seems a solution.
    – user710818
    May 29, 2013 at 7:43
2

I know this is a late answer, but here goes.

Unofficial OpenJDK 7 installers

Alex Kasko maintains unofficial OpenJDK 7 installers for Windows, Linux, and Mac OS X. You can download them here.

He writes:

With default settings installers do not require administrator privileges.

Note that you can no longer get security updates for the JRE 7 unless you pay Oracle for a support contract. Even if you use OpenJDK 7, you should probably not use the JRE 7: it's rather old. You should probably always use the newest JRE instead, for security reasons.

Unofficial OpenJDK 8 builds

I don't know whether or not Alex has built any unofficial OpenJDK 8 builds or not. But GitHub user "codespotx" definitely has. Please see here.

But, a warning

Maybe you shouldn't install any of the software I've linked to, after all. Please see this link for more details.

1

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.

1
  • 1
    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 Jan 23, 2014 at 11:28
1

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%
)
4
  • 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, 2015 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). Apr 1, 2015 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, 2015 at 9:11
  • @slhck: You can use the "Save Page Now" tool in the bottom-right corner of the Wayback Machine homepage to save a copy of any webpage for posterity. Oct 8, 2015 at 23:28
0
  1. Download SEVER JRE it contains jdk. server jre 7
  2. Download server-jre-.tar.gz file for windows system.
  3. If you have 7zip tar file can be extracted by that, I used cygwin(cygwin can be installed without admin rights see this answer) to extract tar file with command tar xzvf file.tar.gz any other tar extractor will also work

Now extracted JDK folder will be created in same folder.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .