0

I'm trying to run a .bat file (Opendaylight's run.bat of the Hydrogen distribution, if it matters) but I keep getting this error.

Here are my variable paths, what am I doing wrong? Thanks in advance!

enter image description here

Alek988Alek
  • 49
  • 14
  • See [here](http://stackoverflow.com/q/2190295/2711488), [here](http://stackoverflow.com/questions/14029591/find-java-pid-using-batch), and [here](http://support.microsoft.com/kb/75634/en-us) – Holger Apr 02 '15 at 15:46
  • Sure, but I didn't write the BAT file, I suppose it is proper... – Alek988Alek Apr 02 '15 at 15:48
  • 1
    Just because you didn’t write it doesn’t imply that it’s correct as that would mean you are the only one on earth making mistakes. Do you really believe that? It’s a good thing that you don’t start blaming others in the first place, really, but the links clearly indicate that the message origins from the batch file interpreter so it definitely *is* a batch file issue. – Holger Apr 02 '15 at 15:51
  • Nah dude, I've made a mistake. I should have used a path to JDK, not JRE. Though, I get an error that says "C:\Program is not recognized as an internal or external command" I assume I need to change the path in variables somehow - somehow, how? :D Thanks again! – Alek988Alek Apr 02 '15 at 16:11
  • 1
    `JAVA_HOME` isn’t required to point to a JDK, so if it should, it’s an additional constraint imposed by the `.BAT` file and not handling its violation is still a flaw of the `.BAT` file, just like the other problem you have. It’s obviously a failure to handle the space character in the path. Blame the author who didn’t test the script with the required care. You may hotfix it by letting a link or virtual drive letter point to `C:\Program Files (x86)` and use that as path. – Holger Apr 02 '15 at 16:18
  • I really don't want to blame the author or the .bat, because it really should work (I've seen it work), and it is widely distributed and used. I'm pretty sure I'm doing something wrong :) – Alek988Alek Apr 02 '15 at 16:27
  • 1
    That doesn’t say anything. E.g. in German Windows versions before Windows 7, the path would be `C:\Programme` (no space), so you have millions of systems where scripts not handling space in that path work without problems. Still, not handling spaces correctly, is a flaw. Maybe the script will work when *no* `JAVA_HOME` is defined, as long as the Java programs are in the command path, who knows? There are lots of possible scenarios and I guess, a support forum specific to the product might provide better help… – Holger Apr 02 '15 at 16:33
  • Yeah... I've just been told I need JDK 1.7something (not ANY 1.7, cuz some dont work)... :) Thanks for your patience and the help ! – Alek988Alek Apr 02 '15 at 16:51

0 Answers0