DEV Community

loading...

Discussion on: Can I import local class files in Java, like you can Python?

Collapse
baenencalin profile image
Calin Baenen Author

Question, 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?

Filesystem:

RuntDeale:
    resources:
        textures: ...
        ...
        code:
            Main.java
            manifest.txt
            ...
            libs:
                org:
                    json:
                        /* org.json library files */
Enter fullscreen mode Exit fullscreen mode