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.
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.
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.
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.
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.
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 :
You may find more information here : Bean Customization
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With