When i am running java program from Intellij idea i noticed that they are executed via reflection by a class called AppMain (from idea_rt.jar).
IntelliJ product spec:
IntelliJ IDEA (Community Edition) IC-145.184.1 Build #IC-145.184, built on March 1, 2016 JRE: 1.8.0_60-b27 x86
For E.g: if i execute below code ,
public class Example{
public static void main(String[] args) {
throw new RuntimeException();
}
}
Following is the output in which there are 5 internal calls from AppMain
Exception in thread "main" java.lang.RuntimeException at Example.main(Example.java:12) at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
As you can see above all the stack trace info has 5 extra stack trace information origination from AppMain class from idea_rt.jar
Is there anyway to Run Java Applcation's from IntelliJ IDE without using AppMain ?