Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GWT with arrayDeque and StringTokenizer Problem

 
Harold Eugenio
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm new in GWT designer and Java and I'm trying to create a GUI for my previous Solitaire project. The thing is, whenever I used ArrayDeque and String Tokenizer in my project, it shows this error even though I imported the java.util in my project:

[ERROR] [com.haroldGWT.solitaire.GWTSolHarold] - Line 7: No source code is available for type java.util.ArrayDeque<E>; did you forget to inherit a required module?

So I added this to my xml file to eliminate the error:

<inherits name="com.java.util.*"/>

The error for ArrayDeque disappeared but when I try to run my project, it shows a new error:

[ERROR] [com.haroldGWT.solitaire.GWTSolHarold] - Unable to find 'com/java/util/*.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?

Could anyone help me out please?
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

While developing GWT applications, it is important to remember, that though you write java code, finally it is translated to JS. GWT has restrictions on which java classes you can use. More info on it here http://code.google.com/webtoolkit/doc/1.6/DevGuideCodingBasics.html#DevGuideJavaCompatibility
 
Harold Eugenio
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does this mean I can't use ArrayDeque and StringTokenizer? I could substitute stack for ArrayDeque but how about StringTOkenizer? Any suggestions?
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about String#split() instead of tokenizer
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic