Eclipse sharing a group of classes between projects



I have a small Java application with a few classes. I used Eclipse and created a new "project" and put the classes in the default package.

Then I decided a couple of the classes would be useful in other of my applications so I created a new "project" and created a package "org.foo.bar.utils". I copied the reusable classes here and deleted them from the original project.

I tried various settings in "Project" "Properties" but cant get the application to compile and run now.

In "Project", "Properties", "Libraries" I used the "Add Class Folder" and ticked the box for "org.foo.bar.utils". The app comiles now but at runtime I get "NoClassDefFoundError".

I've tried a few other things such as adding "org.foo.bar.utils" as a library and inserting an import statement but am not getting any joy.

Is there an idiots guide to this?
.



Relevant Pages

  • Re: (OT) In search of a definition
    ... primarily works under Windows XP, I am in search of a "good ... a package was NOT part of the language. ... without looking for something to formulate a hostile response from. ... use in Java is the same as its use in C or other languages. ...
    (comp.lang.cobol)
  • Re: [eclipse] Errors with import or package
    ... Franz Mayer wrote: ... > I have a odd problem with eclipse 3.0.1 for Win. ... > When I import some of my package or class, ... Go into your project properties (make sure it's a Java project), ...
    (comp.lang.java.programmer)
  • Re: (OT) In search of a definition
    ... a package was NOT part of the language. ... without looking for something to formulate a hostile response from. ... use in Java is the same as its use in C or other languages. ...
    (comp.lang.cobol)
  • Re: Development setup under Ubuntu
    ... would like to learn java using Eclipse. ... and the GNU gcj package, thinking the GNU solution was the way to go. ... I tend to install everything in /usr/local This lets me ...
    (comp.lang.java.programmer)
  • building java rpm
    ... I am trying to build a java rpm based on the nosrc.rpm from jpackage.org ... chmod -R u+w bin CHANGES COPYRIGHT javaws lib LICENSE man plugin ... This package contains source files for %. ...
    (Fedora)