batch file - Command line arguments are not passed in Windows 7 - Java -


i running executable jar using batch expects command line arguments.

echo off   java -jar myjar.jar %1 %2 %3 %cd%  pause  

i checked code on 1 windows system , works fine. running on windows 7 system, command line arguments not passed jar. args.length gives me 0. have checked following:

c:\users> assoc .jar   .jar=jarfile c:\users> ftype jarfile jarfile="c:\program files\java\jre7\bin\javaw.exe" -jar "%1" %*   

i have tested simple batch file echo command line argument, , works fine. accepts argument , prints it.
how can fix this?

it resolved. think answer might seem silly, since posted question go ahead. problem was running java runtime environment, got resolved when installed development kit instead. i'm quite confused that, installed runtime environment on other windows 7 system , worked fine, why did didn't work , needed jdk instead system running windows 7 well. thank taking time. appreciate if knows why did act way , mention it.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -