Results 1 to 2 of 2
  1. #1
    jbroomfield is offline Member
    Join Date
    Nov 2010
    Rep Power

    Default How to run this bat file in Mac?

    Hi folks,

    I was issued a CD by Airbus (the company making aircrafts). This CD contains a program which runs in Java environment. It contains a file called eManual.bat which I am supposed to execute to activate the program. Problem is I use a Mac which doesn't run bat files. I called up Airbus for help and they just bluntly told me "we don't support Mac".

    My limited knowledge tells me that since this program runs in Java, it should be platform independent... so hence this posting for help. I will post the codes contained within the bat file, and hopefully someone here can decode the contents and advice how I should run this program in Mac.

    @echo off


    del /Q C:\Temp\FOCT\Pilot\*

    rem start application

    start /min .\jre\bin\java -Dplaf=avionics -Djava.library.path=.\\foct-bin -Djrex.gre.path=.\\foct-bin -DJREX_DEBUG=false -Djrex.dom.enable=true -Dfoct.library.path=./foct-bin -Dlog4j.configuration=./foct-conf/ -Djava.main.path=. -Xmx512m -jar foct-bin/ois-control.jar file:foct-data/ c:/temp FCOM file:foct-data/users.xml file:foct-data/ois-control-help.jar file:foct-data/ct-help.jar

    Any help will be much appreciated!



  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    New Zealand
    Rep Power


    I don't mac (but it's *nix rebadged, right?) and have never used "setlocal ENABLEDELAYEDEXPANSION" so my thoughts are worth whatever they're worth...

    @echo off - this just causes the results of the script not to be echoed to the console. It shouldn't affect program execution

    setlocal ENABLEDELAYEDEXPANSION - delayed expansion is where a variable is expanded at execution time rather than at input time (according to the online help this is important if for loops are used in the script). Such variables are surrounded by ! and, since there aren't any in this script it looks like it also does nothing in this case. "setlocal" means this behaviour is limited to this script.

    del /Q C:\Temp\FOCT\Pilot\* - del is rm and /Q means don't don't prompt when deleting a wildcard (*). So you might try

    Java Code:
    rm -f <something>/*

    where <something> is the equivalent in your file system to C:\Temp\FOCT\Pilot\. NB: It is important to get this right as the command above will delete everything in whatever folder it is pointed at.

    rem start application - this is just a comment and can be ignored

    start /min .\jre\bin\java <etc> - I'm not sure how you would mimic "start /min". Again the program should run but you do need to alter the path to the java executable to something that makes sense in your file system.


    My limited knowledge tells me that since this program runs in Java, it should be platform independent

    This is the only Java related question. And you can't bet on it. Especially the "foct.library.path" environment variable which suggests that there may be bits of Windows specific code being used. (You can confirm this by looking in the foc-bin folder for files whose names end in .dll If you find any then the program won't run.)

Similar Threads

  1. Replies: 1
    Last Post: 08-04-2010, 03:24 PM
  2. Replies: 0
    Last Post: 07-15-2010, 01:23 PM
  3. Replies: 8
    Last Post: 02-18-2010, 12:54 PM
  4. Replies: 0
    Last Post: 02-11-2009, 09:53 AM
  5. Replies: 7
    Last Post: 05-23-2008, 03:46 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