Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Thyphen

macrumors newbie
Original poster
May 14, 2009
3
0
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?
 

lee1210

macrumors 68040
Jan 10, 2005
3,182
3
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
 

Thyphen

macrumors newbie
Original poster
May 14, 2009
3
0
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
 

iShater

macrumors 604
Aug 13, 2002
7,026
470
Chicagoland
Did you move the project from a windows machine? did you bring over the directory structure that shows up in the CLASSPATH over?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.