I am facing new issue, since the issue is not there till yesterday now when i compiling the project, I am getting unncessary files such as servicestub$Factory.class, servicestub.class actually there is only one java file as servicestub.java file. There are no problems in the problem tab of eclipse. Earlier today i faced a problem of the .class files missing in the war file. This issue is resolve by using this link Cannot change version of project facet Dynamic Web Module to 3.0? but the new problem now i am getting unnecessay .class in one package and this is not there in other package. can anyone help me in sought out this problem
Asked
Active
Viewed 45 times
1 Answers
1
Are you sure there isn't an nested class named Factory within the servicestub.java?
If you have something like
public class Outer {
static class Inner {...} //or no static
...
}
the java compiler will create a Outer.class and a Outer$Inner.class files.

Pablo Lozano
- 10,122
- 2
- 38
- 59
-
Thanks for the quick response. i have inner class how can i avoid it from creating one more class while compiling – ramesh027 Apr 08 '14 at 14:15
-
You can't. Java always creates a class file for each existing class, no matter how your code is written. Even a anonymous class will cause a Outer$1.class file... but I cannot see how this behaviour is a problem. – Pablo Lozano Apr 08 '14 at 14:17