Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Applications > Need Help with .bat files for Mac OS X

Need Help with .bat files for Mac OS X
Thread Tools
Rockdude1337
Fresh-Faced Recruit
Join Date: Feb 2009
Status: Offline
Reply With Quote
Feb 11, 2009, 12:11 AM
 
Hey im not very experienced in this field because i just got a new mac and am totally new to them so could anyone give me some guidance on how to run a .bat file. it's a file from a moparscape client and im using UnrarX to read it or something but it wont run like it does on my pc. with anyone with any idea what i could do please post
     
Hal Itosis
Grizzled Veteran
Join Date: Mar 2004
Status: Offline
Reply With Quote
Feb 11, 2009, 12:26 AM
 
man dos
-HI-
     
Rockdude1337  (op)
Fresh-Faced Recruit
Join Date: Feb 2009
Status: Offline
Reply With Quote
Feb 11, 2009, 12:31 AM
 
Hey appreciate the post but could u dumb it down for me please lol
     
ibook_steve
Moderator
Join Date: Oct 2001
Location: San Jose, CA
Status: Offline
Reply With Quote
Feb 11, 2009, 04:18 AM
 
Welcome to our forums!

You can't run Windows/DOS batch scripts in Mac OS X. The previous reply was a joke. What exactly does the script do and what do you want or need to do? What's moparscape?

Steve
Celebrating 10 years and 4000 posts on MacNN!
     
angelmb
Addicted to MacNN
Join Date: Oct 2001
Location: Automatic
Status: Offline
Reply With Quote
Feb 11, 2009, 06:14 AM
 
You may try Boxer, as long as the .bat file doesn't require Windows… if you happen to need Windows, you would have to run VMware Fusion, Parallels Desktop or the free VirtualBox.
     
Rockdude1337  (op)
Fresh-Faced Recruit
Join Date: Feb 2009
Status: Offline
Reply With Quote
Feb 15, 2009, 01:24 AM
 
oo thanks im trying out boxer and i think ill be able to do it thanks man ill tell u if it works
     
Rockdude1337  (op)
Fresh-Faced Recruit
Join Date: Feb 2009
Status: Offline
Reply With Quote
Feb 15, 2009, 01:39 AM
 
ok, so i tried boxer it looks good but its just not opening up the actual web client. it opens up the DOS prompt but in the prompt it says-
Illegal command: color
Illegal command: title
Illegal command: JAVA

anyone with any ideas please post - thanks
     
angelmb
Addicted to MacNN
Join Date: Oct 2001
Location: Automatic
Status: Offline
Reply With Quote
Feb 15, 2009, 05:35 AM
 
Well, I guess DOS was not JAVA friendly

Have you tried it with VirtualBox?, it is also a free option, you're going to need your own copy of Windows though.
     
howardholton
Fresh-Faced Recruit
Join Date: Apr 2002
Location: HB, CA
Status: Offline
Reply With Quote
Feb 15, 2009, 08:41 PM
 
Can you post the content of the bat file? A bat file is just a txt file - so you can open it in Textpad.

Post the contents and let's see if we can work through it.
Please help!! I am trying to ditch Wintel He11 for OS X and am a MAC newbie.
     
King Bob On The Cob
Mac Elite
Join Date: Apr 2002
Location: Illinois
Status: Offline
Reply With Quote
Feb 16, 2009, 04:16 AM
 
You'll probably just be able to double click the .jar file and open it, if the Java coders used proper coding techniques...
     
Rockdude1337  (op)
Fresh-Faced Recruit
Join Date: Feb 2009
Status: Offline
Reply With Quote
Feb 17, 2009, 12:42 AM
 
@ECHO OFF
color 0a
title SydneyScape Client Version 2.8
echo SydneyScape Client Coded By SwiftY
echo Thank you for using SydneyScapev2 Client
echo Enjoy the NEW models
cd Files
JAVA -Xmx500m EGUI
pause
(i opened with text edit and thats what it said)
     
Rockdude1337  (op)
Fresh-Faced Recruit
Join Date: Feb 2009
Status: Offline
Reply With Quote
Feb 17, 2009, 12:47 AM
 
