I have developed a console application with Java. Now I am distributing it to the users who do not have administrator privileges. Users will run the program in Windows 7 or later. They will start the program by double clicking to a .bat file. I need that bat file, because I have to add some variables to the path before the program starts. In addition, I need to show some Turkish characters (such as ğ, ü) in console. Therefore, I change encoding to the 65001 or 857. However, the console's default font is set to "raster font" that cannot show Turkish characters. So, I wonder if there is a programmatic way of changing the font or not in bat file or not.

Actually, I have encountered a solution in this answer: https://stackoverflow.com/a/33548731/2979477, but I am looking for another way that do not use a .lnk shortcut, because I do not want users to suppose that it is a shortcut and can be deleted.

I also know the post in this link: How to change the Windows XP console font?, but I do not want to change the font permanently. Instead, I want it to be like a session-based.

So, I am open to any kind of solutions that I can change font in the batch file. By the way this is my bat file:

@echo off
set "PATH=C:\Users\some_path;%PATH%"
chcp 857
title My Program
color 0A
mode con: cols=100 lines=45
REM run my java program

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.