Sky
Sky

Reputation: 7691

Error occurs when I build the code with IntelliJ

I compile the project successfully in Eclipse without any error.

But when I tried to compile it in IntelliJ, the following error shows:

enter image description here

I double-clicked the error message, it located into the first line of one Java class, which is the package definition line, and there's no compilation error in this class.

I tried to fix this by specifying the JDK, but it didn't work.

Anyone knows what's happening here?

Upvotes: 0

Views: 65

Answers (1)

Sky
Sky

Reputation: 7691

Thanks RC. I saved my file with UTF-8 in Sublime, then it works.

This is what I did: Open the file with Sublime, File->Save with Encoding, there will be UTF-8 and UTF-8 with DOM, select the first one, then it compiled successfully in IntelliJ.

Upvotes: 1

Related Questions