Getting a library for proper import into netbeans

So, I want to chat with the library that I just downloaded with the name stdlib.jar(downloaded from http://introcs.cs.princeton.edu/java/stdlib/ )

So, I added the library to the project, and when I check the project, it looks like this: netbeans: package inspector in netbeans

So it seems that the library is configured correctly.

But then in my project, when I try to use one of the library classes, it looks like this.

My Custom Audio Player Class

Moving over the import statement at the top says expected "."
And if I changed the import statement to say import stlib.StdAudio , it says the library does not exist.
Does any body know what the problem is?

+4
source share
3

( : , ) , , - , . .

StdAudio.play(tone);

, , , NetBeans.


. , . :

Q. , stdlib.jar. ?
A. stdlib.jar " ". Java . , , .

, musicplayer.

+1

1) import.

2) .

3) musicplayer.java /src

4) stdlib.jar

+1

Sedgewick Coursera, .

, stdlib.jar . Java . . , musicplayer.java ./src/MUSICPLAYER/ . /src , MUSICPLAYER. " MUSICPLAYER"; ().

, , . , "stdlib.jar" , . "".

0

All Articles