Problem importing new libraries to Java

1

I'm trying to create an application that can interact with a MIDI device, so I'm using the JMusic library, but after putting the .jar file in my Workspace and adding it to the project, the packages from that library do not seem to exist , if I have not been specific in my problem, here is a Print from my screen:

Is it a problem with .jar? I'm seeing a tutorial from a guy, and I downloaded it on the same site as he ...

    
asked by anonymous 23.05.2014 / 03:10

1 answer

1

I know three possible solutions to the problem:

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

The second option would help you organize your dependencies better. In this case you would create a lib folder within your project and copy the * .jar from JMusic to 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 Gradle project and in the configuration file set JMusic as a dependency. During the first build, Gradle will download the library and add it to the buildpath automatically.

    
24.05.2014 / 00:22