Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

GWT with arrayDeque and StringTokenizer Problem

 
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?
 
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • 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
Bartender
Posts: 11445
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about String#split() instead of tokenizer
 
I'm sure glad that he's gone. Now I can read this tiny ad in peace!
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic