Leo P. answered 08/19/23
Professional Java tutor for the University of Central Florida
Here are some potential solutions:
Teigha File Converter: This is a free utility from the Open Design Alliance (ODA). While it's not a Java library, it can be used to automate the conversion from .dwg to .dxf, which can then be read by Kabeja.
LibreDWG: While primarily C-based, LibreDWG is an open-source library for reading .dwg files. You could potentially use Java's JNI (Java Native Interface) to integrate with it, though this would require a considerable amount of work and C/C++ expertise.
jDWGlib: This is a Java library that used to exist for parsing .dwg files, but its development has been stagnant, and it might not support newer .dwg versions. If your project can work with older .dwg formats, you can look into this option.
Commercial Libraries: There are some commercial libraries or services that can read .dwg files and might offer Java or RESTful interfaces, such as Aspose.CAD for Java. While not open-source, they might be more reliable and feature-rich if you're open to a commercial solution.
Web-Based Solutions: If you can use JavaScript, libraries or tools such as WebODA offer web-based solutions to render and work with .dwg files. These could be integrated into web applications.
Given the landscape, if you're limited to open-source and Java, the .dwg to .dxf conversion followed by Kabeja might be your most straightforward path. However, if you can expand to commercial solutions or can integrate with web-based tools or C libraries, you'll have a broader range of options.