0

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.

msc
  • 33,420
  • 29
  • 119
  • 214
  • 3
    __"But it doesn't start."__ can you clarify please? "Does not start" is a bit vague. What does it do or does it not do? I am also a little concerned that you have no double quotes around paths with spaces as cmd sees each space as a separator if not in double quotes. – Gerhard Jan 13 '20 at 09:37
  • @GerhardBarnard Hello sir, I have updated my question and added more details. please help me. Thank you in advance. – msc Jan 13 '20 at 10:56
  • 2
    You would probably need to uninstall it and install it again. Do not quote the -jar portion, just try it as `nssm install metabase "C:\Program Files\Java\jre1.8.0_144\bin\javaw.exe" "C:\Program Files (x86)\POSPReports" -jar metabase.jar` – Gerhard Jan 13 '20 at 11:10
  • @GerhardBarnard I did same what you said, but still gives same error. Thank you for your effort sir. – msc Jan 13 '20 at 11:20

1 Answers1

0

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.

msc
  • 33,420
  • 29
  • 119
  • 214