How to create globally available libraries in Java?
What I mean is, in Java there is a standard set of packages that can be referenced from any program in any context on the computer. So when I want to process raster images I just add import java.awt.image.BufferedImage to the top of my file and I able to use that pre-built class without referencing the actual java.awt.image package files at all during compilation and run time. Where are these globally importable packages kept and/or how can I make my package files globally available in the same way?
I have been writing a lot of small helper programs lately, most of which do very similar things, and it would be convenient for me to be able to reuse code without explicitly referencing my package files.
Thanks for any help.
you CAN place any jar library you want into your JRE to achieve same result - classes from this jar will be available in classpath at runtime though it is not recommended to do so without a reason :) But if you are just learning and do not want bother with build tools it's OK
[java-home]/lib/ext - standart place for your libraries [java-home]/lib/endorsed - place for the libraries which API's overwrite default JRE's ones