The actual source code needs to be in the classpath ie. in the jar file
Any libraries you access on the client side needs the source code on the classpath because the GWT compiler needs to generate javascript from the source code NOT the class files. From: [email protected] [mailto:[email protected]] On Behalf Of Jason Purcell Sent: 12 March 2010 11:00 AM To: [email protected] Subject: Re: [CTJUG Tech] GWT source question Thanks, Enrico. When you say "The source from the other project will need to be made available as a GWT module", do you mean the following? : <?xml version="1.0" encoding="UTF-8"?> <module> <source path="za.co.mypackage" /> </module> ...or must it be a hard-coded path? Jason. On 12 March 2010 10:27, Enrico Goosen <[email protected]> wrote: Hi Jason, If you want to use classes from another project in an existing GWT project, you need to jar up the classes, including the source. The source from the other project will need to be made available as a GWT module. So the other project will have a mymodule.gwt.xml file. Example: You module file may be in the following package: za.co.mypackage In the project that will be using the module, you use the inherits tag to indicate the module you want to use. <inherits name="za.co.mypackage.mymodule"/> Regards, Enrico ________________________________ From: [email protected] [mailto:[email protected]] On Behalf Of Jason Purcell Sent: 12 March 2010 09:23 AM To: [email protected] Subject: [CTJUG Tech] GWT source question Hi there... If I want to make certain classes available on the client side in GWT, then it has to be in the "client" folder by default. However, I want to be able to use classes from another project. I have access to the source of the project. Apparently I have to specify the source in the module (*.gwt.xml) but I can't get it to work and I don't see any working examples on the internet. Something like this: <?xml version="1.0" encoding="UTF-8"?> <module> <inherits name="com.google.gwt.user.User"/> <inherits name="com.google.gwt.http.HTTP" /> <entry-point class="com.mystuff.web.gwt.client.MainEntryPoint"/> <source path=???????????????????????????> //What format??? Hard-coded? Relative path? Namespace? <!-- Do not define servlets here, use web.xml --> </module> Does anyone know how I can do this, or even specify multiple source locations? By the way, I am using Netbeans 6.8 on Windows, if it helps. Regards, Jason. -- You received this message because you are subscribed to the Google Groups "CTJUG Tech" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] <mailto:ctjug-tech%[email protected]> For more options, visit this group at http://groups.google.com/group/CTJUG-Tech?hl=en For Cape Town Java User Group home page see http://www.ctjug.org.za/ For jobs see http://jobs.gamatam.com/This message is subject to Metropolitans disclaimer pertaining to electronic communications. To view the disclaimer please visit http://www.metropolitan.co.za/disclaimer.asp -- You received this message because you are subscribed to the Google Groups "CTJUG Tech" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] <mailto:ctjug-tech%[email protected]> For more options, visit this group at http://groups.google.com/group/CTJUG-Tech?hl=en For Cape Town Java User Group home page see http://www.ctjug.org.za/ For jobs see http://jobs.gamatam.com/ -- You received this message because you are subscribed to the Google Groups "CTJUG Tech" 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/CTJUG-Tech?hl=en For Cape Town Java User Group home page see http://www.ctjug.org.za/ For jobs see http://jobs.gamatam.com/ This message is subject to Metropolitans disclaimer pertaining to electronic communications. To view the disclaimer please visit http://www.metropolitan.co.za/disclaimer.asp -- You received this message because you are subscribed to the Google Groups "CTJUG Tech" 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/CTJUG-Tech?hl=en For Cape Town Java User Group home page see http://www.ctjug.org.za/ For jobs see http://jobs.gamatam.com/
