Reputation: 145
I recently installed visual studio on my Ubuntu Linux machine. I also installed Java on my Ubuntu system but I keep getting "Classpath is incomplete" warning" anytime I run my a java code as well as Java implicit super constructor not defined whenever I run my code. I would like an easy to understand solution on how to fix this particular problem.
Edit: I tried this exact same code on my Mac and it doesn't give me the "Java implicit super Constructor not defined" warning.
Upvotes: 2
Views: 2036
Reputation: 9
If you getting that error message you can try below steps:-
1) Open Command Palette (Ctrl+Shift+P) and typing the command Java: Configure Java Runtime.
2) Scroll down to install JDK, Choose the version(I chose latest one), download it install it (during installation you get the option to add the path to java_home variable choose it) ,after clicking finish on set up click reload on vs code.
Upvotes: 0
Reputation: 159
This has already been answered at Visual Studio Code - Java Classpath is incomplete. Only syntax errors will be reported
Visual studio code does not support java right out of the box without a maven or eclipse project defining the classpath. Best solution in my opinion is to use eclipse or intellij or any other java IDE instead of VSCode.
The constructor error you're getting is because your class isn't starting with a capital letters. Classes should always start with a capital letter. Java naming conventions: http://www.oracle.com/technetwork/java/codeconventions-135099.html
Upvotes: -1