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.

My question may seem odd but this is indeed what I need to do. For the first in the last (maybe) 10 years I have to run a JAR file in my computer. But I don't want to install 'the Java' (and all those things it adds into your system). How can I run that JAR file?

share|improve this question
1  
1. Too broad. Differs for each application. 2. That's asking for a recommendation, which is off-topic. –  deleteme Apr 23 at 15:07
    
You can manually uncheck the box every time you install or update. Alternatively, you can disable it using the registry. –  deleteme Apr 23 at 15:10
    
This depends on each individual application. –  deleteme Apr 23 at 15:11
2  
We don't solve questions by putting "solved" in the title. You should wait for @nixda to post his answer. –  slhck Apr 23 at 16:08
2  
Even if your question was actually an XY problem: the above is not a duplicate of the one you voted for. What are you trying to achieve with your edits of the title and that close vote? Given your reputation on SO I guess you know, but please remember that all Stack Exchange sites try to be a useful resource for future visitors. –  Arjan Apr 23 at 21:20

3 Answers 3

up vote 6 down vote accepted

You have two options


  1. Use jPortable together with jPortable Launcher

    jPortable Launcher allows you to easily run Java JARs from your PortableApps.com-enabled device with the jPortable portable Java Runtime Environment installed.

    (or)

  2. Copy the whole Java folder from another PC where Java is installed over to your PC and start your .JAR program through commmand line with:

    start C:\Java\bin\javaw.exe -jar C:\myfolder\myprogram.jar

share|improve this answer
    
2 is not ok because it implies to install (now or in the past) Java on the 'another PC'. But 1 works. –  Altar Apr 24 at 9:22
1  
If you are concerned or have no access to a second machine, you could always install Java in a VM, backup the Java folder and uninstall Java again. I'm using the secondf approach for almost every Java program I'd like to run –  nixda Apr 24 at 10:00

I remember that severel years ago you could download Java, unzip it, put it somewhere in a folder, and by pointing to the java executable in that folder you could run java. I don't know how it works today with the current versions, but I wouldn't be surprised if it still could work like that. Don't have Windows here, so can't test it, but you can download a zip (or tar.gz) file, unzip that and than work from there. If you can't unzip gz files, download and install 7-zip.

This won't install it like you normally do, so no update alerts etc, no browser integration, no system variables, but you need something to run that code, and this is the least I think.

http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html

Download one of the tar.gz versions.

share|improve this answer

The best way is that convert your .jar file into .exe . follow this : JAR2EXE

share|improve this answer
2  
This looks like it requires Java. –  slhck Apr 23 at 16:09
1  
Indeed this needs Java installed. See the system requirements at the right side –  nixda Apr 23 at 21:44

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.