Results 1 to 5 of 5
  1. #1
    Cazrin is offline Member
    Join Date
    Dec 2007
    Posts
    16
    Rep Power
    0

    Default Jar Files on Vista

    Does anyone else have an issue with being able to just run (double-click) jar files on Windows Vista? For some reason it just won't work for me, I keep getting Main-Class not found errors etc. Although I'm not sure whether this is a 1.6.0 issue or a Vista issue, as I compiled the same program with the same Manifest file on version 1.5, and it runs fine on the computers at work (they haven't upgraded yet).

    Just wondering if anyone could shed some light on this for me, cheers.

  2. #2
    roots's Avatar
    roots is offline Moderator
    Join Date
    Jan 2008
    Location
    Dallas
    Posts
    293
    Rep Power
    7

    Default

    Try searching if you could pass -jar argument to java.exe along with %1. Either through registry hack or some other method. It is definitely vista's problem
    dont worry newbie, we got you covered.

  3. #3
    Cazrin is offline Member
    Join Date
    Dec 2007
    Posts
    16
    Rep Power
    0

    Default

    Thought as much. I've just been creating batch files for each jar I've been wanting to run. Not the most ideal method but I guess it'll do for the time being.

    The reason I wanted to know was just incase it was a problem with just my setup or if it was all vista installations. Students are mainly going to be using the program I've written, and no doubt they all got laptops (with vista installed) for christmas, and it sounds like it isn't going to run without this batch file :(

  4. #4
    rpwtdj's Avatar
    rpwtdj is offline Member
    Join Date
    Dec 2007
    Posts
    15
    Rep Power
    0

    Default

    You need to associate the .jar files with the javaw.exe.
    Such as you associate the .jpg files with ACDSee.
    When next time you double-click the jar file, Vista will use javaw.exe to open the file, and your app will be launched!

  5. #5
    Cazrin is offline Member
    Join Date
    Dec 2007
    Posts
    16
    Rep Power
    0

    Default

    Nope won't work. Generates "Could not find the Main Class" whereas if I use the batch file it works fine.

Similar Threads

  1. Writing to files within jar files
    By erhart in forum Advanced Java
    Replies: 0
    Last Post: 02-04-2008, 02:50 AM
  2. Text and image files within jar files
    By erhart in forum Advanced Java
    Replies: 8
    Last Post: 01-19-2008, 04:43 AM
  3. how to convert mpeg files to .wav files
    By christina in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 04:14 AM
  4. convert xls files into pdf files
    By bbq in forum New To Java
    Replies: 3
    Last Post: 07-20-2007, 03:56 AM
  5. War Files
    By thauber in forum New To Java
    Replies: 0
    Last Post: 07-16-2007, 06:57 PM

Posting Permissions

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