My Java application runs from this .bat file
@ECHO OFF
mode con:cols=130 lines=60
CLS
java -cp lib\postgresql-9.0-801.jdbc4.jar;bin telecom.cli.Telecom
PAUSE
A Window opens, the app runs smoothly... But I can't scroll Up and Down.
What do I need to add to this .bat file?
The more command allows you to see the text files within the command prompt. For bigger files (for example, log files), it shows one screen at one time. The more command is also used to scroll up and down within the page. To scroll up the display one line at a time, press the Enter key.
If you're creating a batch file and want the MS-DOS window to remain open, add PAUSE to the end of your batch file. This prompts the user to Press any key. Until the user presses any key, the window remains open instead of closing automatically.
You will be fine as long as you modify the batch file after the current executing line position byte offset at the end of the most recently parsed line of code. If you modify it before then it will start doing strange things (repeating commands etc..).
The simple answer is that the lines parameter can be set to a large value which will create a larger than normal window which will be scrollable.
The happy answer is that the mode command is not required. Simply create a shortcut. In the shortcut Properties\Layout set the Screen buffer size (Width: 130, Height: {maximum 9999}), Window Size (Width: 130, Height: {25 for example}) This will create a window 130*25 and the buffered contents (up to a maximum of 9999 lines) will be scrollable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With