Run a proyect within a multiproject directory

Answered

Hi.

 

I Have been trying to load a directory where there are more than one Java console proyects that I was developing with Eclipse. The problem is that in this case i can not run the main classes because it doenst recognze the ".java".

In other proyects where I had multiple mains methos I had no problem.

Any help?

Thnaks in advance

0
3 comments

If you import the project/module via the wizard (File | New | Project/Module from Existing Sources action IDE will automatically discover all the source folders and mark them as source roots.

For already opened project you can mark them manually, see Configure folder categories.

 

Note that if these sources depend on each other you should separate them to different modules and configure the dependencies between them as module dependencies.

1
Avatar
Permanently deleted user

 

Fine Now I can compile but as output I have had to define a directory. I have set the output as one of the proyect directories, that now is marked as orange (I dont know why)

Can I instead store the compiled files of the other proyects in their directories instead that all in this one.

Why the directory is excluded??

If i import the project as you told me, it works fine because it marks every directory as a moduel, But i would like to also learn how to do ir manually.

 

Thanks in advance

0

>Can I instead store the compiled files of the other proyects in their directories instead that all in this one.

You can define build output for individual modules, see https://www.jetbrains.com/help/idea/paths-tab.html#d1527973e13

 

>Why the directory is excluded??

The build directory is excluded from project since build results are not used in Editor for intellisense features and for performance reasons

 

Please check also https://www.jetbrains.com/help/idea/creating-and-running-your-first-java-application.html

 

1

Please sign in to leave a comment.