File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Executing JARs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Executing JARs" Watch "Executing JARs" New topic
Author

Executing JARs

Peter Sorotokin
Ranch Hand

Joined: Jun 25, 2013
Posts: 36
    
    1

Hi
I have a Java jar file that when i click on it in Win XP , it run without any problem . Recently i installed winrar program and it associated .jar extension with itself . I know how to change this association in WinXP but i don't know what executable file of JRE should obtain this association . There are some executables in JRE and JDK and i don't know which of them should obtain this association for executing JARs . Please tell me .
Thanks
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

Associate with java.exe to get a console when you run the jar.
Associate with javaw.exe for no console (This is the default)


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

The default file association for "Open" isAdjust the directory path for your bin directory.


luck, db
There are no new questions, but there may be new answers.
Peter Sorotokin
Ranch Hand

Joined: Jun 25, 2013
Posts: 36
    
    1

Thanks
Is there another way to produce executable files in Java that could be run by one click in Windows XP ?
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10535
    
    9

One click: No*
Double click - Yes

*Even your native applications are launched via double click. Having something which launches via single click will be odd
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

Maneesh Godbole wrote:One click: No*
Double click - Yes

*Even your native applications are launched via double click. Having something which launches via single click will be odd

There's a Windows setting for that.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 4347
    
    2

i am amazed you remembered that Darryl! when i first learned windows i read that and didn't like the idea.
this might help


SCJP
Visit my download page
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4664
    
    5

I've never liked the point-to-select myself, but I had a close colleague who maintained that setting, and sometimes I had worked at his computer. It was a pain.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Executing JARs