Changing the color of text in the console

I have a little problem. I'm making a console application, but would like to add some color to it. I know that it's possible, but for some reason the color of the text produced in the console by Java always defaults to light gray. Is there some way to change this color? There must be a command to do it.

For example, I want to write a Java program that produces the same output as this C++ program:

using namespace std;

int main()
cout << "Hi" << endl;
cout << "Bye" << endl;
return 0;

Does anyone know how to accomplish this? If you do, please let me know.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion