advertisement

Article:
  Write Twice, Run Anywhere
Subject:   Write Twice, Run Anywhere
Date:   2002-09-22 18:50:11
From:   anonymous2
Daniel
Your Java instruction in every case has been very helpful and I always look forward to your next tutorial. I created the Write Twice, Run Anywhere program in Project Builder on the Mac and wanted to comment on a few things.

1) When I compiled and ran the program in your first example (e.g. before the Arrrg!), the menu was not on the frame itself, it was where it was supposed to be (Arrrg - not!)???


2) I realized that creating a New Group in Project Builder does not create a new directory folder. However, I was able to create folders in the directory (MacGUI, WindowsGUI, commonGUI) and then use Show Info to change the classpath.


3) Although the program compiles, I haven't been able to build the application and I'm wondering if the following method could be the culprit (needs an " if "??). The log is referenced below. Thanks again for the tutorial instruction.


private JMenuBar getCorrectMenuBar(){
System.setProperty("com.apple.macos.useScreenMenuBar","true");
return new MacJMenuBar();
} else return new WindowsJMenuBar();
}


[LaunchRunner Error] MainFrame.main(String[]) threw an exception:
java.lang.NoClassDefFoundError: commonGUI/OpenMenuItem
at MacGUI.MacJMenuBar.<init>(MacJMenuBar.java:8)
at MainFrame.getCorrectMenuBar(MainFrame.java:17)
at MainFrame.<init>(MainFrame.java:10)
at MainFrame.main(MainFrame.java:23)
at java.lang.reflect.Method.invoke(Native Method)
at com.apple.buckyball.app.LaunchRunner.run(LaunchRunner.java:82)
at com.apple.buckyball.app.LaunchRunner.callMain(LaunchRunner.java:44)
at com.apple.buckyball.app.CarbonLibApp.launch(CarbonLibApp.java:67)



1 to 1 of 1
  1. Daniel H. Steinberg photo Code correction --
    2002-09-23 09:51:41  Daniel H. Steinberg | O'Reilly AuthorO'Reilly Blogger [View]

1 to 1 of 1