Results 1 to 3 of 3
  1. #1
    DiamondSoul is offline Member
    Join Date
    Oct 2011
    Posts
    83
    Rep Power
    0

    Default Runnable JAR files on different platforms.

    A while ago, I made a Java program for my roommate which plays random chords and asks the user to identify them. I made a jar file of the program which can be found here. On my computer (Windows XP), one could simply double click on the jar file and the program would run immediately. On his computer (a Mac), as well as all the other Macs I've tried it on, it looks like the file opens when you double click on it, but it doesn't run the program. After some searching around on the Internet, I found that I could get the program to run on a Mac by opening the command prompt and type "java -jar [filename]", but that's kind of a pain, and I was wondering if there's a way you can get a jar file to run just by double clicking on it on a non-Windows machine.

    If it matters, my IDE is Eclipse Ganymede. Unfortunately, I don't have the source code with me at the moment.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: Runnable JAR files on different platforms.

    Isn't this less of a pure Java issue and more of an issue of setting up the Mac to react to Jar files appropriately (for instance as mentioned here)? I cannot test this out as I have no access to Mac hardware.

  3. #3
    DiamondSoul is offline Member
    Join Date
    Oct 2011
    Posts
    83
    Rep Power
    0

    Default Re: Runnable JAR files on different platforms.

    I suppose - truthfully, I wasn't quite sure where to ask this question. Thanks for that link, though both my roommate's computer and the other Macs I've tried it on already have the jar launcher set as the default application to open jar files with, and it still doesn't work. Mainly, I was just wondering if there was something I was doing wrong, either in my coding, or in my use of my IDE, that was causing the problem. Perhaps it's just that the Macs are set up in a screwy way.

Similar Threads

  1. Including image files in runnable jar
    By bleah in forum Eclipse
    Replies: 5
    Last Post: 06-18-2011, 02:54 PM
  2. Runnable jar does not include my resource files
    By owboateng in forum Eclipse
    Replies: 2
    Last Post: 05-09-2011, 02:54 PM
  3. benefits of Java/postgreSQL vs other platforms
    By chedderslam in forum Advanced Java
    Replies: 0
    Last Post: 01-28-2011, 04:11 PM
  4. Does Midlets creation is Supported on various platforms?
    By Nagasubramanian in forum CLDC and MIDP
    Replies: 0
    Last Post: 02-17-2009, 09:25 AM
  5. Login user name - for all platforms.
    By Eranga in forum Advanced Java
    Replies: 0
    Last Post: 03-17-2008, 06:45 AM

Posting Permissions

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