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 3 of 3

Thread: Under Windows OS, how to call *.EXE produced in Linux OS?

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

    Default Under Windows OS, how to call *.EXE produced in Linux OS?

    Hey,

    My colleague likes Linux very much and he produced one EXE file under Linux. I tried to call it from Windowns OS, which is my favorite OS, but it did not work!
    I used some methods like Runtime.getRuntime().exec:
    Execute an external program - Real's Java How-to

    Does anyone have some experience how to make it work? I will appreciate it a lot!
    Best wishes.
    Tony


  2. #2
    Super Moderator helloworld922's Avatar
    Join Date
    Jun 2009
    Posts
    2,896
    Thanks
    23
    Thanked 619 Times in 561 Posts
    Blog Entries
    18

    Default Re: Under Windows OS, how to call *.EXE produced in Linux OS?

    The simple answer is you can't. The kernel and available libraries simply aren't there to allow you to call an executable program between different OS's.

    The simplest method for you to run the program under a different OS is to get the source code and "port" the program to run under your OS and recompiling. Note that this method will probably involve re-writing sections of code. You might be able to get around having to re-writing sections of code that involve certain libraries if you can find a port of those libraries for your OS (no guarantees, though).

    and fyi, .exe files are specific to the Windows OS Linux doesn't give them any extensions and simply marks the program as executable.

  3. #3
    Member Darryl.Burke's Avatar
    Join Date
    Mar 2010
    Location
    Madgaon, Goa, India
    Posts
    491
    Thanks
    8
    Thanked 47 Times in 45 Posts

    Default Re: Under Windows OS, how to call *.EXE produced in Linux OS?

    Multiple cross poster.
    Under Windows OS, how to call *.EXE produced in Linux OS? - Java Forums
    Java Programming - In windows JRE environment, how to call *.exe produced in Linux?

    db

Similar Threads

  1. Executing Linux Commands with Java GUI
    By linuxrockers in forum AWT / Java Swing
    Replies: 2
    Last Post: February 15th, 2010, 09:57 PM
  2. Overlapping windows? in a Jframe?
    By chronoz13 in forum AWT / Java Swing
    Replies: 6
    Last Post: November 21st, 2009, 11:01 AM
  3. getting files in the linux server
    By Truffy in forum Java Networking
    Replies: 36
    Last Post: June 22nd, 2009, 06:32 PM
  4. Replies: 1
    Last Post: March 11th, 2009, 04:41 PM
  5. FileNotFound error while working with XML files in windows
    By ochieng in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: November 14th, 2008, 06:56 AM