Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 6 of 6

Thread: Running a external exe in Mac OS

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Running a external exe in Mac OS

    In a mac os, when I try to run an external exe by the process builder I get the next exception:

    ava.io.IOException: Cannot run program "installation/osx/program": error=13, Permission denied
    at java.lang.ProcessBuilder.start(ProcessBuilder.java :460)
    at java.lang.Runtime.exec(Runtime.java:593)
    at java.lang.Runtime.exec(Runtime.java:431)
    at java.lang.Runtime.exec(Runtime.java:328)

    In windows I dont this issue, the process is well instantiated. I could I do?

    Thanks in advance.


  2. #2
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Running a external exe in Mac OS

    You can't run .exe on Mac OS can you?!?!?
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

  3. #3
    Junior Member
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Running a external exe in Mac OS

    I am executing the correct binaries accordingly the operative system.

  4. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Running a external exe in Mac OS

    Can you run the app on the command line? I've seen this error when the app has incorrect permission.

  5. #5
    Junior Member
    Join Date
    Nov 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Running a external exe in Mac OS

    In fact, I canīt run it in the command line.... This seems not to be a java problem. Do you know how to configure these permissions in mac?? (I am not personally using this OS..)

    Thanks for your help.

  6. #6
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: Running a external exe in Mac OS

    chmod, 755 allows it to be read and executable by everyone. You can also do a 'ls -al' to check if it currently has executable permissions.

Similar Threads

  1. Problem running .jar in Windows 7
    By SpiceProgrammer in forum Java Theory & Questions
    Replies: 3
    Last Post: December 21st, 2011, 01:28 AM
  2. Interaction with external application
    By righi in forum What's Wrong With My Code?
    Replies: 8
    Last Post: October 2nd, 2010, 08:37 AM
  3. Runtime Error running in UVA
    By mathfxr in forum What's Wrong With My Code?
    Replies: 1
    Last Post: September 17th, 2010, 02:06 PM
  4. **Help!** Capturing external circuit data to GUI Jpanel
    By ROTNEVNI in forum AWT / Java Swing
    Replies: 2
    Last Post: November 27th, 2009, 09:40 AM
  5. Replies: 1
    Last Post: March 3rd, 2009, 08:04 AM