I have two different gwt projects, and want to use classes of one gwt application in to an another module. Is there any way to do that?
I followed the below approach, added below two lines in the second project
<inherits name="com.yellowbook.mdb.NationalResidential"/>
<source path='com.yellowbook.mdb' />
but i am getting the following error:
Unable to find 'com/yellowbook/mdb/NationalResidential.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?
did i miss any thing here?
If you want to use a one project into another one, then following are some of possible ways:
First approach
If you are using two projects as a separate module i.e. GWT Module, then you can create a package structure for common code and add entry into gwt.xml file.
ProjectModule1.gwt.xml
ProjectModule2.gwt.xml
Second approach
If you created separate project for this, then
In development:
Add module entry in gwt.xml file, i.e.
Also if you working with eclipse, then add required project in build path for development
In Production:
But if you go with second approach, then it is not a very good approach, because when you want to load a project1 then project2 auto load and unnecessary javascript will load, so better to use module approach, or create a third project which has a common code of project1 & project2 and use it in both projects.