Ex: I have a .jar file that I need to import to get access to api, how do I get it right in the code? I do not know if I was specific, but how? (Without IDE)
Ex: I have a .jar file that I need to import to get access to api, how do I get it right in the code? I do not know if I was specific, but how? (Without IDE)
You can pass some parameters at compile time:
javac -classpath lib/bar.jar com/example/Foo.java
In this scenario, your Foo.java
class depends on the bar.jar
jar.
If you are using a project that does not use any dependency manager, it is quite complicated to work with.
I recommend taking a look at Maven or Gradle . They make it easier when you have external dependencies in the project.