tags:

views:

663

answers:

3

I have an existing Java project in Netbeans (a JSF web application). I'd like to experiment with GWT in a separate project - put pull in source from the original project. Is there any way to share source between two Netbeans projects.

When I attempt to add the source directory from the original project into the new the IDE complains that the source is already part of another project.

+1  A: 

If you're only experimenting then copy the necessary part of the existing project to a different directory. Of course changes won't be synchronized later.

If you'd like to keep both projects alive then create a separate project with the common code, and use it as a library.

asalamon74
A: 

Use source control. With CVS, use modules. With Subversion, use svn:externals.

James Schek
A: 

Alternatively, try moving the source folder outside both project folders. Then add the source to each project. Do not have both projects open at the same time.

James Schek