New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

.bat files help


Post Reply New Thread Subscribe

 
Thread Tools
louiscy1

 
Member Since: Mar 01, 2007
Posts: 53
louiscy1 is on a distinguished road

louiscy1 is offline
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
QUOTE Thanks
knightlie

 
knightlie's Avatar
 
Member Since: Mar 22, 2007
Location: UK
Posts: 1,463
knightlie is just really niceknightlie is just really niceknightlie is just really niceknightlie is just really nice
Mac Specs: Lenovo Z560 Hackintosh -:- '06 iMac -:- iPod Touch 2ndGen

knightlie is offline
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.

[URL="http://beadia.net"]Beadia[/URL - Jewelry Business Management Software]
I judge you when you use poor grammar.
QUOTE Thanks
louiscy1

 
Member Since: Mar 01, 2007
Posts: 53
louiscy1 is on a distinguished road

louiscy1 is offline
yeah i did that...i renamed them and then what?
i have to save them as plain text and?
run the with terminal?
QUOTE Thanks
cradom

 
cradom's Avatar
 
Member Since: Feb 14, 2004
Location: Nederland, Texas
Posts: 2,885
cradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud ofcradom has much to be proud of
Mac Specs: 21in iMac core2 Duo- 13in macbook - 10.9 on both

cradom is offline
Try here: http://linuxcommand.org/

Craig Domingue - resident redneck.
QUOTE Thanks
pjhutch

 
Member Since: Aug 04, 2007
Posts: 254
pjhutch has a little shameless behaviour in the past

pjhutch is offline
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

and so on.
QUOTE Thanks
louiscy1

 
Member Since: Mar 01, 2007
Posts: 53
louiscy1 is on a distinguished road

louiscy1 is offline
guys...well
i have this
C: \Progfile\Java\jdk1.6\bin\idlj -fall AddressBook.idl

C: \Progfile\Java\jdk1.6\bin\javac address_book_system/*.java address_book_system/address_bookPackage/*.java


AdressBook.idl is another file that i cant run btw
so can anyone explain me how to change the code?
how can i convert it to run...
QUOTE Thanks
knightlie

 
knightlie's Avatar
 
Member Since: Mar 22, 2007
Location: UK
Posts: 1,463
knightlie is just really niceknightlie is just really niceknightlie is just really niceknightlie is just really nice
Mac Specs: Lenovo Z560 Hackintosh -:- '06 iMac -:- iPod Touch 2ndGen

knightlie is offline
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.

[URL="http://beadia.net"]Beadia[/URL - Jewelry Business Management Software]
I judge you when you use poor grammar.
QUOTE Thanks
louiscy1

 
Member Since: Mar 01, 2007
Posts: 53
louiscy1 is on a distinguished road

louiscy1 is offline
yes i know that but is the example i wrote before,there is nothing to convert...its just directories...
QUOTE Thanks
louiscy1

 
Member Since: Mar 01, 2007
Posts: 53
louiscy1 is on a distinguished road

louiscy1 is offline
anyone?
QUOTE Thanks
knightlie

 
knightlie's Avatar
 
Member Since: Mar 22, 2007
Location: UK
Posts: 1,463
knightlie is just really niceknightlie is just really niceknightlie is just really niceknightlie is just really nice
Mac Specs: Lenovo Z560 Hackintosh -:- '06 iMac -:- iPod Touch 2ndGen

knightlie is offline
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.

[URL="http://beadia.net"]Beadia[/URL - Jewelry Business Management Software]
I judge you when you use poor grammar.
QUOTE Thanks
louiscy1

 
Member Since: Mar 01, 2007
Posts: 53
louiscy1 is on a distinguished road

louiscy1 is offline
i know that i have to rewrite thats why i am asking you guys.anyway this files cannont run from netbeans i have to run them manually.anw thanks
QUOTE Thanks
NanoBite

 
Member Since: Oct 27, 2005
Posts: 4,714
NanoBite is an unknown at this point

NanoBite is offline
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?



#
QUOTE Thanks
louiscy1

 
Member Since: Mar 01, 2007
Posts: 53
louiscy1 is on a distinguished road

louiscy1 is offline
C: \Progfile\Java\jdk1.6\bin\idlj -fall AddressBook.idl

C: \Progfile\Java\jdk1.6\bin\javac address_book_system/*.java address_book_system/address_bookPackage/*.javaC: \Progfile\Java\jdk1.6\bin\idlj -fall AddressBook.idl

C: \Progfile\Java\jdk1.6\bin\javac address_book_system/*.java address_book_system/address_bookPackage/*.java
QUOTE Thanks

Post Reply New Thread Subscribe


« /usr??? | Wish Software »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
help me convert something, please. krrose27 Switcher Hangout 4 05-25-2007 02:10 AM
Files Lost during Profile Move SITF OS X - Operating System 0 10-17-2006 03:54 PM

All times are GMT -4. The time now is 07:34 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?