Running a Jar file then a JS file


Does anyone know of a way I could run a Java file & JavaScript file at the same time without my computer running on glitch 24/7, because I’ve tried a shell NPM module and I’ve tried to use a file. But alas, no luck.

Kind Regards,

I know you said shell files didnt work, but try this:
Create file called
Inside package.json, set the start to “./”
The content of should be something along the lines of

java FILE &
node FILE2 &

I hope this helps you!


Hello @4xk,

I will definitely try this method out and get back to you asap to tell you if it works or not.

Kind Regards,

1 Like


Thank you very much! I just had to adjust the order the two files start with the server.js file first then putting a timeout on it starting then starting the Java server.


Nice, always love to help!

1 Like