2

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. Here is an image of my 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.

2
  • Anyway class name should start with a capital letter. Commented Aug 9, 2017 at 5:06
  • fair, I am coming from C++ and python to java, so I am not familiar with the syntax. Commented Aug 9, 2017 at 5:13

2 Answers 2

0

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.

Sign up to request clarification or add additional context in comments.

Comments

-1

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

2 Comments

To your point about not capitalizing it. On my mac, I didn't capitalize the first letter of my class and I didn't see that error message. I attempted your solution about capitalizing the first letter of the class yet I am still getting that error.
Have you tried your class in a java IDE like eclipse or intellij or netbeans? If not, post me the code and I'll try it for you. The problem is most likely related to that. VSCode is just a code editor. Not a java IDE. Best to make the switch :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.