File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes GWT and the fly likes GWT with arrayDeque and StringTokenizer Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "GWT with arrayDeque and StringTokenizer Problem" Watch "GWT with arrayDeque and StringTokenizer Problem" New topic
Author

GWT with arrayDeque and StringTokenizer Problem

Harold Eugenio
Greenhorn

Joined: Jan 29, 2011
Posts: 2
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

Joined: Jul 26, 2007
Posts: 10535
    
    9

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


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Harold Eugenio
Greenhorn

Joined: Jan 29, 2011
Posts: 2
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

Joined: Jul 26, 2007
Posts: 10535
    
    9

How about String#split() instead of tokenizer
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GWT with arrayDeque and StringTokenizer Problem