Problem importing new libraries into Java

Asked

Viewed 1,218 times

1

I am trying to create an application that can interact with a MIDI device, for this I am using the Jmusic library, but after putting the file . jar in my Workspace and have it added to the project, the packages in that library seem not to exist, if I haven’t been specific in my problem, here’s a Print of my screen: inserir a descrição da imagem aqui

is it problem with the . jar? I’m seeing a tutorials of a guy, and I downloaded on the same site as him...

  • 2

    The red exclamation on your project folder icon indicates that you have a problem with your Build Path. Click on the Problems tab and it will give you more details, edit your question and add the information that this tab tells you.

1 answer

1

I know three possible solutions to the problem:

In Eclipse, right-click on your project folder and follow the path: Build Path > Configure Build Path. On the tab Libraries press the button Add External JARs and select *.jar from JMusic.

The second option would help you better organize dependencies. In this case you would create a folder lib within its design and would copy the *.jar of the JMusic there. After that you right click on the JAR and follow the path: Build Path > Add To Build Path.

A more elegant solution however, is to create a project Gradle and in the configuration file set Jmusic as dependency. During the first build Gradle will download the library and add it to the Buildpath automatically.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.