also just if it would help u, download is at sydneyscape.org under dowloads tab, idk if downloading it will give your computer any junk though
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Feb 17, 2009, 02:25 AM
 
RockDude: you probably aren't going to get much in the way of useful help here until you tell us what it is that you are trying to do. What is this script supposed to do, and what makes you certain that it will run on a Unix based OS?
     
King Bob On The Cob
Mac Elite
Join Date: Apr 2002
Location: Illinois
Status: Offline
Reply With Quote
Feb 17, 2009, 04:43 AM
 
Originally Posted by Rockdude1337 View Post
@ECHO OFF
color 0a
title SydneyScape Client Version 2.8
echo SydneyScape Client Coded By SwiftY
echo Thank you for using SydneyScapev2 Client
echo Enjoy the NEW models
cd Files
JAVA -Xmx500m EGUI
pause
(i opened with text edit and thats what it said)
Lemme pick apart those lines of code for you...

Code:
@ECHO OFF
Means basically nothing. It's sets up the environment
Code:
color 0a
Sets the color of the text. You can ignore this as well.
Code:
title SydneyScape Client Version 2.8
Sets the title in the window. Once again. Not important.
Code:
echo SydneyScape Client Coded By SwiftY echo Thank you for using SydneyScapev2 Client echo Enjoy the NEW models
Would print some text if the environment wasn't set to ECHO OFF.
Code:
cd Files
Here's something that actually does something. change directory to Files. Which is command line equivalent of double clicking into a folder called "Files".
Code:
JAVA -Xmx500m EGUI
Here's the big kahuna. This actually runs the java program. Due to java's cross platform nature, you may actually be able to get away with running this code.
Code:
pause
It's just telling the command line not to quit (which would end the java process.)

My first suggestion would be to open up the "Terminal". It's in /Applications/Utilities/
type "cd " that's cd[space] without the quotes, then hit return
Drag in the "Files" folder from the folder you downloaded.
then copy and paste the following code:
Code:
java -Xmx500m EGUI
It may work, it may not, but it's a start to figuring this out.

Edit:

This is the launch code you need:
Code:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -Xmx500m EGUI
( Last edited by King Bob On The Cob; Feb 17, 2009 at 04:54 AM. )
     
Rockdude1337  (op)
Fresh-Faced Recruit
Join Date: Feb 2009
Status: Offline
Reply With Quote
Feb 17, 2009, 11:45 PM
 
just one question but thank you for that excellent walkthrough. my question is after i drag "Files" folder into terminal do i hit spacebar or return or what before i paste "/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -Xmx500m EGUI"? and also i was confused about when you said right between those steps when you said "then copy and paste the following code, 'java -Xmx500m EGUI'" (with the line through it)...... is /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -Xmx500m EGUI
the code i need to paste or is
"@ECHO OFF
color 0a
title SydneyScape Client Version 2.8
echo SydneyScape Client Coded By SwiftY
echo Thank you for using SydneyScapev2 Client
echo Enjoy the NEW models
cd Files
JAVA -Xmx500m EGUI (without this line the code?)
pause"



THANKS


oh and by the way i tried typing in "cd " then hit return, then without space or return or anything i pasted "/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -Xmx500m EGUI"
then i hit return, and the terminal replied
"-bash: /Users/*************/Desktop/SydneyScape 2.8 - FIXED/Files: is a directory"
( Last edited by Rockdude1337; Feb 17, 2009 at 11:57 PM. )
     
davidbk1
Junior Member
Join Date: Aug 2005
Status: Offline
Reply With Quote
Feb 18, 2009, 02:32 AM
 
He had it a little off. What you want to do is type "cd " without the quotes, but then drag the folder to the terminal window, and THEN press enter. At which point you run the following line:

/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -Xmx500m EGUI
     
Rockdude1337  (op)
Fresh-Faced Recruit
Join Date: Feb 2009
Status: Offline
Reply With Quote
Feb 18, 2009, 11:37 PM
 
Exception in thread "main" java.lang.NoClassDefFoundError: EGUI
Caused by: java.lang.ClassNotFoundException: EGUI
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 16)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:288)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:374)

