Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99124

VScode java project build and run from command line

$
0
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>

Viewing all articles
Browse latest Browse all 99124

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>