JCL and JVCL: The Ultimate JEDI Libraries for Enhancing Your Delphi/C++ Builder Applications
JEDI: JCL JVCL up to Delphi 10.3 Rio
If you are a Delphi or C++ Builder developer, you might have heard of JEDI, or Joint Endeavour of Delphi Innovators. JEDI is a community of developers who create and share open source libraries and components for Delphi and C++ Builder. In this article, we will introduce you to two of the most popular and useful JEDI libraries: JCL (JEDI Code Library) and JVCL (JEDI Visual Component Library). We will also show you how to install and use them in your projects, up to Delphi 10.3 Rio.
JEDI: JCL JVCL up to Delphi 10.3 Rio
What is JEDI?
JEDI stands for Joint Endeavour of Delphi Innovators. It is a community project that aims to provide high-quality open source software for Delphi and C++ Builder developers. JEDI was founded in 1998 by a group of Delphi enthusiasts who wanted to share their code and knowledge with other developers. Since then, JEDI has grown into a large and active community that maintains several projects, such as:
JCL (JEDI Code Library): a collection of non-visual classes and functions that enhance the functionality of the Delphi/C++ Builder RTL and VCL.
JVCL (JEDI Visual Component Library): a library of over 600 visual and non-visual components that extend the capabilities of the Delphi/C++ Builder VCL.
JVCS (JEDI Version Control System): a version control system designed for Delphi/C++ Builder projects.
JWSCL (JEDI Windows Security Code Library): a library that provides access to Windows security features, such as tokens, privileges, ACLs, etc.
JWA (JEDI Windows API): a library that wraps the Windows API headers for easier access from Delphi/C++ Builder.
In this article, we will focus on the first two libraries: JCL and JVCL.
JEDI Code Library (JCL)
The JEDI Code Library (JCL) is a set of thoroughly tested and fully documented utility functions and non-visual classes that can be instantly reused in your Delphi/C++ Builder projects. The JCL covers a wide range of topics, such as:
Algorithms and data structures
Compression and encryption
Debugging and logging
File and registry access
Mathematics and statistics
Memory management
Multithreading and synchronization
Networking and internet
Reflection and RTTI
Streams and serialization
Strings and localization
System information and performance
Windows API wrappers
The JCL is built upon code donated from the JEDI community. It is reformatted to achieve a common look-and-feel, tested and merged into the library. The library is grouped into several packages. It is released to the public under the terms of the Mozilla Public License (MPL) and as such can be freely used in both freeware/shareware, open source and commercial projects.
JEDI Visual Component Library (JVCL)
The JEDI Visual Component Library (JVCL) is a library of over 600 Delphi/C++ Builder components that can be easily used in your GUI applications. The JVCL is based on code from RxLib, a set of components created by Russian developers in 1996, and donated to the JEDI community in 1999. The JVCL includes components for:
Enhanced standard controls, such as buttons, edits, grids, listviews, etc.
Advanced controls, such as calendars, calculators, charts, diagrams, etc.
Data-aware controls, such as DB grids, DB lookup controls, DB navigators, etc.
Internet and networking controls, such as FTP, HTTP, SMTP, POP3, etc.
Multimedia and graphics controls, such as audio players, video players, image viewers, etc.
System and shell controls, such as tray icons, task dialogs, file dialogs, etc.
Utility and helper classes, such as timers, validators, converters, etc.
The JVCL also provides design-time editors and property editors for many of its components. The JVCL is released under the terms of the Mozilla Public License (MPL) and the GNU Lesser General Public License (LGPL), and can be freely used in both freeware/shareware and commercial projects.
Why use JEDI?
There are many reasons why you should consider using JEDI libraries in your Delphi/C++ Builder projects. Here are some of them:
Benefits of JEDI libraries
They are free and open source. You can download them from the official website or GitHub repository. You can also modify them to suit your needs or contribute to their development.
They are well-tested and documented. The JEDI libraries undergo rigorous testing and quality assurance before each release. They also have comprehensive documentation and help files that explain how to use them.
They are rich and diverse. The JEDI libraries offer a wide range of features and functionality that can enhance your applications. You can find almost anything you need in the JEDI libraries.
They are compatible and extensible. The JEDI libraries are designed to work with different versions of Delphi/C++ Builder. They also support cross-platform development with FireMonkey. You can also extend them with your own code or third-party libraries.
Compatibility with Delphi and C++ Builder versions
The JEDI libraries support a wide range of Delphi and C++ Builder versions. Here is a table that shows the compatibility matrix for JCL and JVCL:
Delphi/C++ Builder version
JCL version
JVCL version
Delphi 5
JCL 2.8
JVCL 3.49
Delphi 6
JCL 2.8
JVCL 3.49
Delphi 7
JCL 2.8
JVCL 3.49
C++ Builder 5
JCL 2.8
JVCL 3.49
C++ Builder 6
JCL 2.8
JVCL 3.49
Delphi 2005
JCL 2.8 or later
JVCL 3.49 or later
C++ Builder 2006
JCL 2.8 or later
JVCL 3.49 or later
Delphi/C++ Builder 2007
JCL 2.8 or later
JVCL 3.49 or later
Delphi/C++ Builder 2009
JCL 2.8 or later
JVCL 3.49 or later
Delphi/C++ Builder 2010
JCL 2.8 or later
JVCL 3.49 or later
Delphi XE
JCL 2.8 or later
JVCL 3.49 or later
C++ Builder XE
JCL 2.8 or later
JVCL 3.49 or later
Delphi XE2
JCL 2.8 or later
JVCL 3.49 or later
C++ Builder XE2
JCL 2.8 or later
JVCL 3.49 or later
Delphi XE3
JCL 2.8 or later
JVCL 3.49 or later
C++ Builder XE3
JCL 2.8 or later
JVCL 3.49 or later
Delphi XE4
JCL 2.8 or later
JVCL 3.49 or later (no FireMonkey support)
C++ Builder XE4
JCL 2.8 or later
JVCL 3.49 or later (no FireMonkey support)
Delphi XE5
JCL 2.8 or later (no iOS support)
JVCL 3.49 or later (no FireMonkey support)
C++ Builder XE5
JCL 2.8 or later (no iOS support)
JVCL 3.49 or later (no FireMonkey support)
Delphi XE6
JCL 2.8 or later (no iOS support)
JVCL 3.49 or later (no FireMonkey support)
C++ Builder XE6
JCL 2.8 or later (no iOS support)
JVCL 3.49 or later (no FireMonkey support)
Delphi XE7
JCL 2.8 or later (no iOS support)
JVCL 3.49 or later (no FireMonkey support)
C++ Builder XE7
JCL 2.8 or later (no iOS support)
JVCL 3.49 or later (no FireMonkey support)
Delphi XE8
JCL 2.8 or later
JVCL 3.49 or later (no FireMonkey support)
C++ Builder XE8
JCL 2.8 or later
JVCL 3.49 or later (no FireMonkey support)
Delphi 10 Seattle
JCL 2.8 or later
JVCL 3.49 or later (no FireMonkey support)
C++ Builder 10 Seattle
JCL 2.8 or later
JVCL 3.49 or later (no FireMonkey support)
Delphi 10.1 Berlin
JCL 2.8 or later
JVCL 3.49 or later (no FireMonkey support)
C++ Builder 10.1 Berlin
JCL 2.8 or later
JVCL 3.49 or later (no FireMonkey support)
Delphi 10.2 Tokyo
JCL 2.9 or later
JVCL 3.50 or later (no FireMonkey support)
C++ Builder 10.2 Tokyo
JCL 2.9 or later
JVCL 3.50 or later (no FireMonkey support)
Delphi 10.3 Rio
JCL 2.9 or later
JVCL 3.50 or later (no FireMonkey support)
C++ Builder 10.3 Rio
JCL 2.9 or later
JVCL 3.50 or later (no FireMonkey support)
How to install JEDI?
There are two ways to install JEDI libraries in your Delphi/C++ Builder IDE: using the GetIt Package Manager or using Git and manual installation.
Using GetIt Package Manager
The GetIt Package Manager is a tool that allows you to browse, download, and install third-party libraries and components from the Embarcadero GetIt server. It is integrated with the Delphi/C++ Builder IDE and can be accessed from the Tools menu. To install JEDI libraries using the GetIt Package Manager, follow these steps:
Open the Delphi/C++ Builder IDE and select Tools > GetIt Package Manager.
In the GetIt Package Manager window, search for JCL or JVCL in the search box.
Select the JCL or JVCL package from the list and click Install.
Accept the license agreement and wait for the installation to complete.
Restart the IDE when prompted.
After installing JCL or JVCL using the GetIt Package Manager, you can find them in the Component Palette under the JEDI category. You can also access their documentation and help files from the Help menu.
Using Git and manual installation
If you prefer to install JEDI libraries manually, you can download them from their GitHub repository. You will need a Git client to clone or download the repository. To install JEDI libraries using Git and manual installation, follow these steps:
Download and install a Git client, such as TortoiseGit or Git for Windows.
Clone or download the JEDI repository from https://github.com/project-jedi/jedi.
Open the JCL folder and run the install.bat file. This will launch the JCL installer wizard.
Follow the instructions of the wizard to select your Delphi/C++ Builder versions, target platforms, and installation options.
Click Install and wait for the installation to complete.
Open the JVCL folder and run the install.bat file. This will launch the JVCL installer wizard.
Follow the instructions of the wizard to select your Delphi/C++ Builder versions, target platforms, and installation options.
Click Install and wait for the installation to complete.
After installing JCL or JVCL manually, you can find them in the Component Palette under the JEDI category. You can also access their documentation and help files from their respective folders.
How to use JEDI?
JEDI libraries provide a lot of features and functionality that can enhance your Delphi/C++ Builder applications. In this section, we will show you some examples of how to use JCL and JVCL in your projects.
Examples of JCL features and utilities
The JCL offers many useful classes and functions that can simplify your coding tasks. Here are some examples of how to use them:
To compress or decompress data using various algorithms, such as ZIP, BZIP2, LZMA, etc., you can use the TJclCompressionArchive class. For example, to create a ZIP archive from a folder, you can use this code:
uses JclCompression; var Archive: TJclCompressionArchive; begin Archive := TJclZipCompressArchive.Create('C:\MyFolder.zip', 0); try Archive.AddDirectory('C:\MyFolder', '', True); Archive.Compress; finally Archive.Free; end; end;
To encrypt or decrypt data using various algorithms, such as AES, DES, Blowfish, etc., you can use the TJclCipher class. For example, to encrypt a string using AES-256 with a password, you can use this code:
uses JclCipher; var Cipher: TJclCipher; PlainText, CipherText: string; begin Cipher := TJclAES256Cipher.Create('MyPassword'); try PlainText := 'Hello World'; CipherText := Cipher.EncryptString(PlainText); // Do something with CipherText finally Cipher.Free; end; end;
To get system information, such as CPU type, OS version, memory usage, etc., you can use the JclSysInfo unit. For example, to get the CPU name and speed, you can use this code:
uses JclSysInfo; var CPUName: string; CP USpeed: Cardinal; begin CPUName := GetCPUName; CPUSpeed := GetCPUSpeed; // Do something with CPUName and CPUSpeed end;
To debug and log your application, you can use the JclDebug and JclDebugExpert units. They provide features such as stack tracing, exception logging, memory leak detection, etc. For example, to enable stack tracing and exception logging, you can use this code:
uses JclDebug; begin JclStackTrackingOptions := JclStackTrackingOptions + [stStack, stExceptFrame]; JclStartExceptionTracking; // Do something that may raise an exception JclStopExceptionTracking; end;
These are just some of the many features and utilities that the JCL provides. You can explore more of them by browsing the JCL source code, documentation, and demos.
Examples of JVCL components and classes
The JVCL offers a large collection of components and classes that can enhance your GUI applications. Here are some examples of how to use them:
To create a modern-looking ribbon interface for your application, you can use the TJvRibbon component. It is a wrapper for the Windows Ribbon Framework that allows you to design and customize ribbon tabs, groups, buttons, etc. For example, to add a ribbon to your form, you can use this code:
uses JvRibbon; var Ribbon: TJvRibbon; begin Ribbon := TJvRibbon.Create(Self); Ribbon.Parent := Self; Ribbon.Align := alTop; // Add tabs, groups, buttons, etc. to the ribbon end;
To display a task dialog that is compatible with different versions of Windows, you can use the TJvTaskDialog component. It is a wrapper for the Windows Task Dialog API that allows you to create dialogs with various options, such as icons, buttons, radio buttons, checkboxes, etc. For example, to show a task dialog with a question and two custom buttons, you can use this code:
uses JvTaskDialog; var TaskDialog: TJvTaskDialog; begin TaskDialog := TJvTaskDialog.Create(Self); try TaskDialog.Title := 'Question'; TaskDialog.Instruction := 'Do you want to save the changes?'; TaskDialog.CommonButtons := []; TaskDialog.CustomButtons.Add('Save'); TaskDialog.CustomButtons.Add('Discard'); TaskDialog.Execute; case TaskDialog.ModalResult of 100: // Save button clicked // Do something 101: // Discard button clicked // Do something end; finally TaskDialog.Free; end; end;
To play audio files in various formats, such as MP3, WAV, OGG, etc., you can use the TJvMediaPlayer component. It is a wrapper for the Windows Media Player ActiveX control that allows you to control the playback of audio files. For example, to play an MP3 file from your application folder, you can use this code:
uses JvMediaPlayer; var MediaPlayer: TJvMediaPlayer; begin MediaPlayer := TJvMediaPlayer.Create(Self); try MediaPlayer.FileName := ExtractFilePath(Application.ExeName) + 'MyFile.mp3'; MediaPlayer.Open; MediaPlayer.Play; // Do something while playing MediaPlayer.Stop; MediaPlayer.Close; finally MediaPlayer.Free; end; end;
These are just some of the many components and classes that the JVCL provides. You can explore more of them by browsing the JVCL source code, documentation, and demos.
Conclusion
In this article, we have introduced you to JEDI libraries: JCL and JVCL. We have shown you what they are, why you should use them, how to install them, and how to use them in your Delphi/C++ Builder projects. We hope that you have found this article useful and informative. If you want to learn more about JEDI libraries or join the JEDI community, you can visit their official website at https://www.delphi-jedi.org/.
FAQs
Here are some frequently asked questions about JEDI libraries:
Q: Are JEDI libraries compatible with Lazarus?
A: No, JEDI libraries are not compatible with Lazarus. However, there is a project called Lazarus Jedi Project (LJP) that aims to port JEDI libraries to Lazarus. You can find more information about LJP at https://wiki.lazarus.freepascal.org/Lazarus_Jedi_Project.
Q: How can I update JEDI libraries to the latest version?
A: If you have installed JEDI libraries using the GetIt Package Manager, you can update them by selecting Tools > GetIt Package Manager and clicking the Update button for JCL or JVCL. If you have installed JEDI libraries manually, you can update them by cloning or downloading the latest version from their GitHub repository and running the install.bat files again.
Q: How can I report bugs or request features for JEDI libraries?
A: You can report bugs or request features for JEDI libraries by using their issue tracker at https://github.com/project-jedi/jedi/issues. You can also join their mailing list at https://lists.sourceforge.net/lists/listinfo/jedi-general or their forum at https://en.delphipraxis.net/forum/36-jedi/ to discuss JEDI-related topics with other developers.
Q: How can I contribute to JEDI libraries?
A: You can contribute to JEDI libraries by submitting patches, code donations, documentation, translations, or tests. You can also help by testing, reviewing, or commenting on existing issues or pull requests. You can find more information about how to contribute to JEDI libraries at https://github.com/project-jedi/jedi/blob/master/CONTRIBUTING.md.
Q: Where can I find more resources about JEDI libraries?
A: You can find more resources about JEDI libraries by visiting their official website at https://www.delphi-jedi.org/, their GitHub repository at https://github.com/project-jedi/jedi, their wiki at https://wiki.delphi-jedi.org/, their blog at https://blog.delphi-jedi.net/, and their YouTube channel at https://www.youtube.com/channel/UCm9t0wKf4Z0y9f7V3gJF2Ww.
dcd2dc6462