javacmdwindows-10metabasenssm

Install metabase using cmd


Using windows 10 cmd, i am trying to install metabase.

nssm install metabase C:\Program Files\Java\jre1.8.0_144\bin\javaw.exe AppDirectory C:\Program Files (x86)\POS -jar metabase.jar

It is installed successfully.

img

but when i try to start service.

sc start metabase

But it doesn't start.

Why does this happen? What am I missing here? please help me. thank you in advance.

Edit: According to the comment i used double quotes around paths.

nssm install metabase "C:\Program Files\Java\jre1.8.0_144\bin\javaw.exe" "C:\Program Files (x86)\POSPReports" "-jar metabase.jar"

error

Then I tried to start service manually. But giving following an error.


Solution

  • Thank you so much Gerhard Barnard for helping me. I solved my issue.

    First, I installed my metabase service using following command.

    nssm install metabase "C:\Program Files\Java\jre1.8.0_144\bin\javaw.exe" -jar metabase.jar
    

    And then set the startup directory.

    nssm set metabase AppDirectory "C:\Program Files (x86)\POS"
    

    Hope it will help someone.