Reputation: 15
I was having trouble importing classes, I was able to import the normal java classes, but unable to import foreign classes. Picture of imports in Eclipse
Upvotes: 0
Views: 48
Reputation: 1376
Your picture shows, that DeflateSerializer class is in wrong package.
The first line is not matching the package name, you should rename it (the default package), so that it matches.
Your picture shows that you have no dependency to the library or project, which contains the "esotericsoftware" classes. So you need to import them:
Right click with mouse on your project => "Properties"
In the following window select "Java Build Path" and then tab "Libraries".
Here you can add for example jar files to your project, which contain the imported classes.
Or you could use a build tool like Maven or gradle, but based on your question this is something for the future.
Upvotes: 0