简体   繁体   中英

Cannot create a GWT Web Application Project in Eclipse

I had some problems after installing GWT plugin in Eclipse, I've talked about them here but I haven't find useful help for my problem.

So there is another thing here. I have the option to create a Web Application Project . So I create one, give it the name "Demo", I check Use Google Web Toolkit, Use Default SDK 2.6.0, Use Google App Engine, Default 1.9.17 and after that I click Finish.

It generates me a project with 4 packages, 2 of them, Client and Server have that red circle with an x inside them which indicates that there are errors. Each class have them too.

When I click on them, it says:

Syntax error, annotations are only available if source level is 1.5 or greater

and it indicates me to change it. I aprove it, the red dots dissapear after that from classes and packages but one remains on the project directory.

When I run the project it shows this in console:

    Jan 19, 2015 2:09:23 AM com.google.appengine.tools.development.agent.AppEngineDevAgent premain
SEVERE: Unable to load the App Engine dev agent. Security restrictions will not be completely emulated.
java.lang.RuntimeException: Unexpected exception during cast.
    at com.google.apphosting.utils.clearcast.ClearCast$CasterImpl.cast(ClearCast.java:385)
    at com.google.apphosting.utils.clearcast.ClearCast.staticCast(ClearCast.java:252)
    at com.google.apphosting.utils.clearcast.ClearCast.staticCast(ClearCast.java:263)
    at com.google.appengine.tools.development.agent.AppEngineDevAgent.premain(AppEngineDevAgent.java:61)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(Unknown Source)
    at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(Unknown Source)
Caused by: java.lang.IllegalAccessException: Class com.google.apphosting.utils.clearcast.ClearCast$CasterImpl can not access a member of class com.google.appengine.tools.development.agent.$Proxy0 with modifiers "public"
    at sun.reflect.Reflection.ensureMemberAccess(Unknown Source)
    at java.lang.reflect.AccessibleObject.slowCheckMemberAccess(Unknown Source)
    at java.lang.reflect.AccessibleObject.checkAccess(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.google.apphosting.utils.clearcast.ClearCast$CasterImpl.cast(ClearCast.java:383)
    ... 9 more

Can anyone help me? Thank you.

I get this error when I run using Java 1.8 and when I changed it to 1.7, this solved the problem.

Edit: Window -> Preferences -> Java -> Installed JREs. Checked jre7 to make it default.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM