If I have a package called
runtdeale.code in the folder
RuntDeale/resources/code, could I do import
runtdeale.code.libs.org.json.*; to import the JSON library, which is a package below my original package?
RuntDeale: resources: textures: ... ... code: Main.java manifest.txt ... libs: org: json: /* org.json library files */
Top comments (6)
the convention in Maven/Gradle
is to put your code in
and then yes you can import
although star imports are not really recommanded.
Just let your IDE import on the fly what's needed
Would that still remain in the same relative directory to the library as I have it now?
imports are never relative
Which IDE are you using?
With IntelliJ IDEA Community Edition all this stuff is handled for you.
I'm using VSCode.
Also, what folder do I put the library in, then??
What's Maven and Gradle? Huh?
A build system for Java - and Kotlin