r/javahelp • u/Arunzeb • Jun 17 '19
Running one Java program in Intellji will launch and run another program.
It's really annoying. No matter what I do, another program runs. I have separated the Package file*, but it didn't work.*
Do we need to create a new project every time we want to run a new small java program ?!
0
Upvotes
2
u/Opetich Jun 17 '19
The project didn't even seem to run since it's not possible to compile.
I think it just changed the class view because it was the first error it found
2
u/LambdaThrowawayy Jun 17 '19
A possible entry point to your program is the main method. You can have multiple main methods; just run using the relevant one.
1
2
u/nutrecht Lead Software Engineer / EU / 20+ YXP Jun 17 '19
I'm not going to view a youtube video. But no; you can have multiple main classes in a single IntelliJ project.