I have two IntelliJ IDEA Java projects; ProjectA and ProjectB. I want to import and use code from ProjectA in ProjectB. How do I do this?
In Eclipse I would simply g
you have to create a module of your Project A and add in the path of your project B.
Follow this link for learn how to create module and use it in other project : Creating a module library
Hope i help you
EDIT : ok so you have to create a module or a package with your Project A a .jar.
after do this, go to File -> project structure.
On this windows go to Librairies -> click on + and select your module project B.jar.
and Now you have to import your librairie in your class like
import projectb.*;
now instancie the class you want to use and you can use all of the method of this class
hope i help you with that precision