Hi. So I want to open a application from Java code and open a new terminal for that application also through Java code. We can open the new terminal manually by entering ctrl+alt+t. But I need to do this via code without entering any keys. Can anyone suggest something?

Recommended Answers

All 2 Replies

Can you send those keys to the app's system input stream via ProcessBuilder?

So what I understood from your question is what are the alternatives to open a new terminal without the use of ctrl+ alt+ t. So, there are quite several methods to do so, and here’s a method which I prefer:

First of all, opening a blank terminal would be required. To do so, click on the window icon visible in the top left part of your screen. Several options will open up, click on the show view option and then on the terminal. Once the terminal is launched, click on the bottom right alongside the terminal window line. A small blue window icon would be visible; click and go ahead with that. Once you have clicked on the window icon, a launch terminal window will appear. Select the terminal as the local terminal and set the encoding to Default (or any other option depending on your needs and wants). Select Ok, and your local terminal will be visible on the screen.

Hope this method works for you, too; please let me know if your problem was resolved or not.

commented: Utterly failed to read the question -> Irrelevant reply. -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.