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 OSX

Need help with .bat files for Mac OSX (Page 2)
Thread Tools
Art Vandelay
Professional Poster
Join Date: Sep 2002
Location: New York, NY
Status: Offline
Reply With Quote
Sep 7, 2009, 02:18 PM
 
The command is in there. Well, one of them is. It is incomplete even though the working command was already provided in this thread.
Vandelay Industries
     
mattack1  (op)
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 7, 2009, 02:39 PM
 
I used the cd /users/matt/documents/Endurascapev1 java -Xmx512m -cp .:Theme.jar Gui (with the space)
     
Art Vandelay
Professional Poster
Join Date: Sep 2002
Location: New York, NY
Status: Offline
Reply With Quote
Sep 7, 2009, 02:47 PM
 
You've combined two commands into one.
Vandelay Industries
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 7, 2009, 02:56 PM
 
try:

cd /Users/matt/Documents/Endurascapev1 && java -Xmx512m -cp .:Theme.jar Gui
     
mattack1  (op)
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 7, 2009, 03:39 PM
 
Macintosh:~ matt$ cd /Users/matt/Documents/Endurascapev1 && java -Xmx512m -cp .:Theme.jar Gui
Exception in thread "main" java.lang.NoClassDefFoundError: Gui
Caused by: java.lang.ClassNotFoundException: Gui
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)
Macintosh:Endurascapev1 matt$
     
mattack1  (op)
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 7, 2009, 03:40 PM
 
if i am correct (which I am completely unsure of) I take out the GUI? If I do that, it comes with this:

Macintosh:~ matt$ cd /Users/matt/Documents/Endurascapev1 && java -Xmx512m -cp .:Theme.jar
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
Macintosh:Endurascapev1 matt$
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Sep 7, 2009, 03:55 PM
 
Dude, you need 'Gui'. That's the program you're trying to run.

What you need to do is to make sure that the folder you're 'cd'ing into is the same folder that contains the 'Gui.class' file.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
mattack1  (op)
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 7, 2009, 04:03 PM
 
I made sure of that. THe question is. Did I do it? And if so, how do I run it?
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Sep 7, 2009, 04:06 PM
 
I'm about 99% sure you cd'ed into the wrong folder. Why don't you try typing 'cd', then drag the Gui.class file into the Terminal. Then, instead of hitting Enter, hit Delete until you delete Gui.class from the end of the path so it ends with a slash '/'. Then hit Return, enter the Java command, and see what happens.

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
mattack1  (op)
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 7, 2009, 05:25 PM
 
Macintosh:~ matt$ cd /Users/matt/Documents/EnduraScapeV1/EnduraScape/
Macintosh:EnduraScape matt$ java -Xmx512m -cp .;Theme.jar Gui
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
-bash: Theme.jar: command not found
Macintosh:EnduraScape matt$
( Last edited by mattack1; Sep 7, 2009 at 06:08 PM. )
     
mattack1  (op)
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 7, 2009, 06:49 PM
 
I was able to get it to run, but I forgot to save it. So now I forget what I changed in what charless said to make it work.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 7, 2009, 06:57 PM
 
The up arrow on your keyboard or entering the word "history" and then return will show you the last Unix commands you have issued.
     
mattack1  (op)
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 7, 2009, 07:05 PM
 
Macintosh:~ matt$ cd /Users/matt/Documents/EnduraScapeV1/EnduraScape/
Macintosh:EnduraScape matt$ java -Xmx512m -cp .;Theme.jar Gui


If you look, I dragged in the GUI class and hit enter which then said:
Macintosh:Endurascape matt$
SO I then entered the java code. And it didnt work. Earlier I got it to work using what charless said, but I changed it a little. I forgot what I did so I need some help as to what to do now.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 7, 2009, 07:09 PM
 
If you can't remember what you did, I'm not sure what you expect of us? The solution has been posted, according to you, your ability to recall what you did is better than ours.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 7, 2009, 07:10 PM
 
All the dragging a file into your Terminal window does is help generate your Unix command for you by completing the path name for you. The working command is sitting there in your history, which you can access as described above.
     
mattack1  (op)
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 7, 2009, 07:10 PM
 
What I am asking is if anything that charless said to do could be altered that would work.
     
Art Vandelay
Professional Poster
Join Date: Sep 2002
Location: New York, NY
Status: Offline
Reply With Quote
Sep 7, 2009, 07:16 PM
 
No, if you alter it, it won't work. The answer is in your history and the answer is in this thread in multiple locations.
Vandelay Industries
     
Chuckit
Clinically Insane
Join Date: Oct 2001
Location: San Diego, CA, USA
Status: Offline
Reply With Quote
Sep 7, 2009, 07:19 PM
 
In your most recent log you posted here, you wrote "java -Xmx512m -cp .;Theme.jar Gui". Note the semicolon. That should be a colon.
Chuck
___
"Instead of either 'multi-talented' or 'multitalented' use 'bisexual'."
     
mattack1  (op)
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 7, 2009, 07:23 PM
 
Very nice spot Chuckit. I didnt even see that. Thanks.
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Sep 7, 2009, 09:01 PM
 
So, that's it, right? Do we get to do our little victory dance now?


Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
mattack1  (op)
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 13, 2009, 03:06 PM
 
Yep, It has been good. But I got a new modem and when I open up terminal, it works and all, but when I start to use the command, it then shuts down the screen leaving me with this message:

Invalid memory access of location 0x0 rip=0x1010e89f2

Segmentation fault
Macintosh:Client matt$


Then it asks if I want to send a report to apple. And it gives me these details:

Process: java [1839]
Path: /usr/bin/java
Identifier: com.apple.javajdk16.cmd
Version: 1.0 (1.0)
Code Type: X86-64 (Native)
Parent Process: bash [1819]

Interval Since Last Report: 701 sec
Crashes Since Last Report: 2
Per-App Interval Since Last Report: 61 sec
Per-App Crashes Since Last Report: 2

Date/Time: 2009-09-13 15:04:32.342 -0400
OS Version: Mac OS X 10.5.8 (9L31a)
Report Version: 6
Anonymous UUID: 519F7452-A751-40B8-A9EC-A531DF70AAC8

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000000
Crashed Thread: 12

Application Specific Information:

Java information:
Exception type: Bus Error (0xa) at pc=0x00000001010e89f2

Java VM: Java HotSpot(TM) 64-Bit Server VM (14.1-b02-92 mixed mode macosx-amd64)

Current thread (0x0000000101842000): JavaThread "CompilerThread1" daemon [_thread_in_native, id=769875968, stack(0x000000012dd36000,0x000000012de36000)]
Stack: [0x000000012dd36000,0x000000012de36000]

Current CompileTask:
C2:316 client.method85(IIIIIIIIIIZI)Z (1957 bytes)
Virtual Machine Arguments:
JVM Args: -Xmx500m
Java Command: EGUI
Launcher Type: SUN_STANDARD
Physical Memory: Page Size = 4k, Total = 1792M, Free = 681M
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 13, 2009, 03:13 PM
 
Nothing you can do about a segfault, unless you are a programmer and have access to the source code. Have you thought about running this thing in Windows via WINE or a VM?
     
mattack1  (op)
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 13, 2009, 03:26 PM
 
Do either of those need any installation? Because I can't do that on my computer due to privilege restraints.
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 13, 2009, 03:50 PM
 
Yes, they do.
     
mattack1  (op)
Fresh-Faced Recruit
Join Date: Sep 2009
Status: Offline
Reply With Quote
Sep 13, 2009, 03:58 PM
 
OK, and it is just has like a separate space for the windows version?
     
besson3c
Clinically Insane
Join Date: Mar 2001
Location: yes
Status: Offline
Reply With Quote
Sep 13, 2009, 04:10 PM
 
Why don't you research this on your own and come back to us with questions? You don't need to be dependent on us for everything. Google "run Windows on Intel Mac", or "virtualize Windows on Intel Mac", "Boot Camp OS X", or "WINE OS X". I would probably leave WINE/Crossover Office out, it will be the trickiest for you to get to work.
     
CharlesS
Posting Junkie
Join Date: Dec 2000
Status: Offline
Reply With Quote
Sep 13, 2009, 04:33 PM
 
What you've got there is a bug in the app you're running. Why don't you send that crash report to the developer so he/she/they can fix it?

Ticking sound coming from a .pkg package? Don't let the .bom go off! Inspect it first with Pacifist. Macworld - five mice!
     
 
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 09:40 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.,