Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Nick Burnett
2,702 PointsIntelliJ IDEA [MAJOR PROBLEM]
I tried making a fresh install on IntelliJ CE IDEA because I had the same issue earlier. Before you count this post as a duplicate, I'd like to say that it's not. I've tried to use other solutions provided by other people in other posts, and none of them seem to work to my need. I'd like for this post to stay open until a permanent solution is found.
I'm creating a new Java Project using IntelliJ IDE, and the creation runs fine. However, when I run the Main method which does not contain any code at all, it throws this error:
objc[3671]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java (0x100d104c0) and /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/libinstrument.dylib (0x100dd84e0). One of the two will be used. Which one is undefined.
Error: Could not find or load main class net.kingdomnetwork.core.core.Main
Process finished with exit code 1
I've tried multiple solutions like reinstalling the IntelliJ IDE, rechecking the main class path, and all sorts of other answers that were seen in other posts. I am able to compile a JAR file and run it successfully using my local Terminal, and other IDEs seem to work to my liking. However, every time I attempt to run my code, I end up with the same error every time. I've tried reinstalling the JDK on my iMac, thought it's had no affect. Is this strictly something JetBrains has to fix on their own time?
Thanks so much for your help, and again, please don't mark this as a duplicate. If it was a duplicate, I wouldn't have posted it.
3 Answers
Davve L
93 PointsI'm having exactly the same problem. Code works fine on my mac in eclipse but not intellij. Nick did you find a solution?
Ari Misha
19,323 PointsHiya Nick! Im no expert but i had the same issue , but i use windows 10. I resolved the similar issue with installing JRE and JDK from official Oracle website and a bit of help with StackOverflow. Be sure to check it out Stack Overflow community answers. Also did ya add the JDK path to your environment path and IntelliJ IDEA? I mean you have point the jdk path in your IntelliJ Idea.
Martin Gallauner
10,808 PointsHi Nick!
The first error message is not so serious. I get the same for some time now and everything works fine.
The second one is the problem!
Are you sure this is the right path to your main class? net.kingdomnetwork.core.core.Main
And do you have a correct main method there?
public static void main(String [ ] args)
Nick Burnett
2,702 PointsI'm positive. As I stated in the question, I've already checked my code for beginner programming mistakes and have searched stack overflow CONSTANTLY.