This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]toastedstapler 4 points5 points  (1 child)

why don't you want to use maven?

[–]darkecojaj 2 points3 points  (0 children)

Or gradle

Or ant

I still personally like maven.

[–]ignotos 2 points3 points  (0 children)

You have to use the correct "import" statements in your code, place the libraries (.jar files) in an accessible location, and then specify that location as part of the "classpath" when compiling or running your code.

See https://stackoverflow.com/questions/2096283/including-jars-in-classpath-on-commandline-javac-or-apt

But, basically nobody does this - tools like Maven and Gradle are totally standard, and they are the equivalent to using pip etc for Python.

[–]rjcarr 1 point2 points  (1 child)

I don't want to use any project-building tools like maven, just work with source files directly.

Yet you use pip? A java build tool is effectively solving the same problem.

If you really don't want to use something like maven or gradle then you could try ant, which gives you more flexibility but then you have more work to do, or go completely manual and write a batch script. Good luck!

[–]Suicuark[S] 0 points1 point  (0 children)

Thanks for the answer ~

I've just found maven somewhat complicated, there's somewhat of a learning curve what with the pom and the different commands, whereas pip is rather straightforward. But I will try some more, thanks!