| OS X - Operating System General OS operation information and support |
| Post Reply | New Thread | Subscribe |
|
|
Thread Tools |
![]() Member Since: Jul 17, 2009
Location: MA
Posts: 5,845
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 27" i7 iMac with 16GB RAM and 1TB HDD, iPhone 3G & 4, iPod Nano 16GB, iPod Shuffle, iPad 2 16GB WiFi
|
|
| QUOTE Thanks | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,328
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
||||
| QUOTE Thanks | |||||
![]() Member Since: Jul 05, 2010
Posts: 6
![]() |
My father has helped with .bat files before, and I don't think he changed all that much of them. Anyway, this is the text in it.
@echo off COLOR 09 title SilabGarza Client v3.6 cd .\FILES\ java -Xmx1000m -cp .;Theme.jar Bot 0 0 lowmem members 32 pause For the future, it would also be helpful to know how to rewrite them myself, without having to resort to posting on the forum ![]() P.S. When my father helped rewrite them, I am 99% sure he used Terminal. I'm not sure how he did that though, so any help would be appreciated
Last edited by Beatles Fan; 07-05-2010 at 06:11 PM. |
| QUOTE Thanks | |
![]() Member Since: Oct 01, 2007
Location: UK
Posts: 5,397
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 27" iMac i7 (2011), iPhone5, iPad3, AppleTV2
|
BAT files are just text files. They contain script commands that Windows can interpret.
They can be edited on most platforms in any plain text editor (on OSX try TextEdit or Text Wrangler). As to your question what to change . . . that's near impossible to answer. The file you've posted above appears to invoke a precompiled java app using a set of parameters. I'd hazard a guess that it's a bespoke app of some kind. You can change the commands by just typing/overtyping. But asking what to change is a nearly impossible question to answer from the info you've supplied I'm afraid. You'd need to state what you are trying to do, what it does now and what it needs to do, but even then what you're asking is somewhat 'tricky'. What's the end result you want to achieve? Are you trying to run this java app on Mac? External hard disk acquisition addict - but admitting the problem is the first step to a robust backup Please use the reputation system if you think you've been helped - top right of this post |
| QUOTE Thanks | |
![]() Member Since: Jul 05, 2010
Posts: 6
![]() |
Quote:
Yes, I'm trying to run the Java file on my Mac. If you need any other information, I'm afraid I don't know enough about this to help. All I know is that I have to rewrite it to make it run
|
|
| QUOTE Thanks | ||
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,328
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
Try the following:
Code:
#!/bin/sh cd <location> (replace with the location of the jar) java -Xmx1000m -cp .;Theme.jar Bot 0 0 lowmem members 32 Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
| QUOTE Thanks | |
![]() Member Since: Jul 05, 2010
Posts: 6
![]() |
Quote:
Code:
/Users/danny/Desktop/SilGar v3.6/Run.bat: line 3: Theme.jar: command not found |
|
| QUOTE Thanks | ||
![]() Member Since: Sep 30, 2007
Location: Wilmington, NC
Posts: 5,787
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: iMac i3 (mid-2010) + OS 10.8; TV 2; iPhone 4S; iPad 1
|
Perhaps simply using the Jar Launcher app in OS X will suffice, and bypass the need for command line scripting.
How to Execute a .jar File In Os X - Mac Support Standing request for all troubleshooting: Please provide your Mac model/year and OS version. Also advise us if you have used or installed any antivirus, security, or "cleaning" software on your Mac. If you have installed MacKeeper in particular, you are hereby advised to uninstall it. --------- If all else fails to fix your problem, read this tip. |
| QUOTE Thanks | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,328
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
Quote:
First, open up an editor and paste in the following: Code:
#!/bin/sh java -Xmx1000m -cp .;<location>/Theme.jar Bot 0 0 lowmem members 32 Code:
#!/bin/sh java -Xmx1000m -cp .;/Users/Name/Desktop/SilGar\ v3.6/FILES/Theme.jar Bot 0 0 lowmem members 32 Code:
chmod +x <location of sh file>/<sh file> Code:
chmod +x /Users/Name/jar_launcher.sh Code:
/Users/Name/jar_launcher.sh Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
|
| QUOTE Thanks | ||
![]() Member Since: Jul 05, 2010
Posts: 6
![]() |
Quote:
1. Edit the run.bat file to #!/bin/sh java -Xmx1000m -cp .;<location> Bot 0 0 lowmem members 32, and save it with the extension .sh 2. Open terminal and enter chmod +x /Users/danny/Desktop/SilGar\ v3.6/Run.sh 3. Hit enter Sorry for being so uneducated in terms of programming
|
|
| QUOTE Thanks | ||
![]() Member Since: Jan 12, 2009
Location: Prague, Czech Republic
Posts: 1,096
![]() ![]() Mac Specs: 2,4Ghz 15" unibody
|
Nice post lol
![]() it's two commands: 1. "java -Xmx1000m -cp ." -cp that will do a search for a class in the current dir, but why not just pass in the single class? -Xmx100M is a setting for the heap size, what exactly are you trying to run lol? ![]() 2. "Theme.jar Bot 0 0 lowmem members 32" you can retype this as: java -jar Theme.jar Bot 0 0 lowmem members 32 I would edit the file in the following way: java -Xmx1000m -cp . java -jar Theme.jar Bot 0 0 lowmem members 32 save it in the same location as the original .bat, add execute permissions as described above and dude, when some1 used <> it meant you needed to substitute that for the correct path, not write <location> in your script
|
| QUOTE Thanks | |
![]() Member Since: Oct 19, 2008
Location: Ottawa
Posts: 15,328
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Mac Specs: 2012 13" MBP (2.5 i5, 8GB)
|
Reading this might be useful. As it notes, if you put a semi-colon between two commands, it will execute the second regardless of whether there was an error with the first. If you put two ampersands between the commands, it will execute the second only if the first was successful.
So, you could put those two java commands on one line if you wanted: Code:
java -Xmx1000m -cp . ; java -jar Theme.jar Bot 0 0 lowmem members 32 Code:
java -Xmx1000m -cp . && java -jar Theme.jar Bot 0 0 lowmem members 32 Important Links: Community Guidelines : Use the reputation system if you've been helped. M-F Blog :: Write for the blog :: M-F IRC Channel - Chats every Sunday at 8PM EST. |
| QUOTE Thanks | |
| Post Reply | New Thread | Subscribe |
| Thread Tools | |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
|
|||||||
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Pages not opening ms word files! | Rector | OS X - Apps and Games | 9 | 01-19-2010 09:35 AM |
| Quicksilver: Opening selected files | AnthonyJK | OS X - Apps and Games | 1 | 04-15-2007 04:23 PM |
All times are GMT -4. The time now is 03:07 AM.
Powered by vBulletin