Can't find the Command Line Tool to install it

Answered

Supposedly there is a plugin called Command Line Tool but it does not show up when I search for it using that plugin box. How am I supposed to track this plugin down so I can install it?

0
30 comments

This plug-ins is compatible with IntelliJ IDEA Ultimate and can be installed here:

0
Avatar
Permanently deleted user

Okay Thanks. I'd like to ask can this command line tools plugin be used to configure IntelliJ to run your Java program in a separate window?

Or can the "Run external tool" thing be used to tell IntelliJ to run your code in a separate window?

If not, what are these two tools really used for?

0
Avatar
Permanently deleted user

Or is it possible to configure IntelliJ to run your program in the command window? Like this:

But I would still want to execute the Run command from within IntelliJ. I only would want the program output to be directed to the command window.

0

There is no built-in configuration to run your command in the external terminal / command line shell window.

Yes, External Tools feature can be used for that.

0
Avatar
Permanently deleted user

But the real problem is that I would need to know how to set up this external tools feature. You have to know what to type in the boxes. Like working directory and arguments and path and that stuff. I don't know what to type in those boxes. Until I do, I can't get it set up.

0
Avatar
Permanently deleted user

Thanks but even though that's getting me closer, I still can't get it to do what I want. What happens is when I click the Run External Tools command which now shows in the drop down menu, the command window opens but all I see is things like the path or cmd.exe or all the different folders that are found there.

In other words my Java program isn't really run. If I write a simple Java program like this:

System.out.println("Welcome to Shred Guitar!")

When I run the external tools, I should be able to see my program's output like this:

Welcome to Shred Guitar!

 

0

Here is the sample configuration:

Program: c:\Windows\System32\cmd.exe

Parameters: /C "start cmd.exe /K "java $FileClass$""

Working directory: $OutputPath$

 

Result:

0
Avatar
Permanently deleted user

Well here is what I get when I try this:

I must have something set up wrong.

0

I've broken my eyes while trying to see the error on your screenshot. Please show the configuration you've made and how you invoke this external tool (it should be invoked from the context menu inside the file, you must also compile the class first and you must have "java" in PATH environment so that it can be called from cmd.exe without specifying the full path to the executable).

0
Avatar
Permanently deleted user

Sorry, I think I shrunk the image way too much. Try these:

0
Avatar
Permanently deleted user

Here is another:

0

These 2 screenshots don't show anything related. See my last response. Show the following:

1. External tool configuration

2. How and where you run the tool

3. The error you see

Before doing the above double check you have "java" in PATH and the class is compiled.

0
Avatar
Permanently deleted user

I got it going now. When I shut down IntelliJ my external tool never got saved. So I made a new one and copied and pasted your settings, and now it works good.

Thank You Very Much for your help.

0
Avatar
Permanently deleted user

Is there any way to tell IntelliJ not to print the path and directory that shows below your program output?

And it would be nice if I could close down the external window just by pressing the spacebar instead of having to hit the X button in the upper right corner.

0

Yes, you can do it, change the Parameters to the following:

/C "start cmd.exe /C "javaww.bat $FileClass$""

Create javaww.bat file somewhere in PATH with the following inside:

@java %*
@pause

Result:

0
Avatar
Permanently deleted user

Okay I will try it and give it a go. Your screenshots look great though. That's what I have been trying for a very long time to accomplish with various Java IDE's.

Java does not seem to be nearly as plug-n-play ready as C# or C++ is.

I greatly appreciate you helping me.

0

I'm not sure why you need it at all. What's wrong with the Application Run/Debug configuration in IntelliJ IDEA and showing the output of your application in the Run console?

0
Avatar
Permanently deleted user

I don't like the Process finished with exit code line. Another thing I don't like is during a program that requires user input, Java never places the cursor in the correct spot. The cursor should be placed right after the prompt, not at the beginning of the line. This really annoys me. Plus if you are used to the C++ and C# external window, it simply looks better.

By the way how can I place a batch file in the PATH? That is for variables. Not files.

Where on my disk or what folder do I store the batch file?

0

You have PATH environment variable defined where several directories are listed. You can place the batch file in any of these directories. C:\windows\system32 is in PATH by default.

0
Avatar
Permanently deleted user

Well I got close but not good enough for a cigar. When I ran cmd in external tools the program is telling me it can't find the main class of my program:

0

Where does the question mark come from? Did you add it into the batch file or into the external tool parameters by mistake?

Or you may need to add quoting to the parameters to handle the paths with spaces.

0
Avatar
Permanently deleted user

Batch file is written as you wrote it. I don't know where the question mark is coming from. What I should probably do is restore my system from a backup image (only takes a minute) and re-install JDK and IntelliJ. And then re-set everything.

Sometimes I get so involved and do so many changes that my system simply gets cluttered and goofed up.

0

I can't reproduce the problem you have even when the path has spaces.

Double check External Tool configuration, make sure the .class file is in the output path:

0
Avatar
Permanently deleted user

I'm going to experiment a little more with this today. Was wondering if I get it all worked out can I make a shortcut key to run this?

0

Yes, in the Keymap settings you can assign a keyboard shortcut to the external tool:

0
Avatar
Permanently deleted user

Okay I have included a screenshot of what things look like on my machine. At this point I was wondering if I can tell IntelliJ not to show the output window on the bottom when I run my code? I don't really need it.

0

Don't run the code, use external tool only.

0
Avatar
Permanently deleted user

I wonder what will happen when I write a project that asks the user to input something like an integer. Have not tested this yet. Is the IDE still going to force me to do input at the output window?

0

Please sign in to leave a comment.