How to clear the command line if a server is running? - command-line

I'm used to running servers from Eclipse but since I'm switching my IDE to lightweight editor I have to run servers from command line. In Eclipse you have this nice feature on it's console to clear the screen while the server is running.
I wanted to do the same in command line. Obviously "cls" isn't going to run if I'm running my server so just wondering if there is a way or any other tool that gets this job done.

Not very elegant, but what I usually do is to set the Window buffer size to 1 and then back to the original value.
That's right-click on title bar / Properties / Layout. You could also need to restore Window height to the original value.

Related

On NetBeans, my Node.js server does not automatically restart after changes

I've been using Atom, Sublime Text and Code, and all of those would make the server restart after any changes. With Netbens it doesn't happen.
I have two different servers in my project, one for the client and other for API. Simply executing the commands in either my OS's terminal or Netbeans's terminal also doesn't make the server to restart. Tried to look for suggestions but those I found also didn't happen. The solution was to modify the start file in Properties > Run and check the only checkbox it's in there, but nothing.
What's necessary to do in Netbeans to refresh the server automatically after saving any file? And also, how to run two at the same time? Client and API.

Pydev Console is very slow

When I open a pydev console, it takes several seconds before I get a cursor. I have a single file "Hello World" sort of project. There are no large variables to show.
My installation used Kepler-CDT, and I then installed PyDev (Latest, version 3.6.0)
I right select the console icon, select New PyDev Console, and then the console selection dialog appears. I select "Python console" (OK).
"Create Interactive Console" shows in the eclipse progress bar. Eventually, IPython starts, and after 20 seconds or so, I get a >>> prompt.
If I press enter at the prompt, another prompt appears as expected, but it usually take 4 or 5 seconds.
Some suggestions I have seen talk about firewall issues, how would I go about checking this?
How do I debug this problem?
What's your OS? From what you're saying, the issue really 'appears' to be either some network misconfiguration or possibly some firewall/antivirus making things slower (you can try disabling those to test if things go faster). As for a network misconfiguration, you can try checking your hosts file to see if things are correct there (I've had reports where there were other things, but these are the most common -- for other situations it may be more difficult to diagnose as usually each particular case is something different).

Is it possible to stop output to console within eclipse?

within eclipse running same result will be output console and testng plugin view.most of time,I will switch back to testng plugin view to check result.so is it possible to stop to output running result to eclipse console view?Or let user to choose which view be current view(or called default result checking view).
Not sure if I understand the question correctly, but you can disable automatic showing of the console view by unchecking icons and .
Alternatively you can discard all your output just by redirecting it to a /dev/null (if you are on UNIX based system) in Run Configurations > TestNG > your run config > Common.
However the easiest way is to move the test view to a side panel rather than the same area where the console is.

eclipse debug perl curses

I am writing a Perl program that uses curses for output and move the cursor, and color characters. Previously, when I was working under windows I use Komodo it was able to run an external console.
Now I work in Linux environment and use eclipse + epic. If you try to just run the script, it uses the internal console eclipse, which is very cut. You can just run the script using external tool, but I'm interested to debug using external console window. Is this possible?
Unfortunately, use of a File and /dev/pty/1 does not help in solving my problem.
The fact is that in this case it is impossible to get the characters introduced in the console through curses getch(). Always returned 1 instead code of pressed key.
Here is an answer that will take you most of the way (based on post #6 of: http://ubuntuforums.org/showthread.php?t=743131, although since then, in the "Indigo" and "Juno" versions of Eclipse, things have changed somewhat, and this answer is up to date):
Go to "Run -> Debug configurations". Click on the (fourth) "Common" tab. Go to the third frame from top, and there, check-mark the checkbox which says: "File". Enter the file name of the console window you want your output in.

Eclipse - Running programs not in the native eclipse console

I'm currently writing some ncurses code and the native Eclipse (3.2.2) console can't display its graphics. I'd instead like to run the program through xterm. What I want is to be able to start xterm and run from there. I'd prefer to not get involved with any plugins or that jazz. Just something simple.
EDIT
So I have the answer and it was pretty simple...
Run -> External Tools -> External Tools -> New Launch Config...
Then select location of your terminal emulator. /usr/bin/gnome-terminal in my case.
after that set the appropriate arguments. "-e ~/ncurses/start" in my case.
Then make sure you aren't allocating a console by unchecking that option in the "Common" tab.
Annon add to his question:
its a pain to keep switching back and forth from eclipse and the terminal. I'm looking for a way to just hit something like"F5" and have it run my ncurses program in a new xterm terminal process
The simplest way to do that is to report the command line into an external tool configuration, and point eclipse to use a shell (like described in this program)
In the argument, you will add the command line eclipse execute (command line which can be retrieved as mentioned in the second part of this answer below).
Of course, replace 'cmd.exe' by the shell of your choice, and try not setting the 'Allocate Console' checkbox in the Common tab of that external launcher.
To launch through a xterm, without eclipse involved (not what you are asking for, just keep here for archive)
You can launch your program through Eclipse (Run Configurations), and observe through a 'ps' command the exact Java command line used.
Or launch it in debug mode, and right click the task in Debug view and open Properties. It will show the command line, as documented here.
Then launch that command line directly in your console (Eclipse being not involved at all at this point).