Follow the on-line steps to install Tomcat on your Mac and write a simple test class error: I can't find or load the main class
Class Javalaunchhelper is implemented in both/library/java/javavirtualmachines/jdk1.8.0_121.jdk/contents/home/bin/ Java (0X10D19C4C0) and/library/java/javavirtualmachines/jdk1.8.0_121.jdk/contents/home/jre/lib/ Libinstrument.dylib (0X10EA194E0). One of the both would be used. Which one is undefined.
IntelliJ idea was installed on Mac last night, and a test project was created with the Java project template of the IJ, and the console reported such an error.
This means that the Javalaunchhelper class was implemented two times. Helpless under search of the universal stack Overflow, found a solution.
Http://stackoverflow.com/questions/43003012/objc3648-class-javalaunchhelper-is-implemented-in-both
Quote high vote answer as follows
You can find all the details here:
- IDEA-170117 "Objc:class Javalaunchhelper is implemented in both ..." warning in Run consoles
It's the old bug in Java on Mac this got triggered by the Java Agent being used by the IDE when starting the app. This message is harmless and was safe to ignore. Oracle Developer ' s Comment:
The message is benign, there was no negative impact from this problem since both copies of that class was identical (Compil Ed from the exact same source). It is purely a cosmetic issue.
The problem is a fixed in Java 9 and in Java 8 Update 152.
If It annoys you or affects your apps on any of the, the workaround for IntelliJ idea are to disable Launcher idea_rt
agents by a Dding idea.no.launcher=true
into idea.properties
( Help
| Edit Custom Properties...
).
This foreign code friend clearly explained the reason for this error, probably means that this is a Mac above the Java of an old bug, will be in those who use the Java agent to run the application on the IDE, but this error on the program is not affected, can be ignored. It has been fixed in Java 9 and Java 1.8.152.
Solution:
Click on the Help-edit Custom properties of the IJ top menu, and if you don't have this properties file, IJ will prompt to create it and add
Idea.no.launcher=True
Source: http://blog.csdn.net/lizhaowei213/article/details/68951671
Project does not start after installing Tomcat under Mac and the main class cannot be found or loaded