ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Building Cocoa-Java Apps with Eclipse
Subject:   Having a problem setting up Debugging
Date:   2006-07-20 19:52:42
From:   meclyma
Response to: Having a problem setting up Debugging

Mike,


I found the original Controller.java file. I copied the code into a new file under the TextEdit folder in Eclipse (it was placed under a default package). Then I received several errors in Controller.java. Here are a few of the lines with errors:


    Under applicationShouldTerminate method:

Document document = Document.documentForWindow(window);
The error is on "Document"


Preferences.saveDefaults();
The error is on "Preferences"


    Under applicationOpenFile method:

return Document.openDocumentWithURL(NSPathUtilities.URLWithPath(filename),
The error is on "Document" (there are other errors on this line that I won't list here).


There are more errors in Controller.java that I will not list here because they are similar errors. I am not sure if all of these errors are part of JAVA classes or Cocoa classes (I suspect Cocoa classes). Do I need to add more "import"'s to Controller.java? Or do I need to tell Eclipse where to find the Cocoa library? If the latter, is this because I created a new Java file and copied the code into a new file that Eclipse is confused on (and obviously this developer too)? In your article you showed us how to tell Eclipse where to find the Cocoa classes by creating a

    new
folder called "Cocoa". But how do you link a newly created Java file to the Cocoa classes when the Cocoa folder already exists?


BTW, I forgot to mention that I am using: Eclipse 3.2.0, MacOS X 10.4.6, Xcode 2.3, and JAVA 1.5.


Thanks.


Mark


1 to 1 of 1
  1. Having a problem setting up Debugging
    2006-07-21 02:40:02  mikebutler1 [View]

1 to 1 of 1