Using a .bat on mac

Discussion in 'Mac Basics and Help' started by devonjk, Feb 13, 2010.

  1. devonjk macrumors newbie

    Joined:
    Feb 13, 2010
    #1
    okay not sure if it's the right area to post, however, i need assistance running this game on my mac osx. Textedit says this when i try and run the .bat "@echo off
    title QuarterX Client
    start http://www.quarterx.org/
    java -jar Updater.jar
    pause"

    um yeah not sure what else to post. waiting for help and will post more info as need be.
    Thanks.
     
  2. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
  3. devonjk thread starter macrumors newbie

    Joined:
    Feb 13, 2010
    #3
    i have seen people talking about this sort of thing before. like changing something to make it work.
     
  4. bootedbear macrumors 6502

    bootedbear

    Joined:
    Sep 13, 2004
    Location:
    Austin, TX
  5. Mac-Michael macrumors regular

    Joined:
    Jan 13, 2010
    #5
    If the program was written for Windows it will need a big something changed ;)

    but those two lines from the file look like valid terminal commands:
    start http://www.quarterx.org/
    java -jar Updater.jar

    If you're lucky it will be a Java application which is cross-platform.
     
  6. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #6
    Click on the link and download the client. The next line is just a java update. You probably already have that. However, I'm pretty sure the client will be a Windows program. You could use Wine to maybe run it. Or you have to use Bootcamp or a virtual machine for Windows.
     
  7. devonjk thread starter macrumors newbie

    Joined:
    Feb 13, 2010
  8. Mac-Michael macrumors regular

    Joined:
    Jan 13, 2010
    #8
  9. devonjk thread starter macrumors newbie

    Joined:
    Feb 13, 2010
  10. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #10
    Just download the client. If it ends up being updater.jar, then the poster above is right and it will be a java program and you can just type that line in Terminal to run it. You won't need Wine.
     
  11. devonjk thread starter macrumors newbie

    Joined:
    Feb 13, 2010
    #11
    "devon-kocevskis-macbook:~ devonkocevski$ java -jar Updater.jar
    Unable to access jarfile Updater.jar"
    Is what i got when i input the last line into terminal.
     
  12. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #12
    Was the client you downloaded called updater.jar? If so, you need to cd to the dowload directory in Terminal and run that line or you need to put the path to the file before updater.jar.
     
  13. devonjk thread starter macrumors newbie

    Joined:
    Feb 13, 2010
    #13
    yeah updater.jar that's it. so "cd " then... click and drag the "files" location?
     
  14. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #14
    Sorry for making that more confusing than it needed to be. Yes, click and drag it into Terminal (after deleting the updater.jar name in the line in Terminal, of course.
     
  15. devonjk thread starter macrumors newbie

    Joined:
    Feb 13, 2010
    #15
    naw thats fine any of this is confusing to me, you are helping me a great deal i appreciate so much. so right now i have this : Last login: Sun Feb 14 02:57:32 on ttys000
    devon-kocevskis-macbook:~ devonkocevski$ cd /Users/devonkocevski/Downloads/QuarterX\ 2.0\ Client/Files
    devon-kocevskis-macbook:Files devonkocevski$ java -jar Updater.jar
    Unable to access jarfile Updater.jar
    devon-kocevskis-macbook:Files devonkocevski$

    What am i doing wrong lol?
     
  16. devonjk thread starter macrumors newbie

    Joined:
    Feb 13, 2010
    #16
    naw thats fine any of this is confusing to me, you are helping me a great deal i appreciate so much. so right now i have this : Last login: Sun Feb 14 02:57:32 on ttys000
    devon-kocevskis-macbook:~ devonkocevski$ cd /Users/devonkocevski/Downloads/QuarterX\ 2.0\ Client/Files
    devon-kocevskis-macbook:Files devonkocevski$ java -jar Updater.jar
    Unable to access jarfile Updater.jar
    devon-kocevskis-macbook:Files devonkocevski$

    What am i doing wrong lol?
     
  17. devonjk thread starter macrumors newbie

    Joined:
    Feb 13, 2010
    #17
    devon-kocevskis-macbook:QuarterX 2.0 Client devonkocevski$ java -jar Updater.jarException in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)

    thats what i have now.
     
  18. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #18
    Type this in Terminal:

    java -jar

    Then drag updater.jar into Terminal and it will put the file with its path after -jar in the above line. Make sure there's a space between -jar and the file with its path. Understand?
     
  19. devonjk thread starter macrumors newbie

    Joined:
    Feb 13, 2010
    #19
    Last login: Sun Feb 14 23:35:15 on ttys000
    devon-kocevskis-macbook:~ devonkocevski$ java -jar /Users/devonkocevski/Downloads/QuarterX\ 2.0\ Client/Updater.jar
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
    devon-kocevskis-macbook:~ devonkocevski$
    Thats what im getting with that method. i'm sorry if im missing something. i appreciate all the help this is new to me.
     
  20. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #20
    Try copying the updater.jar file to the Downloads folder. Then drag it to the Terminal so that you get this:

    devon-kocevskis-macbook:~ devonkocevski$ java -jar /Users/devonkocevski/Downloads/Updater.jar
     
  21. devonjk thread starter macrumors newbie

    Joined:
    Feb 13, 2010
    #21
    Last login: Sun Feb 14 23:35:31 on ttys000
    devon-kocevskis-macbook:~ devonkocevski$ java -jar /Users/devonkocevski/Downloads/Updater.jar
    Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:676)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:317)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)
    devon-kocevskis-macbook:~ devonkocevski$
     
  22. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #22
    Okay, I finally went back to square one. I had never downloaded the client, so I looked at it. It seems like you may need to cd to the directory where updated.jar is then run that line. So, cd to /Users/devonkocevski/Downloads/QuarterX 2.0 Client and then run that line again.

    Those forward slashes (\) that you had before were not in the structure I downloaded, so that may have been another issue.
     
  23. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #23
    \ is called a backslash, and those are just escaping the spaces in the path. Mac OS X inserts them automatically when you drag a file into the Terminal window. It wouldn't affect the results.
     
  24. devonjk thread starter macrumors newbie

    Joined:
    Feb 13, 2010
    #24
    Well this is what i tried and basically it says cannot execute the binary file i think.

    devon-kocevskis-macbook:QuarterX 2.0 Client devonkocevski$ cd /users/devonkocevski/Downloads/QuarterX/2.0/Client
    -bash: cd: /users/devonkocevski/Downloads/QuarterX/2.0/Client: No such file or directory
    devon-kocevskis-macbook:QuarterX 2.0 Client devonkocevski$ java -jar
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)

    where options include:
    -d32 use a 32-bit data model if available
    -d64 use a 64-bit data model if available (implies -server, only for x86_64)
    -client to select the "client" VM
    -server to select the "server" VM
    -jvm is a synonym for the "client" VM [deprecated]
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.

    -cp <class search path of directories and zip/jar files>
    -classpath <class search path of directories and zip/jar files>
    A : separated list of directories, JAR archives,
    and ZIP archives to search for class files.
    -D<name>=<value>
    set a system property
    -verbose[:class|gc|jni]
    enable verbose output
    -version print product version and exit
    -version:<value>
    require the specified version to run
    -showversion print product version and continue
    -jre-restrict-search | -jre-no-restrict-search
    include/exclude user private JREs in the version search
    -? -help print this help message
    -X print help on non-standard options
    -ea[:<packagename>...|:<classname>]
    -enableassertions[:<packagename>...|:<classname>]
    enable assertions
    -da[:<packagename>...|:<classname>]
    -disableassertions[:<packagename>...|:<classname>]
    disable assertions
    -esa | -enablesystemassertions
    enable system assertions
    -dsa | -disablesystemassertions
    disable system assertions
    -agentlib:<libname>[=<options>]
    load native agent library <libname>, e.g. -agentlib:hprof
    see also, -agentlib:jdwp=help and -agentlib:hprof=help
    -agentpath:<pathname>[=<options>]
    load native agent library by full pathname
    -javaagent:<jarpath>[=<options>]
    load Java programming language agent, see java.lang.instrument
    devon-kocevskis-macbook:QuarterX 2.0 Client devonkocevski$ /Users/devonkocevski/Downloads/QuarterX\ 2.0\ Client/Updater.jar
    -bash: /Users/devonkocevski/Downloads/QuarterX 2.0 Client/Updater.jar: cannot execute binary file
    devon-kocevskis-macbook:QuarterX 2.0 Client devonkocevski$
     
  25. -aggie- macrumors P6

    -aggie-

    Joined:
    Jun 19, 2009
    Location:
    Where bunnies are welcome.
    #25
    I dragged that file into terminal and didn't get the backslashes.

    And I know what backslashes are. :)

    @ the OP:

    sers/devonkocevski/Downloads/QuarterX/2.0/Client

    Now you have forward slashes. Just type it like I did.

    Edit: I just checked it again, and now it did put the backslashes in. Sorry.

    I'm at a loss as to why you can't get this to work. I was pretty sure it had something to do with you not being in the right directory when you ran that file, but now IDK any more.
     

Share This Page