0

I have an external .class file. I added this through:

Right Click to project>BuildPath>Configure Build Path>Libraries>Add External Class Folder

This is my folder structure. I am supposed to create an instance of SOS class. But I got errors in compilation. Where is the problem ?

enter image description here

My SOS.class file is located in desktop, inside Classes folder

funky-nd
  • 637
  • 1
  • 9
  • 25

1 Answers1

0

Give a package name for SSO class.Compile that and then add it in reference library.

In Test.java write

import your.packge.name.SSO;

avoid using default packages when you want to import classes from them.

user2408578
  • 464
  • 1
  • 4
  • 13
  • I can't see refactor option for default package :( how will i give it a name – funky-nd Apr 01 '15 at 14:35
  • Test is in the default package, so it should be able to reference SOS. It's only if you want to import the class from a class in a non default package that you get issues. – Antimony Apr 01 '15 at 15:11