I have lib.userlibraries file with the following content:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<eclipse-userlibraries version="2">
<library name="MyLib" systemlibrary="false">
<archive path=PATH_TO_LOCAL_JAR_1/>
<archive path=PATH_TO_LOCAL_JAR_2/>
...
<archive path=PATH_TO_LOCAL_JAR_100/>
</library>
</eclipse-userlibraries>
I want to import these local jar files to the project in IntelliJ Idea. I can do it manually via File -> Project Structure... -> Libraries, but it will require to import each jar file separately. Is there automatic way to import this userlibraries file to IntelliJ Idea project?
The other answer about using the IntelliJ import feature for eclipse projects should be your first "stop".
Beyond that: importing doesn't necessarily work for all projects. We have a large, complicated eclipse project. Trying to import that in IntelliJ simply didn't work (the module definition that IntelliJ created was completely wrong, and lead to thousands and thousands of build errors).
In that specific case, it might be faster to use a powerful text editor, like:
Of course, that seems silly, but as said: using a text editor, I got a large setup with 15 modules/projects to build fine in less than an hour.
And the real answer: base your project setup on a tool like maven or gradle. Because these tools allow you to generate eclipse or IntelliJ configuration files. If possible, always do that. Even when it means to learn a new tool, and a lengthy transition period.
In IntelliJ IDEA open the Eclipse project by importing from Eclipse wizard. It will give you an opportunity to select user libraries.
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