Hello everyone, I am trying to remake my voice recognition software that I made with C#.NET in Java. The library I want to use is sphinx, I just switched fully to Linux and don't want to get attached to a fully featured IDE just yet (I am using only Atom or LightTable, haven't decided which I like more yet).
I would like to learn how to add a third party library to my project with the command line or with more code. I used 'mvn install' to build the source into a jar, but I don't know what to do from there. If someone could point me in the right direction that would be great!
There is no reason you couldn't use an IDE. Especially when you're using maven, you can build that from command line anytime and every time. Intellij IDEA or Netbeans are the way to go. But if you insist, you can go without them. Now if that library is a jar that you have lying around, you have to install it into your local repository and just add it to pom, it will get resolved. If it's a native shared library, you will need to write a wrapper, pre-process the relevant header files with a jdk included utility and when launching tell java where do you keep native libraries with -Djava.library.path parameter. Maybe there is a plugin that makes working with native libraries easier, but I'm not aware of those, since I never needed to use native libraries
mvn install would have installed the final version in to your local repository (just a directory called .m2 usually). Look in the pom.xml and it will tell you the group id and artifact id of what you have built. From another project you can add it as a dependency to the pom.xml for that project using the group, artifact and version number from before.
Maven can be a bit of a pain to set up but it's good once it's in place. We use it at work all the time. When we get devs saying the tests don't work in Eclipse or IntelliJ we get them to run the mvn build from the command line.
A lot of third party libraries maven will find itself and pull down from the web but if it's not there it's fairly easy to add it yourself... https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html
I should've mentioned this in my original post, but I don't know how to use maven, I just used the library's documentation on how to build it into a jar. Any recommended resources on learning maven?