Was terminal response
     
Hal Itosis
Grizzled Veteran
Join Date: Mar 2004
Status: Offline
Reply With Quote
Feb 19, 2009, 12:16 AM
 
Question: what is "java -Xmx500m EGUI" supposed to do?
-HI-
     
King Bob On The Cob
Mac Elite
Join Date: Apr 2002
Location: Illinois
Status: Offline
Reply With Quote
Feb 19, 2009, 03:14 AM
 
Originally Posted by Rockdude1337 View Post
Exception in thread "main" java.lang.NoClassDefFoundError: EGUI
Caused by: java.lang.ClassNotFoundException: EGUI
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 16)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:288)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:374)

Was terminal response
You're not in the proper directory to run the command.

command line should look something like this...

Code:
Last login: Thu Feb 19 01:08:26 on ttys002 Mjolnir-Mk-II:~ kbotc$ cd /Users/kbotc/Desktop/SydneyScape\ FINAL\ 3.0/Files Mjolnir-Mk-II:Files kbotc$ /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -Xmx500m EGUI
You type cd[space] then immediately drag in the "Files" folder. It should then automatically type in the proper path. You should then just hit return.
Your command prompt should just say something like:

Computer-name:Files yourname$
Then copy and paste the /System/blahblahblah/java thing.

Hope that works. I've got it running over here!
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Feb 19, 2009, 05:30 PM
 
Originally Posted by Hal Itosis View Post
Question: what is "java -Xmx500m EGUI" supposed to do?
Launch a Java app called "EGUI" with a 500 MB memory allocation pool?

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
Hal Itosis
Grizzled Veteran
Join Date: Mar 2004
Status: Offline
Reply With Quote
Feb 19, 2009, 08:20 PM
 
Originally Posted by CharlesS View Post
Launch a Java app called "EGUI" with a 500 MB memory allocation pool?
Great... now we're getting somewhere!!!!!111|||
So, where is this Java app called "EGUI" then?
-HI-
     
davidbk1
Junior Member
Join Date: Aug 2005
Status: Offline
Reply With Quote
Feb 19, 2009, 08:57 PM
 
Same folder as the .bat file judging by its contents.
     
Rockdude1337  (op)
Fresh-Faced Recruit
Join Date: Feb 2009
Status: Offline
Reply With Quote
Feb 20, 2009, 01:22 AM
 
Oh finally it work thank you guys so much for posting, also thanks to u king bob on the kob for finding the answer. if there is anyway i can give u guys like +rep or something on these forums lemme know =) thanks alot
     
skeebo
Fresh-Faced Recruit
Join Date: Oct 2009
Status: Offline
Reply With Quote
Oct 21, 2009, 12:32 AM
 
I'm having a similar problem can someone help me? http://forums.macnn.com/65/mac-pro-a...-files-on-mac/
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Oct 21, 2009, 12:37 AM
 
If you're trying to play the same game as the other kid here, he never got it to work, it would segfault. If this is the same game, I'd recommend virtualizing Windows or running the game in WINE.
     
skeebo
Fresh-Faced Recruit
Join Date: Oct 2009
Status: Offline
Reply With Quote
Oct 21, 2009, 12:57 AM
 
It's coded in java the same way and plays on a similar client, but is coded differently i guess i'll have to install windows on here
     
King Bob On The Cob
Mac Elite
Join Date: Apr 2002
Location: Illinois
Status: Offline
Reply With Quote
Oct 22, 2009, 01:43 PM
 
Nope. Sorry, I've been doing exams lately, so I haven't been around.

Try this:

Code:
cd Source /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java -Xmx512m -cp .:Theme Gui
It works.
( Last edited by King Bob On The Cob; Oct 22, 2009 at 01:54 PM. )
     
ajyankefan04
Fresh-Faced Recruit
Join Date: Feb 2010
Status: Offline
Reply With Quote
Feb 20, 2010, 11:38 PM
 
hey, i realize that this is a few months after this whole post thing but...

i want to play mopar also but none of the above stuff hasnt worked.


i compiled WINE on my mac but have no idea what to do past that..

anyone help!?
     
   
Thread Tools
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 05:44 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,