There are two projects in Intellij Idea, how to import the class / classes of one project into another? For this I have to build a jar one project and add as a library to the structure of another?
|
1 answer
If your project as a library will be used then jar can be used. And if you need only 2 - 3 classes from another project, it is easier to copy and paste.
- I have a singleton class in one project, the essence of which I need to use in another project, what should I do? - will_hunting
- So what's the problem? Copied and pasted into your project and are already applying directly. Or do you need interaction between programs? - alexandr gaiduchok
- Yes, because that class singleton downloads and stores some information from the database to which the second project is connected - will_hunting
- for better understanding - the code in the studio, but in fact it does not matter where your singleton will be launched in the first, second or both projects at once. - alexandr gaiduchok
|