Sublime Forum

How to run java program in a new commamd window?

#1

hello everyone:
Can anybody tell me how to run my java program in a new command window with sublime text2 in windows?
That means when I press Ctrl+B ,it will open a new command window and auto compile and run my program, and I can input my data in somewhere where need it,when I press enter the program can go on in the window.
now what I can did is to compile and run my java program in the window in sublime text2,but I can’t input my data.That means I can only compile my program but I can’t run it in a right way.my english is soso,anybody who can help me?thx.

0 Likes

#2

I have had the same issue since I got Sublime text 2. At one time I could compile programs but I could never get a build system constructed that would allow compiling, running and display a simple println output in the sublime console.

I have seen people showing ruby scripts running with the output in the SL console window on videos but never Java.

This is a real detriment to new users of the editor when they are learning Java IMHO.

Dave

0 Likes

#3

I don’t know if this answer at SO is useful to you. Otherwise, perhaps the **REPL **package: it doesn’t list Java but is, I understand, configurable. There is a **Terminal **package as well. (ST cannot receive console-input by default.)

But I’m not a Java guy so perhaps someone else can offer more :wink:

0 Likes

#4

I have tried that suggestion too but without success.

I can of course run the compiled programs from my own terminal window but as the programs I run are pretty simple this is not ideal.

I also am learning Vim and can use that too so I am not “dead-in-the-water”.

Thanks…Dave

0 Likes