0

I have java project generated in Visual Studio Code (installed addon: Java Extension Pack )

Everything works properly when i work with it using IDE, but i would like to know how to build and run it using only commandline.

I would also like to generate .jar file from my project but I can't find such an option.

Files generated by this project:

.classpath:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
    <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="output" path="bin"/>
</classpath>

.project

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<projectDescription>
  <name>java_project</name>
  <comment/>
  <projects>
    </projects>
  <buildSpec>
    <buildCommand>
      <name>org.eclipse.jdt.core.javabuilder</name>
      <arguments>
            </arguments>
    </buildCommand>
  </buildSpec>
  <natures>
    <nature>org.eclipse.jdt.core.javanature</nature>
  </natures>
</projectDescription>
2
  • 1
    In VS Code the most common way for that is to use Maven (the Java Extension Pack is a headless Eclipse via LSP, without the dialogs and wizards of the Eclipse IDE). Commented Jan 9, 2020 at 14:07
  • you could build with maven,and do it in command line,refer to stackoverflow.com/a/46727175/10768653 Commented Jan 10, 2020 at 3:16

0

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.