Reputation: 7706
I have two projects, Main
and Core
. I have a package called com.package.Sample
(along with its contents) and a class called Sample
in package com.package
. If I were to include both in Main
, I would run into an error with one being unable to resolve - in my actual case it was the Sample
class that could not be resolved. We have ant scripts that builds and that has always worked.
However, carefully examining what was required of each project, I noticed that I could move the package com.package.Sample
into Core
along with its dependencies that were in Main
. The Sample
class technically belonged inside of Main
so I did not move it. This allowed me to build successfully within Eclipse.
A couple of things I'm wondering about:
Sample
class.com.package.Sample
out of Main
. What should I do? Or is this a case of it will never build?Upvotes: 2
Views: 6439
Reputation: 7760
Package names should be all lowercase, class names should start with a capital. Following this practice makes sure that problems like you describe never occur.
Upvotes: 4
Reputation: 3775
To answer your bullets, respectively:
Good luck!
Upvotes: 5