MacNN Forums (http://forums.macnn.com/)
-   Applications (http://forums.macnn.com/applications/)
-   -   Need Help with .bat files for Mac OS X (http://forums.macnn.com/82/applications/386820/need-help-bat-files-mac-os/)

 
Rockdude1337 Feb 10, 2009 11:11 PM
Need Help with .bat files for Mac OS X
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 Feb 10, 2009 11:26 PM
man dos
 
Rockdude1337 Feb 10, 2009 11:31 PM
Hey appreciate the post but could u dumb it down for me please lol
 
ibook_steve Feb 11, 2009 03: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
 
angelmb Feb 11, 2009 05: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 Feb 15, 2009 12: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 Feb 15, 2009 12: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 Feb 15, 2009 04:35 AM
Well, I guess DOS was not JAVA friendly :D

Have you tried it with VirtualBox?, it is also a free option, you're going to need your own copy of Windows though.
 
howardholton Feb 15, 2009 07: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.
 
King Bob On The Cob Feb 16, 2009 03: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 Feb 16, 2009 11:42 PM
@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 Feb 16, 2009 11:47 PM
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 Feb 17, 2009 01: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 Feb 17, 2009 03:43 AM
Quote, Originally Posted by Rockdude1337 (Post 3804145)
@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
 
Rockdude1337 Feb 17, 2009 10: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"
 
davidbk1 Feb 18, 2009 01: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 Feb 18, 2009 10: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 Feb 18, 2009 11:16 PM
Question: what is "java -Xmx500m EGUI" supposed to do?
 
King Bob On The Cob Feb 19, 2009 02:14 AM
Quote, Originally Posted by Rockdude1337 (Post 3804812)
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 Feb 19, 2009 04:30 PM
Quote, Originally Posted by Hal Itosis (Post 3804823)
Question: what is "java -Xmx500m EGUI" supposed to do?
Launch a Java app called "EGUI" with a 500 MB memory allocation pool?
 
Hal Itosis Feb 19, 2009 07:20 PM
Quote, Originally Posted by CharlesS (Post 3805098)
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?
 
davidbk1 Feb 19, 2009 07:57 PM
Same folder as the .bat file judging by its contents.
 
Rockdude1337 Feb 20, 2009 12: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 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 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 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 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.
 
ajyankefan04 Feb 20, 2010 10: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!?
 
All times are GMT -4. The time now is 06:40 AM.

Copyright © 2005-2007 MacNN. All rights reserved.
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2016, vBulletin Solutions, Inc.


Content Relevant URLs by vBSEO 3.3.2