1

I am new to coding in VS Code. I want to run a basic "hello world" java program which I'm unable to run.

I installed the java extension pack for vscode. I have also installed java-11 and maven using homebrew.

import java.io.*;
public class Hello {
    public static void main(String[] args) {
        System.out.println("Hello World");
    }
}

I saw few videos where it shows that run and debug buttons pop up in the code editor but those buttons do not pop up in my code. I can post the screenshots of someone requires it for solving my problem.

I am not able to run the code. Please, someone guide me through the process of running this code. Thank you.

lAaravl
  • 929
  • 2
  • 9
  • 20
  • Possible duplicate of [Debug/run standard java in Visual Studio Code IDE and OS X?](https://stackoverflow.com/questions/39582491/debug-run-standard-java-in-visual-studio-code-ide-and-os-x) – Kamil Naja Feb 18 '19 at 01:02
  • @Kamil The linked question is about debugging, here it just compiling instead. – Robert Feb 18 '19 at 18:22
  • @Aarav Have you read https://code.visualstudio.com/docs/languages/java and the tutorial https://code.visualstudio.com/docs/java/java-tutorial? – Robert Feb 18 '19 at 18:23
  • @Kamil - the query is about running the code to get an output. – lAaravl Feb 19 '19 at 05:22
  • @Robert Yes, I have already read both the tutorial and then installed maven and jdk11 using homebrew. I further installed the required extensions. – lAaravl Feb 19 '19 at 05:23
  • I am unable to share the screenshots here... how to do it..? I tried copying the filepath as the link address but stackoverflow isnt displaying the svreenshots. – lAaravl Feb 19 '19 at 05:25
  • @AaravChandra first answer in this topic is about running code. https://stackoverflow.com/a/40570837/5736236 – Kamil Naja Feb 19 '19 at 13:41

0 Answers0