File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with Inner Classes

 
kevin bennett
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an application that uses inner classes for event handling. The app was developed in VisualAge and works fine there, but for performance tuning reasons I am now attempting to compile and run the app outside of VisualAge. Now for the problem...when I try to compile the following class that contains an inner class I get these errors -
D:\RentalManager\rm\ui>javac -classpath d:\RentalManager;d:\RentalManager\rm;d:\
RentalManager\rm\data;d:\RentalManager\rm\table;d:\RentalManager\rm\ui; RMCustom
erPanel.java
RMCustomerPanel.java:154: cannot resolve symbol
symbol : class RMCustomerPanel$EventHandler
location: class rm.ui.RMCustomerPanel
private RMCustomerPanel$EventHandler evtHandler;
^
RMCustomerPanel.java:164: cannot resolve symbol
symbol : class RMCustomerPanel$EventHandler
location: class rm.ui.RMCustomerPanel
evtHandler = new RMCustomerPanel$EventHandler();
^
2 errors

I don't get it. What's going on? Can anyone help? Thx.
-Kevin
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the problem is your classpath.
If you have a class rm.ui.RMCustomerPanel in package rm.ui (that's what the compiler thinks) then the class path should be
-classpath d:\RentalManager;d:\RentalManager\rm\data;d:\RentalManager\rm\table;
Get rid of the extra stuff that is confusing the compiler. If you take them out it should put the inner class in the d:\RentalManager\rm\ui directory because that is where the outer class is located.
All you really need is the d:\RentalManager; which tells the compiler where is the START of the package directories. I guess that you have something usefull in those other directories, but if they are REALLY lower level declarations of what is a really part of a package name - then get rid of them also.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic