Make a .java file Portable -


i writing source code library supposed included in various different projects. ideally can include library different projects, gets me 'package' statement in library.

if specify package my_package, end assuming directory structure. each project has different directory structures. makes impossible incorporate different projects.

you misunderstand how libraries used in java.

you not copy source code of library whatever project want use on. library separate project compiled jar file, , in projects want use library put jar file library on classpath.

for project uses library, doesn't matter package library in. long jar on classpath, can import classes library.

there many thousands of free , open source libraries java available, , project uses multiple third-party libraries.


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Restarting Supervisor and effect on FlaskSocketIO -