While trying to execute JMeter from the command line in non-GUI mode I'm getting errorlevel=2 error message.
What I did is,
Navigate to the JMeter bin directory in command prompt.
Run the command "jmeter -n -t [jmx file] -l [jtl file]"
and it returned errorlevel=2 error message.
Jmeter is working perfectly fine in the GUI mode and Java is also installed properly on my system. The non-GUI mode execution somehow doesn't seem to work!
[I found a workaround which I have written below. If anyone has a better solution then do provide !]