0

I am rather new to programming and have never used a secondary source as I am using right now and need help. I am trying to use jaudiotagger (http://www.jthink.net/jaudiotagger/index.jsp) in a java program that I am writing but am not having any luck in accessing the classes that the service provides. I feel as though I am going about this entirely wrong; I've gone to https://bitbucket.org/ijabz/jaudiotagger/downloads/ and downloaded the "jaudiotagger-2.2.6-SNAPSHOT.jar" file, inserted this into the folder with my code and then tried importing as follows:

package jaudiotagger.src.org.jaudiotagger.audio;

import jaudiotagger.src.org.jaudiotagger.audio.AudioFile;

as an example for trying to import the AudioFile class, however that returns the error

audiotagger.java:7: error: cannot find symbol
import jaudihotagger.src.org.jaudiotagger.audio.AudioFile;

I have gone through the file directory on the link that I have provided and that is the location of the AudioFile script, however it still does not work.

I have never done anything like this before so I'm sorry if I'm missing some key conceptual stuff. I have also visited the previously asked question Add JAudiotagger Library to Java on Windows 7 however I don't know how to do the process that the user provided.

Spatrico
  • 129
  • 2
  • 10
  • Don't try and put your class in their package; and the correct import would be `import org.jaudiotagger.audio.AudioFile;` - as for how to use it, you would need to read their documentation. – Elliott Frisch Jul 09 '19 at 04:27
  • thank you for your reply. Sorry what do you mean by don't put my class in their package? how else do I access it? Also does the import you provided also go for the package? – Spatrico Jul 09 '19 at 04:30
  • You write code in your own package (don't use theirs). By importing it the class you want to use. Of note is that `import` doesn't actually exist at the byte code level. It just saves you typing `org.jaudiotagger.audio.AudioFile audioFile = new org.jaudiotagger.audio.AudioFile(x);` or similar. At the byte code level, every class is fully qualified. – Elliott Frisch Jul 09 '19 at 04:33

0 Answers0