Tasbeer
Tasbeer

Reputation: 408

Error in eclipse : Import javax.sound.sampled.* cannot be resolved

I am trying to run a project in which a file uses the line

import javax.sound.sampled.* ;

When I try to compile it in Eclipse (running on Ubuntu) it shows the error that this line cannot be resolved. Can anyone help me out how to install this package.

Upvotes: 0

Views: 4049

Answers (2)

Shreeraj Salunkhe
Shreeraj Salunkhe

Reputation: 11

Try this

•Go to Project -> Properties -> Java Build Path •Select Libraries tab •Select the JRE entry •Workspace Default jre -> Finish

Upvotes: 1

Powerlord
Powerlord

Reputation: 88806

Make sure you have the openjdk-6-jdk/default-jdk (karmic and newer) or sun-java6-jdk (karmic and older) package installed. If it's not installed, it should show up in the Package Manager app, or through the aptitude command-line program (aptitude install openjdk-6-jdk)

default-jdk is a newish meta-package that should install the recommended JDK for your system, but this is likely always going to be openjdk-6-jdk, as it's the GPLv2 version of Sun's JDK.

Upvotes: 1

Related Questions