• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse - how to import classes?

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to get this
OSXadapter to work so my swing application can say "are you sure" before closing in OS X, like it does already in Windows.
I tried to import the classes with "import filesystem", and I can see the .class files in the "Navigator" view, but when I try to compile I get the error "package com.apple.eawt does not exist".
Any help will be appreciated.
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Roy,
Welcome to JavaRanch!

I'm assuming you imported those classes into a new project. Did you update the build path of your Swing project to reference this new project?
 
Saloon Keeper
Posts: 27752
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. Right-click on your project's icon
2. From the pop-up menu, select "Properties" (ALT+Enter)
3. In the properties dialog, select "Java Build Path"
4. Click on the "Libraries" tab
5. If the jar in question is part of your project directory tree, select "Add JARs...". If it is not, select "Add External JARs"

You can probably guess what comes next. Once you've added the JAR, it will show up in the list of jars and class folders. Select OK, and expect to be notified that the project must rebuild itself (in order to take advantage of your new definition).
 
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic