My favorites | Sign in
Google
                
New issue | Search
for
| Advanced search | Search tips
Issue 3998: Hosted mode does not work on snow leopard
16 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by pohl.longsine, Aug 30, 2009
The issue description is similar to one that has been mysteriously marked 'fixed':

http://code.google.com/p/google-web-toolkit/issues/detail?id=2507

There is no known workaround.
Comment 1 by jdoug...@basis.com, Aug 30, 2009
Related thread:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/e9fcc378d8b48733
Comment 3 by allen.holub, Aug 30, 2009
Here's a workaround, that I've copied from the eariler thread. Note that this
workaround does not fix the real problem, which is that hosted mode does not work
with a 64-bit 1.6 JVM. However, it will get you working again:

If you look in the directory that holds the JVM versions
(/System/Library/Frameworks/JavaVM.framework/Versions/), you'll see that 1.5 and
1.5.0 are just symlinks to the 1.6 jvm. This means that changing the defaults in
Eclipse will have no effect, since all that you'll be doing is pointing to a symlink
that just points back to the original directory. What you need is a *real* 32-bit 1.5
JVM, which doesn't ship with Snow Leopard.

I did some rooting around and found the following instructions for downgrading your
JVM to a *real* 32-bit 1.5.0 JVM. This process doesn't remove the 64-bit 1.6 JVM from
the system, so it's still there if you need it.  It does, however, make a real 32-bit
1.5 JVM be the default JVM, and that will make GWT happy:

http://wiki.oneswarm.org/index.php/OS_X_10.6_Snow_Leopard

As an aside, these instructions require you to have a wget installed. I'm not sure if
there's one in Snow Leopard (there didn't used to be), but you can get one from
http://kevinhenrikson.com/2006/06/18/macos-x-1046-wget/ or you can download the
latest version and compile it by following these instructions:
http://www.asitis.org/installing-wget-for-mac-os-x

Comment 4 by pohl.longsine, Sep 03, 2009
http://development.lombardi.com/?p=1012

Alex Moffat has managed to launch hosted mode on Snow Leopard using Java 1.6 and the "-d32" data model 
switch.

This means that, in theory, Google could release a 1.7.1 for us that simply comments-out the explicit check that 
GWT does for Java 1.5 on the Mac.  

Comment 5 by pohl.longsine, Sep 03, 2009
...and documents the need for us to configure our runtimes with the "-d32" switch, of course.
Comment 6 by geoffrey.wiseman, Sep 10, 2009
Or modify the check to be more accurate--the problem was never with Java 1.6 
specifically, it was with 64-bit Java.
Comment 7 by jimtomlinson, Sep 17, 2009
When I hacked BootstrapPlatform to get running on snow leopard, I wanted to ensure I didn’t forget the ‘-
d32′ switch, so I replaced isJava5() with is64bit():
…
public static void initHostedMode() {
/*
* The following check must be made before attempting to initialize Safari,
* or we’ll fail with an less-than-helpful UnsatisfiedLinkError.
*/
if (is64bit()) {
System.err.println(”You must use a 32-bit Java runtime to use GWT Hosted Mode on Mac OS X.”);
System.exit(-1);
}
…
/**
* Determine if we’re using a 64bit runtime
*/
private static boolean is64bit() {
return System.getProperty(”java.vm.name”).contains(”64-Bit”);
}
…
Comment 8 by jdoug...@basis.com, Sep 17, 2009
re: Comment #7 from jimtomlinson

Google just made a similar change in preparation for the upcoming 1.7.1 release:

http://code.google.com/p/google-web-toolkit/source/detail?r=6144
Sign in to add a comment