0

I have:

abstract class Menu extends JFrame

class IncomeMenu extends Menu

Everything works perfectly if both classes are in the same folder, but as soon as I move the Menu class to a separate folder (that I created to store all the abstract classes) I get an error. The prompt asks me to turn my IncomeMenu into an abstract class too and at runtime i get this error: java.lang.ExceptionInInitializerError.

Any tips on how I can solve this problem?

  • Hi, can you share the sources please? – Yassin Hajaj Apr 11 '21 at 14:42
  • @YassinHajaj Hi, sources like my jar files or source code? – Michael Shi Apr 11 '21 at 15:07
  • No just the source code please, and possibly the project file structure – Yassin Hajaj Apr 11 '21 at 15:08
  • @YassinHajaj the program got even weirder, i moved the Menu class back to the GUI folder and it gave me this error: java.lang.RuntimeException: Uncompilable source code - Erroneous sym type: brokeatm.GUI.IncomeMenu.setVisible. But the ExpenseMenu, which is exactly the same as the IncomeMenu, works perfectly... – Michael Shi Apr 11 '21 at 15:32
  • @MichaelShi [1] See [Uncompilable source code - Erroneous sym type](https://stackoverflow.com/q/35114025/2985643) for a solution regarding the strange error you mentioned in your comment. [2] While you have provided the additional information requested, you have incorrectly done that within an answer. Please update your question with that information instead, and delete your answer. – skomisa Apr 13 '21 at 00:30

0 Answers0