My friend and I both have IntelliJ and just want to run plain old java. Every time I make a new java class, I can automatically run it. The configurations just work.
When my friend wants to run it, he has to go to edit configurations and type in the class name. We went through the exact same setup. How do we make it automatically the main function in the class?
Friend's
MINE Macbook Pro
When you're in a java file that contains a public static final void main(String[] arg)
method you can press Ctrl+Shift+F10
to make and run a temporary run configuration for the current class. This can save a bit of time when setting up the configurations.
Alternatively you can try to share the .idea
directory with him, as it contains all of the project's settings. I'm not sure what other options will be shared though.
it's easy, Your friend must do this and this setting is changed in the "Default Project Structure..." dialog. Navigate to "File" -> "Other Settings" -> "Default Project Structure...".
Next, modify the "Project language level" setting to your desired language level.
IntelliJ IDEA 12 had this setting in "Template Project Structure..." instead of "Default Project Structure..."
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