Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

187
Vistas
Extract .jar file with NodeJS

I need to extract a JAR file using NodeJS and I have no idea how, also I'm not sure if StackOverFlow is the right place for this so sorry if it's not.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

so jar files are just java archive files that can be unzipped with any commonly available operating system tool like unzip or jar, so a simple command like jar xvf /path/to/file.jar or unzip /path/to/file.jar should extract any .jar file. But since you want to use nodeJS to do it, you can make use of the exec function present in the node js code module called child_process.

you can create a simple function which takes in the path to the jar file like

const exec = require('child_process').exec;

extractJar(path) => {
  const command = `jar xvf ${path}`;
  exec(command, (err, stdout) => {
    if(err) console.log(err); return;
    console.log('success!');
  })
}

alternatively, you try by using libraries like unzipper, these do not depend upon your operating system tools as the exec command just executes the process on your shell, but these libraries use your node js IO operations for extracting.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda