Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old May 14, 2009, 02:05 PM   #1
Thyphen
macrumors newbie
 
Join Date: May 2009
Converting a .bat to .sh?

Well I am wondering if there is a way to convert something from a .bat to a .sh...

I am guessing you have to completly change it but I was wondering if someone knew how...

The code is as follows
Code:
@echo off
title RSCD
java -classpath rscd.jar;lib/xpp3.jar;lib/xstream.jar;lib/hex-string.jar;lib/mail.jar;lib/activation.jar;lib/jmf.jar org.rscdaemon.client.mudclient
pause
Could someone make a mac do exactly that but with a .sh?
Thyphen is offline   0 Reply With Quote
Old May 14, 2009, 02:47 PM   #2
lee1210
macrumors 68040
 
lee1210's Avatar
 
Join Date: Jan 2005
Location: Dallas, TX
you could, but i don't know why you'd want to.

Code:
java -classpath rscd.jar;lib/xpp3.jar;lib/xstream.jar;lib/hex-string.jar;lib/mail.jar;lib/activation.jar;lib/jmf.jar org.rscdaemon.client.mudclient >/dev/null 2>&1 &
This in a sh file will run the command for you, but you won't need to keep a terminal occupied to run the thing.
read
could take the place of
pause

If you really wanted to the terminal to stay up after execution. I think title is just setting the command prompt's window title in Windows? Not really necessary, but:
echo "^[]0;"RSCD"^G"

should set the title. To type ^[ and ^G, type ctrl+v, then ctrl+esc or ctrl+g.

-Lee
lee1210 is offline   0 Reply With Quote
Old May 18, 2009, 12:31 PM   #3
Thyphen
Thread Starter
macrumors newbie
 
Join Date: May 2009
Hmmm I used that code and this is the error i got...

Code:
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
    -splash:<imagepath>
                  show splash screen with specified image
/Users/troydickerson/Desktop/Troy/RSCDevil/Aus-Bot ~MubbY/rsbot: line 1: lib/xpp3.jar: No such file or directory
/Users/troydickerson/Desktop/Troy/RSCDevil/Aus-Bot ~MubbY/rsbot: line 1: lib/xstream.jar: No such file or directory
/Users/troydickerson/Desktop/Troy/RSCDevil/Aus-Bot ~MubbY/rsbot: line 1: lib/hex-string.jar: No such file or directory
/Users/troydickerson/Desktop/Troy/RSCDevil/Aus-Bot ~MubbY/rsbot: line 1: lib/mail.jar: No such file or directory
/Users/troydickerson/Desktop/Troy/RSCDevil/Aus-Bot ~MubbY/rsbot: line 1: lib/activation.jar: No such file or directory
Thyphen is offline   0 Reply With Quote
Old May 18, 2009, 12:37 PM   #4
iShater
macrumors Demi-God
 
iShater's Avatar
 
Join Date: Aug 2002
Location: Chicagoland
Did you move the project from a windows machine? did you bring over the directory structure that shows up in the CLASSPATH over?
__________________
Insert signature here.
iShater is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
General: MLB at Bat and Location Spoofer xraytech Jailbreaks and iOS Hacks 9 Apr 3, 2013 10:07 AM
AT Bat 13 issues wsarahan iPad Apps 1 Mar 29, 2013 03:08 PM
Apple BT Keyboard - 2 Bat. vs 3 Bat. Version? Tucom Mac Peripherals 3 Dec 8, 2012 05:23 PM
Execute .bat Files OS X 10.8 Silverrune OS X 10.8 Mountain Lion 7 Aug 5, 2012 09:07 PM

Forum Jump

All times are GMT -5. The time now is 01:28 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC