Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'java -version' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
java -version
Authored by: hayne on Apr 18, '05 11:32:21PM

If you are seeing the 'java -version' command fail with a seg fault,
and you have the Apple developer tools installed,
you might be able to get some useful info by running the command under the debugger.

In a Terminal window, enter the command:

gdb java

After a bit of output from gdb, you will be at the (gdb) prompt. Enter the following command at the (gdb) prompt:

run -version

When it says that it has seg faulted, enter the following command at the (gdb) prompt:

where

Copy and paste the results of this back here so we can see.
To exit from the debugger, enter the following command at the (gdb) prompt:

quit



[ Reply to This | # ]
java -version
Authored by: yrn1 on Apr 19, '05 02:35:50AM

GNU gdb 5.3-20030128 (Apple version gdb-330.1) (Fri Jul 16 21:42:28 GMT 2004)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "powerpc-apple-darwin".
Reading symbols for shared libraries .... done
(gdb) run -version
Starting program: /usr/bin/java -version
Reading symbols for shared libraries ................... done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done
Reading symbols for shared libraries . done

Program received signal EXC_BAD_ACCESS, Could not access memory.
[Switching to process 597 thread 0x10f]
0x949423f8 in JVM_Timeout ()
(gdb) where
#0 0x949423f8 in JVM_Timeout ()
#1 0x9494f340 in JVM_GetMethodIxModifiers ()
#2 0x9494f340 in JVM_GetMethodIxModifiers ()
#3 0x94949b04 in JVM_DoPrivileged ()
#4 0x94956220 in JVM_MonitorNotifyAll ()
#5 0x94903d14 in JVM_GetClassAccessFlags ()
#6 0x94906544 in JVM_MonitorWait ()
#7 0x949062bc in JVM_MonitorWait ()
#8 0x949c245c in JVM_GetClassDeclaredFields ()
#9 0x949f1d70 in JVM_GetInterfaceVersion ()
#10 0x949ecaa8 in JVM_GetInterfaceVersion ()
#11 0x949ec5dc in JVM_GetInterfaceVersion ()
#12 0x949cd47c in JVM_IsPrimitiveClass ()
#13 0x949bd3b0 in JVM_GetClassDeclaredMethods ()
#14 0x949d7d6c in JNI_CreateJavaVM_Impl ()
#15 0x00005634 in ?? ()
#16 0x000041bc in ?? ()
#17 0x00006538 in ?? ()
#18 0x90024910 in _pthread_body ()
(gdb)



[ Reply to This | # ]