Results 1 to 2 of 2
Thread: How to run this bat file in Mac?
- 11-03-2010, 03:40 AM #1Member
- Join Date
- Nov 2010
- Rep Power
How to run this bat file in Mac?
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.
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/log4j.properties -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
- 11-03-2010, 04:08 AM #2Moderator
- 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
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.)
- By maheshsardar in forum Java AppletsReplies: 1Last Post: 08-04-2010, 03:24 PM
- By msegmx in forum Advanced JavaReplies: 0Last Post: 07-15-2010, 01:23 PM
- By al_Marshy_1981 in forum NetworkingReplies: 8Last Post: 02-18-2010, 01:54 PM
- By mahendra.athneria in forum New To JavaReplies: 0Last Post: 02-11-2009, 10:53 AM
- By padmajap13 in forum Advanced JavaReplies: 7Last Post: 05-23-2008, 03:46 AM