Robert
Robert

Reputation: 1117

imported classes not working

I'm doing a calculator tutorial online, and there is two separate classes that need to be imported into the main class I put the two classes in a new package in the scr folder and tried importing them into main class like so

import com.example.brkyclasses.Alertwindow;
import com.example.brkyclasses.Calculator2; 

Eclipse is still asking me to create methods when the methods are in the two classes is there something else i need to do, do i need to add these two classes to manifest or something else

Upvotes: 0

Views: 74

Answers (2)

TronicZomB
TronicZomB

Reputation: 8747

Those are package specific imports. You need to look in your manifest xml and see what your package name is under the package tag (should be like 3rd line). And then you will probably create some file called Alertwindow and Calculator2 and so you will import your own classes. using the package.name.Alertwindow format.

Upvotes: 1

Andrey Butov
Andrey Butov

Reputation: 2279

You need to add either the source code for those classes, or the .jar file that those classes are implemented in, to your project. If you included the .jar, you need to edit your project settings and specify the location of the .jar

Upvotes: 1

Related Questions