Results 1 to 13 of 13

Thread: .bat files help

  1. #1


    Member Since
    Mar 01, 2007
    Posts
    53
    .bat files help
    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

  2. #2

    knightlie's Avatar
    Member Since
    Mar 22, 2007
    Location
    UK
    Posts
    1,463
    Specs:
    Lenovo Z560 Hackintosh -:- '06 iMac -:- iPod Touch 2ndGen
    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.

  3. #3


    Member Since
    Mar 01, 2007
    Posts
    53
    yeah i did that...i renamed them and then what?
    i have to save them as plain text and?
    run the with terminal?

  4. #4

    cradom's Avatar
    Member Since
    Feb 14, 2004
    Location
    Groves, Texas
    Posts
    4,548
    Specs:
    21in. iMac 10.11 --- HP win 10
    Delusions are often functional. A motherís opinions about her childrenís beauty, intelligence, goodness, et cetera ad nauseam, keep her from drowning them at birth.
    -Lazarus Long

  5. #5


    Member Since
    Aug 04, 2007
    Posts
    263
    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.

  6. #6


    Member Since
    Mar 01, 2007
    Posts
    53
    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...

  7. #7

    knightlie's Avatar
    Member Since
    Mar 22, 2007
    Location
    UK
    Posts
    1,463
    Specs:
    Lenovo Z560 Hackintosh -:- '06 iMac -:- iPod Touch 2ndGen
    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.

  8. #8


    Member Since
    Mar 01, 2007
    Posts
    53
    yes i know that but is the example i wrote before,there is nothing to convert...its just directories...

  9. #9


    Member Since
    Mar 01, 2007
    Posts
    53
    anyone?

  10. #10

    knightlie's Avatar
    Member Since
    Mar 22, 2007
    Location
    UK
    Posts
    1,463
    Specs:
    Lenovo Z560 Hackintosh -:- '06 iMac -:- iPod Touch 2ndGen
    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.

  11. #11


    Member Since
    Mar 01, 2007
    Posts
    53
    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

  12. #12


    Member Since
    Oct 27, 2005
    Posts
    4,702
    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?



    #

  13. #13


    Member Since
    Mar 01, 2007
    Posts
    53
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Opening .bat files
    By Arkad in forum OS X - Operating System
    Replies: 2
    Last Post: 11-01-2012, 09:29 AM
  2. Can you run .bat files on a mac?
    By tomelk31 in forum Switcher Hangout
    Replies: 10
    Last Post: 10-16-2011, 10:50 AM
  3. MLB.com At Bat 11
    By bentharbour in forum iOS and Apps
    Replies: 1
    Last Post: 03-08-2011, 12:35 PM
  4. Opening .bat files
    By Beatles Fan in forum OS X - Operating System
    Replies: 13
    Last Post: 07-08-2010, 07:51 AM
  5. I need help off the bat with Boot Camp
    By EynaknaD in forum Running Windows (or anything else) on your Mac
    Replies: 1
    Last Post: 09-08-2007, 01:15 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
  •