Running java program, maven project on intellij

2014-10-14T06:07:03

I feel as though I am missing a very simple step or misunderstood something. I cant seem to run (on intellij) my java program that I wrote in my maven project.

I wrote some code and added some dependencies. The code has no errors. I want to test this code but I cannot because the "play" button to run the program is grayed out. Also when I right click my file to try and find run program, it does not appear!

I think the problem might be because my code states that my main() is never used. Not really sure why it isnt being used. I thought the compiler always looks for a main() to compile/run

public static void main() {
    ...
    ...
}

Not sure how I can test this program. Can someone help me with my problem?

enter image description here

enter image description here

Copyright License:
Author:「Liondancer」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/26349636/running-java-program-maven-project-on-intellij

About “Running java program, maven project on intellij” questions

I feel as though I am missing a very simple step or misunderstood something. I cant seem to run (on intellij) my java program that I wrote in my maven project. I wrote some code and added some
Running a Maven project in IntelliJ is very easy - just declare the dependencies in the POM, and away we go. There is no need to explicitly include the copy-dependencies plugin, assembly plugin, or...
I have a Java project that is designed to be built with Maven. I have instructions to use the Intellij IDE, and I know that when a friend uses the same project and follows those instructions, it w...
Intellij Maven Project set up tried and tested on Linux and Windows works fine, but trying to get it installed and running on one particular Windows machine 7 machine is throwing the below error: ...
I have a project on Bitbucket. Only the sources are committed. To retrieve the project onto a new machine, I used Version Control > Checkout from Version Control from within IntelliJ. It then asks
I am trying to import a local jar file using Maven, but it looks like Maven service is refusing to start, and therefore I can't reimport it when I make any changes (don't know what was the change t...
How to export Java maven project with all dependencies from IntelliJ as non-maven project?
After 2 days searching around the web for tutorials on running maven on intellij , I didn't find much and all the tutorial I tried returned some error , So can someone give me a step by step
I am trying to run below simple program with virtual threads on my intellij with java19 version selected. Code public class VTSimple { public static void main(String[] args) { Runnable
UPDATE: the problem went away when I uninstalled IntelliJ from "Program Files (x86)" and installed it in "Program Files" instead I'm trying to start using maven/intellij to develop my vaadin

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.