-4
Ex: I have a. jar file that I need to import in order to access the api, how do I do it right in the code? I don’t know if I was specific, but how? (No IDE)
-4
Ex: I have a. jar file that I need to import in order to access the api, how do I do it right in the code? I don’t know if I was specific, but how? (No IDE)
2
You can pass some parameters at build time:
javac -classpath lib/bar.jar com/example/Foo.java
In this scenario, your class Foo.java
depends on the jar bar.jar
.
If you’re using a project that doesn’t use any dependency manager, it gets really complicated to work with.
I recommend taking a look at Maven or in the Gradle. They make it easier when you have external dependencies on the project.
Browser other questions tagged java
You are not signed in. Login or sign up in order to post.
In addition to compiling, only running =D was missing
– Jefferson Quesado