Batch Getting & Displaying User Input <p>Why is this code not working?</p> <pre><code>@echo off set /p param=Enter Parameters: echo %param% </code></pre> <p>Output:</p> <pre><code>(Nothing) </code></pre> <p>I have searched all relative posts, but I can't find what is wrong with it. There is no space problem, or syntax problem that I can identify</p> <p><strong>Update:</strong> As <strong>rojo</strong> stated, since the code block is working, here is the full code, which is not working.</p> <pre><code>@echo off for /f %%j in ("java.exe") do ( set JAVA_HOME=%%~dp$PATH:j ) if %JAVA_HOME%.==. ( echo java.exe not found ) else ( set /p param=Enter Parameters: echo %param% (statement using JAVA_HOME) ) pause </code></pre> <p>Output:</p> <pre><code>Enter Parameters: jfdklsaj ECHO is off. ... </code></pre>