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

Hobbit Shado

macrumors newbie
Original poster
Aug 27, 2010
1
0
Can anyone help me convert this?

@echo off
title Hobbitscape
javac -source 1.5 -target 1.5 -classpath . -d bin *.java -g
title Hobbitscape is now running.

cd bin

java -Xmx800M server
color f0
pause

I need this converted so I can run my Server
 
echo -n -e "\033]0;Hobbitscape\007"
javac -source 1.5 -target 1.5 -classpath . -d bin *.java -g
echo -n -e "\033]0;Hobbitscape is now running\007"

cd bin
java -Xmx800M server > /dev/null 2> /dev/null &

Setting color I'm not sure about.

-Lee
 
Further to lee1210's answer, and to clarify, this is a shellscript -- which is stored in a file (e.g. "go.sh") and run from Terminal.

Code:
#!/bin/bash

echo -n -e "\033]0;Hobbitscape\007"
javac -source 1.5 -target 1.5 -classpath . -d bin *.java -g
echo -n -e "\033]0;Hobbitscape is now running\007"

cd bin
java -Xmx800M server > /dev/null 2>&1 &

If you prefer, you can use Automator to build a standalone 'application' which can be double-clicked as normal (and therefore does not require you to first open Terminal and type the name of the script...).

Automator is also a good way to find out what is possible... For example the "Speak Text" action is fun (type "man say" in Terminal for more information about the command-line tool).
 
I should have been more specific, I just always tend toward a shell script rather than an AppleScript. For this particular case, the java command is really the crux. I rarely recompile every time I run a program.

Also, this script could be run via clicks in finder. There is nothing interactive, the script finishes after starting the java program, etc.

-Lee
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.