Setting Command Prompt Window Size programmatically

D

Dino Buljubasic

Hi,

How can I set the Command Prompt window size programmatically in Java.
I am quite new in Java, but would like to be able to set the size of
Command Prompt (Windows OS) window when main starts before doing
anything else.

Thank you
 
J

John Davison

Dino said:
Hi,

How can I set the Command Prompt window size programmatically in Java.
I am quite new in Java, but would like to be able to set the size of
Command Prompt (Windows OS) window when main starts before doing
anything else.

Thank you

You cannot, not in Java. Inside the normal command shell, you can use

mode con cols=x
mode con lines=x

but I'm not sure how to get Java to do that before it starts executing
the program.

This is outside the scope of this newsgroup -- ask around on the
microsoft newsgroups about it.

- john
 
B

Boudewijn Dijkstra

John Davison said:
You cannot, not in Java. Inside the normal command shell, you can use

c:\windows\system32\cmd.exe /c mode con cols=80 lines=50
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top