Results 1 to 13 of 13
- 01-14-2013, 06:18 AM #1
Member
- Join Date
- Apr 2011
- Posts
- 52
- Rep Power
- 0
How to launch an executable .jar appication on another PC?
Hi All,
I made a .jar file in Intellij Idea 12. It works. But when I try to open it on another PC, the Winrar loads it. There are no other options. The other PC has jre7 but not jdk. What do I do to make the jar file to run on this PC? Do I need jdk? (I do not want to install jdk on the other PC if I do not have to.)
Thank you very much.
- 01-14-2013, 07:19 AM #2
Re: How to launch an executable .jar appication on another PC?
You neglected to mention the OS on the other PC, which is significant for giving proper advice.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 01-14-2013, 08:09 AM #3
Member
- Join Date
- Apr 2011
- Posts
- 52
- Rep Power
- 0
Re: How to launch an executable .jar appication on another PC?
The developing PC is Windows 7 Ultimate. The other PC is Windows 7 home premium Sony laptop.
- 01-14-2013, 10:33 AM #4
Re: How to launch an executable .jar appication on another PC?
Set the .jar file association as follows:
Right-click any executable .jar
Select Open With
Select Choose Default Program
Navigate to java/jreX/bin/
Select Javaw.exe
Click Open
Make sure "Always use the selected program to open this kind of file' is checked
Click OK
Since this is not a Java problem per se I'm moving the thread to the Forum Lobby.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 01-14-2013, 10:33 AM #5
Re: How to launch an executable .jar appication on another PC?
Moved from New to Java
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 01-14-2013, 11:23 AM #6
Member
- Join Date
- Apr 2011
- Posts
- 52
- Rep Power
- 0
Re: How to launch an executable .jar appication on another PC?
It did not work. Nothing happened. The application that opens the jar file is Java Platform SE Binary. Anyway, my goal is to use the mouse double-click to run the jar executable. Thanks.
- 01-14-2013, 11:44 AM #7
Re: How to launch an executable .jar appication on another PC?
Java Platform SE binary could be jave.exe or javaw.exe. Did you read and follow the exact steps I outlined? On which computer? The development machine or the 'other' PC?
Also check whether Winrar has a setting to recapture its file associations, and if it does than disable it.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 01-14-2013, 11:47 AM #8
Re: How to launch an executable .jar appication on another PC?
I'll add this: if you're going to write and distribute programs, in Java or any other language, you need to devote some time to learning and understanding your OS and any other on which you want your programs to run. Of course, a Java forum isn't the best place for that; there are Windows, Linux and Mac forums targeted to each of the common PC systems.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 01-14-2013, 01:02 PM #9
Member
- Join Date
- Apr 2011
- Posts
- 52
- Rep Power
- 0
Re: How to launch an executable .jar appication on another PC?
I removed jar file type from winrar so that winrar did not load the jar file. I used javaw.exe to open the jar file on the other PC. Nothing happens. Thank you for help.
- 01-14-2013, 01:17 PM #10
Re: How to launch an executable .jar appication on another PC?
Then it looks like it could be a Java problem after all. Try this, on the 'other' PC:
Launch a Command Prompt
Navigate to the folder that contains the .jar
Run the jar using java -jar xxx.jar (Note: java, not javaw.
Any errors or exceptions shown in the Command Prompt window?
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 01-14-2013, 01:51 PM #11
Member
- Join Date
- Apr 2011
- Posts
- 52
- Rep Power
- 0
Re: How to launch an executable .jar appication on another PC?
java -jar xxx.jar will run the jar application. The only error is an I/O exception. The jar file reads from an input text file and creates an output text file. But the input data is not shown inside the jar application's window and the output file is not created.
- 01-14-2013, 03:11 PM #12
Re: How to launch an executable .jar appication on another PC?
If you need help with that error, start a new thread in the New to Java section, showing relevant code. Don't forget to wrap your code in code tags to preserve formatting.
After an IOException, should it?But the input data is not shown inside the jar application's window and the output file is not created.
dbWhy do they call it rush hour when nothing moves? - Robin Williams
- 01-14-2013, 06:30 PM #13
Re: How to launch an executable .jar appication on another PC?
On my version(s) of windows (XP and 7 Home) there is a registry entry for .jar files that refers to another entry that contains command lines for executing jar files. I use the Right-click context menu for selecting which command line to use. I have several.
The problem with using the OS to associate a command with a filetype is the problem of getting the -jar option into the command line. I think I've seen an app that does that but can not remember where or what. I've used the regedit program for years and tend to use it vs another app.
The jre install should set the registry entry for .jar files. The problem is other programs can change the entry for their purposes.
I've renamed the second registry entry to a unique name so that program installs don't wipe out my list of commandlines.
When a product changes the .jar entry, I can easily change it back to refer to my list of commandlines.If you don't understand my response, don't ignore it, ask a question.
Similar Threads
-
Eclipse ME is not able to launch emulator
By jazz123 in forum EclipseReplies: 0Last Post: 03-23-2012, 09:55 PM -
create windows executable using executable jar file
By sarwar1234 in forum New To JavaReplies: 2Last Post: 02-07-2011, 08:29 PM -
Launch Jar from in application
By hardcorebadger in forum New To JavaReplies: 3Last Post: 01-25-2011, 06:03 AM -
Launch configuration
By skittle in forum EclipseReplies: 0Last Post: 02-28-2010, 11:57 PM -
Launch Error
By roughjj in forum EclipseReplies: 1Last Post: 10-30-2009, 07:59 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks