Dana Horst wrote:I run the code in Eclipse. run as - 1 Java Bean.
That's not a Java Bean. You need to use the Run As Java Application option.
You also need to make sure you're running the SubPrinter class and not the Printer class as that's the one with the main method in it.