How can I develop my own Java library?

Are there any good tutorials / starting points you can offer me for developing my own Java libraries?

(I am now thinking of developing a small graphics library.)

Thanks.

+6
source share
3 answers

How can I develop my own Java library?

As you probably know, the Java library is usually just a jar file containing some utility classes aimed at solving problems at a higher level of abstraction than what the classes do in the Java Platform API. So, technically speaking, you just write classes that you find useful in your library, compile them, compile them, and write good documentation.

Are there any good tutorials / starting points you can offer me for developing my own Java libraries?

Writing useful libraries is difficult. Instead of thinking about what would be a beautiful design inside, you should think about what would be a nice design for the client.

I suggest you google for java api design. Here are some useful hits:

+12
source

This is a very general question. What exactly do you want to know? The development of the library is not much different from the development of any other application.

Libraries are usually packaged in JAR files. You pack the class files into a JAR file using the jar tool (if you are using an IDE, it may have a way to do this from the IDE).

See Oracle's very good Java Tutorials for a lot of different Java programming topics. Java already has a complete graphics API, which you can learn more about in the 2D Graphics tutorial.

+2
source

There is a good guide here on how to create your own API.

The hardest part of any API design is to develop as many use cases as possible and provide interfaces so library users can override standard implementations (where applicable).

+2
source

Source: https://habr.com/ru/post/891474/


All Articles