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

Need Your Help

Interaction between XUL windows

xul firefox-addon

I'm a beginner with XUL. I have the following problem.

Angular-ui-bootstrap - Date Picker - How can I restrict access to the date-selector in popup?

angularjs angular-ui angular-ui-bootstrap

At the moment, I can first select the year, then the month, and then, the date. However, I only need access to month and the year. I'm not sure how to disable the date-selector option.