Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Memory Analyzer (MAT) » JVM Terminates immediately under Mac OS X w/ J2SE 6.0
JVM Terminates immediately under Mac OS X w/ J2SE 6.0 [message #5877] Wed, 29 October 2008 04:53 Go to next message
Ryan Delucchi is currently offline Ryan DelucchiFriend
Messages: 5
Registered: July 2009
Junior Member
I tried MAT under J2SE 5.0 on Mac OS X 10.5, but when I switch the current
JDK to J2SE 6.0, it no longer functions. Upon launch it will terminate
immediately with the Message "JVM Terminated ... exit code = -1".

Could someone provide any advice to resolve this or possibly tell me how I
can configure it to refer to a Java installation (just so I can get it
working again).

Thanks!
Re: JVM Terminates immediately under Mac OS X w/ J2SE 6.0 [message #5895 is a reply to message #5877] Wed, 29 October 2008 09:18 Go to previous messageGo to next message
Andreas Buchen is currently offline Andreas BuchenFriend
Messages: 123
Registered: July 2009
Senior Member
I found this in the Eclipse documentation:

> SWT cannot be used with OS X JRE version 1.6 (Mac OSX only)

> OS X JRE version 1.6 assumes that pointers have a size of 64 bits,
> but SWT's Carbon port only uses 32-bit pointers, so SWT and Eclipse
> cannot be used with OS X JRE version 1.6. The workaround is to use
> an earlier supported version of the OS X JRE.

To use an earlier version, check out the Mac OS X chapter here:
http://help.eclipse.org/ganymede/topic/org.eclipse.platform. doc.user/tasks/running_eclipse.htm

E.g. add a "-vm path/to/vm/bin" to the Contents/MacOS/MemoryAnalyzer.ini
file.


Let me know if this helps.

Andreas.
Re: JVM Terminates immediately under Mac OS X w/ J2SE 6.0 [message #5970 is a reply to message #5895] Wed, 29 October 2008 18:28 Go to previous messageGo to next message
Ryan Delucchi is currently offline Ryan DelucchiFriend
Messages: 5
Registered: July 2009
Junior Member
I can't find a Content/MacOS directory *or* a MemoryAnalyzer.ini file in
the MAT folder.

Should I create one? If so: where?
Re: JVM Terminates immediately under Mac OS X w/ J2SE 6.0 [message #6374 is a reply to message #5970] Thu, 30 October 2008 08:00 Go to previous messageGo to next message
Andreas Buchen is currently offline Andreas BuchenFriend
Messages: 123
Registered: July 2009
Senior Member
> I can't find a Content/MacOS directory *or* a MemoryAnalyzer.ini file in
> the MAT folder.

Applications under MacOS are packaged into a folder. When using Finder,
right-click on MemoryAnalyzer and select "Show Package Content". Then you
should see the Content/MacOS directory.
Re: JVM Terminates immediately under Mac OS X w/ J2SE 6.0 [message #6392 is a reply to message #6374] Thu, 30 October 2008 08:44 Go to previous messageGo to next message
Ryan Delucchi is currently offline Ryan DelucchiFriend
Messages: 5
Registered: July 2009
Junior Member
Ahh, that makes sense (as you probably noticed I am new to developing on
MacOS).

So I modified MemoryAnalyzer.ini to match the following:

-vmargs
-Xmx1024m
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XstartOnFirstThread
-vm /System/Library/Frameworks/JavaVM.framework/Versions/1.5

yet, when I launch the app, I still see the same error *except* I notice
that it shows the -vm argument I added (in a dump of all options) but
there appears to be some other component that is pointing to the default
VM location (but I could be interpreting this wrong).

At any rate, is it possible there is another initialization file I need to
change as well?

thanks
Re: JVM Terminates immediately under Mac OS X w/ J2SE 6.0 [message #6449 is a reply to message #6392] Thu, 30 October 2008 09:28 Go to previous messageGo to next message
Andreas Buchen is currently offline Andreas BuchenFriend
Messages: 123
Registered: July 2009
Senior Member
Hi Ryan,

I don't develop on Mac either and my MacBook sits at home right now...

> -vmargs
> -Xmx1024m
> -Dorg.eclipse.swt.internal.carbon.smallFonts
> -XstartOnFirstThread
> -vm /System/Library/Frameworks/JavaVM.framework/Versions/1.5

First, try putting it on two lines:

-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.5

Then, then try adapting the path. At least on Windows, it needs to point
to the directory which contains the java.exe file. E.g. it could be
something like .../Versions/1.5/bin or .../Versions/1.5/jre/bin or similar.

Andreas.
Re: JVM Terminates immediately under Mac OS X w/ J2SE 6.0 [message #6504 is a reply to message #6449] Thu, 30 October 2008 18:28 Go to previous messageGo to next message
Ryan Delucchi is currently offline Ryan DelucchiFriend
Messages: 5
Registered: July 2009
Junior Member
I am actually really liking the MacOS. What's frustrating is I am a big
fan of Eclipse MAT, but it is the only program I've been having trouble
with on my new Mac thus far.

> -vm
> /System/Library/Frameworks/JavaVM.framework/Versions/1.5

Just tried that, didn't appear to have an effect.

> Then, then try adapting the path. At least on Windows, it needs to point
> to the directory which contains the java.exe file. E.g. it could be
> something like .../Versions/1.5/bin or .../Versions/1.5/jre/bin or similar.

Tried this as well. No luck. The message that appears when I attempt to
run MAT is curious in that it shows the -vm ... option that I've added but
it also shows the -vm option again with the default JVM path. This is
what leads me to believe that the app has multiple files that contain this
path.

I'm presently not using any Windows emulation but it would be seriously
lame to be forced to given this is supposed to be a Java application.
Re: JVM Terminates immediately under Mac OS X w/ J2SE 6.0 [message #6522 is a reply to message #6504] Thu, 30 October 2008 19:17 Go to previous messageGo to next message
Ryan Delucchi is currently offline Ryan DelucchiFriend
Messages: 5
Registered: July 2009
Junior Member
Aha! I have it working now.

Take a look at:
http://stackoverflow.com/questions/245803/jvm-terminates-whe n-launching-eclipse-mat-on-mac-os-with-j2se-60

But thanks for telling about how Mac OS application are actually packages.
Not knowing this kept me from understanding the solution presented to me
in the thread that link above refers to.
Re: JVM Terminates immediately under Mac OS X w/ J2SE 6.0 [message #6558 is a reply to message #6522] Fri, 31 October 2008 07:46 Go to previous message
Andreas Buchen is currently offline Andreas BuchenFriend
Messages: 123
Registered: July 2009
Senior Member
> Take a look at:
>
http://stackoverflow.com/questions/245803/jvm-terminates-whe n-launching-eclipse-mat-on-mac-os-with-j2se-60

Thanks for solving this! On Windows, it is sufficient to add the VM
information to the MemoryAnalyzer.ini. But on Mac OS X it is not. Okay.
Previous Topic:Help understanding Heap Analysis
Next Topic:Stuck on 63%
Goto Forum:
  


Current Time: Thu Dec 26 20:15:07 GMT 2024

Powered by FUDForum. Page generated in 0.03848 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top