Tag: terminal


c – Output coloured text to a Windows terminal

GetStdHandle function retrieves a handle to the specified standard device (standard input, standard output, or standard error). GetConsoleScreenBufferInfo function retrieves information about the specified console screen buffer. SetConsoleTextAttribute function sets the attributes of characters written to the console screen buffer by the WriteFile or WriteConsole function, or echoed by the ReadFile or ReadConsole function. This …


How to use java 1.7 instead of java 1.6 from console

We have this scenario. We have installed JRE 1.6 and the developer issues the command java -versionjava -version and he gets java version “1.6 …” But we have also installed JRE 1.7 and now our developer asks us to replace java 1.6 terminal command with java 1.7.   Let’s see how we can fix this …