1

i installed GWT using Eclipse wizard to be more precise, i followed this tutorial: https://developers.google.com/web-toolkit/usingeclipse?hl=pt-PT

I now have GWT working in my eclipse indigo release. But now i need to define the GWT_HOME variable (ambient variable) so i can run a project using a build file.

Because i installed the gwt plugin with the eclipse wizard, i don't know how to setup the ambient variable, because i can't seem to find the folder where gwt got installed.

I'm using eclipse indigo on windows 7.

Can anybody help me?

4

4 回答 4

3

Maybe you used the update site for Eclipse 3.6 instead of 3.7

This one should be the correct one for Indigo: http://dl.google.com/eclipse/plugin/3.7

When you have installed GWT like described here you just go into: Eclipse > Preferences > Window Builder GWT and in GWT_HOME variable you click Browse and select the gwt folder inside your Eclipse plugin directory.

(For example:

.../eclipse-modeling-indigo-sr2-64/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201205091048-rel-r37/gwt-2.4.0/

)

You can also check the correct path under: Eclipse > Preferences > Google > Web Toolkit

Regards, Fachexot

于 2012-06-25T13:51:07.423 回答
1

I ran into the same problem on Linux running ant from the command line.

I got around the problem by running ant as: ant -Dgwt.sdk=$GWT_HOME war

FYI the line: is in build.xml.

I believe name property is not the way to set gwt.sdk variable. I.e., the problem is with:

Behdad

于 2015-05-07T23:13:18.733 回答
0

I am using Indigo 3.7, I could not find Eclipse > Preferences > Window Builder GWT (as suggested by fachexot), but I found that if I set the environment variable GWT_HOME in Windows 7 my ant would be able to use the value.

To set the environment variable, in Windows 7, type "environment" in the search box of "Start" and then click "Edit environment variables for your account", and then "New" a "User variable" called "GWT_HOME" (you have first look up the exact path to GWT folder inside your Eclipse plugin directory).

After that, remember to restart eclipse so that the new environment can be picked up by the program.

于 2013-03-25T22:05:50.997 回答
0

On Mac OSX, if you want to access the variable from an ANT build as ${env.GWT_HOME} run from within Eclipse or some other IDE then you need to use launchctl as envoronment variables set per normal in NIX envoronments is not passed to OSX windows apps.

The simplest way to do this is add the following 2 lines to your .bashrc (replacing the path shown with the correct one for your install):

export GWT_HOME=${HOME}/.p2/pool/plugins/com.google.gwt.eclipse.sdkbundle_2.7.0/gwt-2.7.0

launchctl setenv GWT_HOME $GWT_HOME

于 2017-01-01T12:36:39.510 回答