need help with installing java on VS code.

I have some troubles with "Failed to resolve main method codeLens: 'class QuickStart {' is not a valid Java identifier". I have installed "Java" and "Language Support for Java(TM) by Red Hat".
8 Replies
JavaBot
JavaBot6mo ago
This post has been reserved for your question.
Hey @pahabyyr! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
dan1st
dan1st6mo ago
Can you show your code? ideally as text in a code block. not screenshots of code and can you show the files in your project (a screenshot is fine there)
FatBot
FatBot6mo ago
Oh, sorry, i forgor to add. This is my code:
class QuickStart {
public static void main (String[] args) {
System.out.println("Hello, World.");
}
}
class QuickStart {
public static void main (String[] args) {
System.out.println("Hello, World.");
}
}
This message has been formatted automatically. You can disable this using /preferences.
dan1st
dan1st6mo ago
What files are there?
pahabyyr
pahabyyrOP6mo ago
No description
dan1st
dan1st6mo ago
You named the file class QuickStart {.java it should just be named QuickStart
JavaBot
JavaBot6mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
JavaBot
JavaBot6mo ago
Post Closed
This post has been closed by <@934731404254801931>.

Did you find this page helpful?