I wrote a simple project in Java, using default configuration in IntelliJ IDEA. I built the project and ran it successfully. I was using Java 1.9. I wanted to check if it runs with Java 1.8. I changed the JRE in the configuration from Java 1.9 to Java 1.8 and ran my project. The following error occurred: Show This question: IntelliJ Error: A JNI error has occurred, please check your installation and try again is different because it has NoClassDefFoundError instead of UnsupportedClassVersionError. This question A JNI error has occurred, please check your installation and try again in Eclipse x86 Windows 8.1 is also different because it regards Eclipse, not IntelliJ IDEA. asked Aug 25, 2018 at 11:53
I found a solution, editing a component configuration in .idea/misc.xml. It was <component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" project-jdk-name="9.0" project-jdk-type="JavaSDK"> <output url="file://$PROJECT_DIR$/out" /> </component>and I changed it into Then an applet appeared, which helped me add a new JDK (Java8) and I was able to run my project and the error disappeared. answered Aug 25, 2018 at 11:53
banan3'14banan3'14 2,9562 gold badges19 silver badges41 bronze badges Problem is our manifest files doesn't match the project. What I did is solved my problem. I had provided codes for chat client and server. First I opened a new Java project.then created a package ,and then what I did is created two classes (you can give any name since we change it later.) for my 2 existing classes. Then I opened existing classes in notepad,copy all the content and paste them to newly created classes. An error occurs saying
. Rename compilation units. Then run..worked for me.
RN92 1,3061 gold badge13 silver badges31 bronze badges answered Feb 26, 2019 at 2:33
3 Not the answer you're looking for? Browse other questions tagged java intellij-idea or ask your own question.
๐ฆ์์ธ1 :์ฐพ์๋ณด๋ ์ธํ ํ ์๋ฐ์ ํ๊ฒฝ๋ณ์๊ฐ ์ ๋ชป ๋๋ค๊ณ ํ๋ค. ๊ทธ๋์ ํ์ธํด๋ณด๋, ์ผ๋จ C\Program Files(x86)\Java์๋์ jdk, jre ๊ฐ ๋ชจ๋ ์ค์น๋ ๋์ด์์๋ค. ๊ทธ๋ฐ๋ฐ ํ๊ฒฝ๋ณ์์์ ์๋ ํ๊ดํ ์น ๋ถ๋ถ์ด jre๋ก ๋์ด์์๋ค =_= ๋ฐ๋ณธ๊ฐ? ๐ฆ์์ธ1์ ๋ํ ์์ :๊ทธ๋์ ๊ทธ ๋ถ๋ถ์ jdk๋ก ๋ค์ ์ค์ ์ ํด์คฌ๋ค. ๊ทธ๋ฐ๋ฐ๋ ์๋๋ค. ๋ญ๋ฐ! ๐ฝ์์ธ2 :ํ๊ฒฝ๋ณ์์ ํจ๊ป ๋ด๊ฐ ์ฌ์ฉํ๋ intellj์ setting์ gradle์ด ์ ๋ชป ์ธํ ๋์ด์์ ์๋ ์๋ค๊ณ ํ๋ค. gradle JVM์ด ์.. 16์ผ๋ก ๋์ด์์ฃ ? ๐ฝ์์ธ2์ ๋ํ ์์ :์ฌ๊ธฐ๋ ์๋์ฒ๋ผ ์์ ํด์คฌ๋ค.
|