• 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
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

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
18
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
18
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
 
Can you really tell me that we aren't dealing with suspicious baked goods? And then there is this tiny ad:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!