Also, the eclipse build path, which is used by eclipse and for doing things like auto-completion, doesn't necessarily make it to the classpath seen by java, which needs to be configured under the Run Configuration to be seen by the GWT compiler. And finally, as Shrisha mentions, the GWT compiler used for client side code will not work on arbitrary Java libraries - certainly not Apache Tomcat! Only libraries that conform to GWT compiler restrictions, and are packaged to include the source code, can be used for client-side code. Server code, on the other hand, is not restricted. The restrictions are enumerated here:
http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsCompatibility.html On Apr 25, 7:40 am, Shrisha Chandrashekar <[email protected]> wrote: > One cannot access other third party libraries from inside gwt code, you can > access them from only the server side code. If you want to use the third > party libraries you will need to create corresponding Javascript objects > corresponding to those libraries you want to use. > > On Tue, Mar 2, 2010 at 1:22 AM, Trick Magnet J Slice <[email protected] > > > > > wrote: > > Hey everyone, > > > I am attempting to create a GWT project, but it also needs to tie in > > with many 3rd party JARs and packages that are also used by other > > services I maintain. I've set up my project, and had it running in the > > native GWT deployment mode, and I then got it deployed on tomcat. So > > far its just a dumby UI, no server communication or anything on the > > backend. > > > Within eclipse I have a library imported in the project called "Apache > > Tomcat v6.0", and this does contain all the jars i need, and those > > jars have all the packages in question. > > > Heres the problem: > > > When I try to reference anything in those packages from myProject.java > > within com.myProject.client, I get an error. The import of the class > > works at the top of the file, and eclipses predictive assistance even > > displays all the methods etc that can be used with a class as im > > typing it. However, when I goto compile I get the classic: > > > "No source code is available for type > > net.me.myProject.myProjectsConstants; did you forget to inherit a > > required module?" > > > Now, I have tried adding <inherits > > name="net.me.myProjects.myProjectsConstants"/> to the > > myProject.gwt.xml file, at which point I get the also classic: > > > Unable to find 'blah blah' on your classpath; could be a typo, or > > maybe you forgot to include a classpath entry for source? > > > As stated, I just need to be able to call the methods, constants, > > classes etc etc that are in the Jars within the library that IS > > showing up in eclipse, but for some reason at compile time errors are > > occurring. > > > Any help would be an absolute lifesaver... thanks! > > > -- > > You received this message because you are subscribed to the Google Groups > > "Google Web Toolkit" group. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]<google-web-toolkit%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-web-toolkit?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group > athttp://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
