Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the functionality of dt.jar file in Java?

Tags:

java

jdk1.8.0

I want to know the functionality of dt.jar file in java which is located in jdk/lib folder. I have read oracle official documentation but can't understand their talk given below

"dt.jar, the DesignTime archive of BeanInfo files that tell interactive development environments (IDEs) how to display the Java components and how to let the developer customize them for an application."

Can anybody explain this to me?

Thanks in advance.

like image 203
Shaikh Hafiz Ahamed Avatar asked Feb 10 '17 15:02

Shaikh Hafiz Ahamed


People also ask

What are the benefits of making JAR file?

The JAR File format provides the following benefits. By providing a digital signature in our JAR File, we enhance the security of Java files; as the authorized user who recognize our signature can access the files. It is easy to handle, create, maintain, update, etcetera. so the JAR tool is used to compress the size.

Why do we need JAR file in Java?

JAR files are packaged with the ZIP file format, so you can use them for tasks such as lossless data compression, archiving, decompression, and archive unpacking. These tasks are among the most common uses of JAR files, and you can realize many JAR file benefits using only these basic features.

What is JDK jar?

Description. The jar command is a general-purpose archiving and compression tool, based on the ZIP and ZLIB compression formats. Initially, the jar command was designed to package Java applets or applications; however, beginning with JDK 9, users can use the jar command to create modular JARs.

What is inside JAR file?

The JAR file contains the TicTacToe class file and the audio and images directory, as expected. The output also shows that the JAR file contains a default manifest file, META-INF/MANIFEST. MF, which was automatically placed in the archive by the JAR tool.


1 Answers

The dt.jar library is used by IDE applications to help design Swing GUI.

Hence, it is useful at design time , and is not to be included at runtime.

The jar contains BeanInfo classes for the Swing components, along with images representing the components.

From the Java Examples in a Nutshell, 3rd Edition book (Chapter 15.4 : Custom Events), by David Flanagan :

This BeanInfo class specifies a number of pieces of information for our bean:

  • An icon that represents the bean.
  • A BeanDescriptor object, which includes a reference to a Customizer class for the bean. We'll see an implementation of this class later
    in the chapter.
  • A list of the supported properties of the bean, along with a short description of each one. Some beanbox tools (but not Sun's beanbox)
    display these strings to the user in some useful way.
  • A method that returns the most commonly customized property of the bean; this is called the "default" property.
  • A reference to a PropertyEditor class for one of the properties.

This helps IDEs to provide useful graphical design tools using those bean components :

enter image description here

You may find more information here : Bean Customization

like image 138
Arnaud Avatar answered Oct 07 '22 15:10

Arnaud