Alan2
Alan2

Reputation: 24572

Where can I find a list of the Java Standard libraries?

I am new to Java and trying to learn more about it. I studied the documentation and found the following for Java,

Java Docs

Are the packages listed here the same as standard libraries?

Upvotes: 33

Views: 82245

Answers (4)

llf
llf

Reputation: 630

In Java 9+, javafx replaces javax as the main UI library:

  1. Is JavaFX replacing Swing as the new client UI library for Java SE?

    Yes. However, Swing will remain part of the Java SE specification for the foreseeable future, and therefore included in the JRE. While we recommend developers to leverage JavaFX APIs as much as possible when building new applications, it is possible to extend a Swing application with JavaFX, allowing for a smoother transition.

JavaFX FAQ - Oracle.

Upvotes: 1

Kaushik Shankar
Kaushik Shankar

Reputation: 5619

Yes. That is the library that Java's creators have provided.

here is a list of things to know:

  • java.lang is for all the basic classes that are actually imported automatically (implicitly) because it is all the basic ones (String, Integer, Double, etc)
  • java.util contains all your data structures you learned in school and more. Read the documentation, and the more you know and practice, the better
  • java.io for file reading. Look into java.util.Scanner for simple file reading, but for any more complicated, low level file reading info, use java.io, its built for efficiency, while Scanner is for simplicity
  • java.math if you ever need to use arbitrary precision values (built-in in python, not in java)
  • java.net for sockets, connections, etc
  • javax.swing for GUI, which is an extension of the older java.awt

Hope that helps.

Upvotes: 58

UVM
UVM

Reputation: 9914

When you install Java, there will be a .zip file which contains the source of the standard library called, src.zip in root folder.These are the standard library.

Upvotes: 3

Surender Thakran
Surender Thakran

Reputation: 4054

Yes they are the same. This library is also downloadable if you want to view it offline. Also there should be a src.zip file in your java installation files. On unzipping it you will find the source code of all the standard library classes. Also the Java Language Specification should help you.

Upvotes: 3

Related Questions