Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The easiest way is to simply download the jar of jAutioTagger and put it in your classpath, so when the program launch, the classes in the jar should be accessible: <a href="http://www.leepoint.net/notes-java/background/13files_and_directories/20classpath.html" rel="nofollow">java classpath</a></p> <p>Now if you want a more generic way of handling dependencies altogether, i suggest you start reading about <a href="http://maven.apache.org/" rel="nofollow">maven</a> (which a build tool with dependecny managment).</p> <p>You can also use <a href="http://www.gradle.org/" rel="nofollow">gradle</a> which looks more for groovy but I do not know about it.</p> <p>As for starting a new project with maven it requires some steps. Here is a lightweight tutorial:</p> <ol> <li>Create a maven project</li> <li>Add the desired dependencies in your pom.xml</li> <li>Build the project with libraries embedded</li> <li>Run the program</li> </ol> <h3>Create a maven project</h3> <p>Type in the following command in your command line:</p> <blockquote> <p>mvn archetype:generate -DarchetypeGroupId=org.apache.maven.archetypes -DarchetypeArtifactId=maven-archetype-quickstart -DarchetypeVersion=5-SNAPSHOT</p> </blockquote> <p>It will ask you some questions like the group id and the artifact id as well as the project name.</p> <h3>Add the desired dependencies in your pom.xml</h3> <p>The pom.xml is where you configure your project, like build things and dependencies, to have audiotagger as a dependency add the following:</p> <p></p> <blockquote> <pre><code> &lt;dependency&gt; &lt;groupId&gt;org.jaudiotagger&lt;/groupId&gt; &lt;artifactId&gt;jaudiotagger&lt;/artifactId&gt; &lt;version&gt;2.0.1&lt;/version&gt; &lt;/dependency&gt; </code></pre> <p></p> </blockquote> <p>This will add jaudiotagger to the dependencies of your project, you can add groovy as well. You'll also need dependencies too groovy and the <a href="http://groovy.codehaus.org/Groovy-Eclipse+compiler+plugin+for+Maven" rel="nofollow">groovy compiler</a>.</p> <p><em>Hint</em>: I use <a href="https://repository.sonatype.org/index.html" rel="nofollow">sonatype</a> to find dependencies</p> <h3>Build the project with libraries embedded</h3> <p>Now to build your project with maven. Just type the following command:</p> <blockquote> <p>mvn clean install</p> </blockquote> <p>but this will not add the dependencies to your jar, so you need to embedd them by adding a plugin to your pom.xml configuration:</p> <p></p> <blockquote> <pre><code> &lt;artifactId&gt;maven-assembly-plugin&lt;/artifactId&gt; &lt;configuration&gt; &lt;archive&gt; &lt;manifest&gt; &lt;mainClass&gt;be.phury.audiotagger.Audiotagger&lt;/mainClass&gt; &lt;/manifest&gt; &lt;/archive&gt; &lt;descriptorRefs&gt; &lt;descriptorRef&gt;jar-with-dependencies&lt;/descriptorRef&gt; &lt;/descriptorRefs&gt; &lt;/configuration&gt; </code></pre> <p></p> </blockquote> <p>You can now generate a jar with dependencies by typing in the command line:</p> <blockquote> <p>mvn clean install assembly:single</p> </blockquote> <h3>Run the program</h3> <p>Just run the jar</p> <p>Hope this helps</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload