Results 1 to 10 of 10
  1. #1
    Pollik is offline New Member
    Join Date
    May 2010
    Posts
    4

    Default how to open jar files in windows 7

    I have a jar file which used to work in Win XP, but doesn't in Win 7. I get a message "Could not find main class: C:\users\<file path>. Program will exit."

    I don't really understand jar files, but looking around the main solution seems to be the need for a 'manifest file'...which doesn't help me because a manifest file already exists and appears to define the main class.

    Does anyone have any ideas?

    (I did think about Win XP mode, but my Win 7 is a personal edition)

    Polly

  2. #2
    HappyAndyK's Avatar
    HappyAndyK is offline Site Administrator
    Join Date
    Jun 2008
    Posts
    6,229

    Default

    .jar files contain Java applications and you need Java Runtime Environment installed on your computer to be able to run Java applications.

    Java Downloads for All Operating Systems - Sun Microsystems

    Please try this and see if it helps.

  3. #3
    johnny.rotton's Avatar
    johnny.rotton is offline Gold Member
    Join Date
    Jan 2009
    Location
    South, UK
    Posts
    877

    Default

    Welcome to TWCF Polly, if memory serves me correct you need JDK to open jar files. You can download JDK from here Java SE Downloads - Sun Developer Network (SDN). I hope this helps. JR

  4. #4
    knightrider™'s Avatar
    knightrider™ is offline Gold Member
    Join Date
    Jul 2008
    Location
    India
    Posts
    754

    Default

    have u installed java and in environment variable have u set the path(bin ) and class path (lib folder)

  5. #5
    Pollik is offline New Member
    Join Date
    May 2010
    Posts
    4

    Default

    Thanks for all your responses

    I have installed both Java Runtime Environment (JRE) and Development Kit (JDK).

    ...and in environment variable have u set the path(bin ) and class path (lib folder)
    I didn't understand this part, I'm afraid.

  6. #6
    knightrider™'s Avatar
    knightrider™ is offline Gold Member
    Join Date
    Jul 2008
    Location
    India
    Posts
    754

    Default

    Quote Originally Posted by Pollik View Post
    Thanks for all your responses

    I have installed both Java Runtime Environment (JRE) and Development Kit (JDK).



    I didn't understand this part, I'm afraid.
    Go to Mycomputer - > right click properties - > advanced tab - >Environmental variables button

    In the 2nd box you would get a 'classpath' and 'path' name

    Set classpath to ur java lib folder(like D:\Program files\ java\jre1.6.2\lib) where is it installed and bin folder to path (D:\Program files\ java\jre1.6.2\bin)

    This allow u to use from command prompt and solves most of the issues.

  7. #7
    Pollik is offline New Member
    Join Date
    May 2010
    Posts
    4

    Default

    Well, I added path (bin) and classpath (lib) for both 32 bit (Program Files (x86)) and 64 bit (Program Files) applications.

    Sad to say, it has not made any difference and I still get the same unhelpful message.




    Polly

  8. #8
    knightrider™'s Avatar
    knightrider™ is offline Gold Member
    Join Date
    Jul 2008
    Location
    India
    Posts
    754

    Default

    normally jar files are of two types executable jars and non executable jars non executable jars will need to be run from a program so it shud have a main class in it. But i presume this is a executable one but use a jaav jdk to make it executable u can try unrar the jar file or converting the existing jar file to executable one.

    I am not a pro in java but know something

    Try runnin this from the command prompt

    java -jar name_of_jar_file.jar

  9. #9
    Pollik is offline New Member
    Join Date
    May 2010
    Posts
    4

    Default

    Yay!!!

    Thank you!!!

    It has worked. :-)))))))

  10. #10
    alevin46 is offline Beginner
    Join Date
    Aug 2010
    Location
    UK
    Posts
    24

    Default

    Hello Friends........

    If you install the Java Runtime Environment or if you already have the Java Runtime Environment then you have follow this steps to open the Jar files in Windows:-

    1) Open the Windows Explorer and click on the menu bar of Tools and the select the Folder Options.
    2) Now click on the sub-tab option File Types.
    3) Now select the Jar option from the list.
    4) Now click on Advanced button.
    5) Now select the Action button and then click on Edit button.
    6) Now click the Browse button and select the Java Interpreterjavaw.exe.

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20