skip to Main Content

I am programming in Java using VS Code, using the Extension Pack for Java. I can start building my project with the "Rebuild All" button, or create a .jar file with the "Export Jar…" button.

This launches a task in a one-time use "task terminal" which I can’t access :

 *  Executing task: java (buildArtifact): default

The generation of the .jar files works great, but I’d like to know which command was used so I can automate it with a bash script.

I tried looking inside VS Code task configuration "tasks.json" but didn’t find much.

2

Answers


  1. jar cf jar-file input-file(s)

    should do the trick. The input files are space sperated.

    Login or Signup to reply.
  2. You can click on the OUTPUT panel and select Language Support for Java to see the log of the execution of the Java extension after you clicked on Export Jar..., there may be information in there about the command you are looking for.

    enter image description here

    You can also just learn how to generate jar files manually, here’s a related document you can read(Heading 3). You can also search for more information yourself.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search