Error encountered while testing Java program in Mac

Asked By 0 points N/A Posted on -
qa-featured

Hi Experts,

I was testing my Java program in a Mac environment when this error message popped up (see screenshot below). 

Fatal error initializing class com.intellij.util.xml.impl.DomApplicationComponent: java.lang.NoClassDeffounderError: com/intellij/javaee/model/xmlCommonDomModelRootElement

Complete error stack was written to idea.log

As a newbie Java programmer, I couldn’t find any errors in my program and the way I compiled it.  I couldn’t find the reason for the class path error.  Anyway, anyone from this forum who can help me resolve the problem?   

SHARE
Answered By 20 points N/A #114364

Error encountered while testing Java program in Mac

qa-featured

Hi friend,

Error message at the time of java program is a common error. There are three types of common error. They are compilation, run-time and logic errors. If you want to run java program perfectly you need to take care of these three types of error.

Fatal error initializing class com.intellij.util.xml.impl because you have not named java file as same as java main class. You have to save java file at same name which is the class name of main function. java.lang error is a run time error. When you are calling library method in java program you need to use special character perfectly. As example include java.lang.*; .

Take care of these statements and it will run properly.

Related Questions