I got the error "Process finished with exit code 1" when I was running my Java code. I am using Intellij IDEA 2018.3. Below is the error log I got.
Asked
Active
Viewed 2.1k times
2
-
1Zero is the exit code indicating success, whereas any non-zero exit code indicates that something went wrong, see https://stackoverflow.com/questions/20965762/. In your case it looks like the program stopped due to an uncaught exception. – Michael H. Apr 22 '19 at 08:55
-
Are you very sure this is JavaScript not Java? – jro Apr 22 '19 at 08:55
3 Answers
4
To get more information on the exit code try putting a try catch around the SpringApplication.run() function like this:
try
{
SpringApplication.run(Application.class, args);
}
catch (Throwable throwable)
{
System.out.println(throwable.toString());
throwable.printStackTrace();
}

JaredCS
- 427
- 4
- 11
3
While running a Java application in Intellij Idea, after the program execution, JVM prints the exit code to the console. If the program terminates without any exception, exit code 0 is printed. Otherwise, any signed integer may be outputted.

r-sunny
- 66
- 4
0
For springboot projects, the most common reason is org.springframework.beans.factory.BeanCreationException
.
Search BeanCreationException
, debug at each construct function, and debug the projects.
Then you will find out the 'beanName' with problem, then you can focus on the bean.
for example:

hatanooh
- 3,891
- 1
- 14
- 9