hey there guys...am currently developing a java project for uni and all the files provided to us are in a .bat (dos) extension. Anyone knows how to make the to work on a mac unix environment? something has to do with textedit i think....plz help
DOS batch files won't work in OSX/Unix, you'd have to rewrite them. They are text files so you can edit them with TextEdit, but be sure to save them as plain text, not RTF.
MAcs can run Unix commands and can be saved as a name.command file which can be run from the desktop.
Example,
PC -> MAc
echo = echo
copy = cp
ren = mv
del = rm
if = if (although conditions are different)
help = man
type = cat or more
IDL files are Interface Definiton Files for COM programming and such, so you don't need to convert them.
You need to *rewite* the .bat files - you can't just convert them like a Word document or just rename them because they contain DOS commands which Unix won't recognise. I mentioned TextEdit because DOS batch files and Unix command scripts are plain text files.
Each .bat files needs to have it's commands converted to Unix commands, as per the list pjhutch provided. Depending on what the files do this may not be a trivial task, particularly if the batch files are expecting to run in a DOS/Windows environment.
For the third time, , you can't just convert DOS batch files to UNIX, you have to rewrite them. DOS paths are completely different to UNIX, as is the location of the Java compiler. That second example you gave runs the Java compiler to compile the Address Book Java app. Your best bet is to download a Java IDE like NetBeans and compile the project in there, or leanr how the Java conmpiler works under OSX.
Because you are working with Mac OS, the DOS .bat files won't run when executed, as they are commands written in DOS and designed to run on Windows PCs.
They are basically the same a Shell-Scripts on a Mac and as such contain a string of commands .... you can open and view these commands using a Text Editor but AFAIK, ultimately you will need to write your own Shell-Scripts based on these commands if you want to run them ...
So, the next step to help you is to know what exactly are the type of commands you need to re-write?
Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.