Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
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

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

Forum Jump

Similar Threads
thread Thread Starter Forum Replies Last Post
MLB At Bat to stream live games? Sky Blue iPhone and iPod touch Apps 107 Jul 2, 2009 05:48 PM
To convert or not to convert? Bedawyn iPod 2 Feb 23, 2009 01:16 AM


All times are GMT -5. The time now is 08:57 PM.

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

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