Skip to content

Tag: terminal

Print to a specific point in the terminal

I have a method that prints an upload progress like this: 36% [=================> ] 210,81 KB/s To rewrite the line, I use the escape charachter ‘r’, which sets the “cursor” to the beginnig of the line. Everything works as intended, but when i shrink down enough the terminal, it will write it on 2 lines, but when it prints again

Maven shows no colors in macOS terminal

I installed Maven (the latest version, 3.8.3) via Homebrew (brew install maven) on a Mac running the latest macOS Monterey (12.0.1, Apple Silicon). When I run any mvn command in the terminal, the output is plain white with no colors and no bold text. I tried the same command (also version 3.8.3) on my older MacBook (Monterey 12.0.1 as well),

ProcessBuilder’s inputstream empty depending of OS

I made this simple piece of code to test ProcessBuilder: It works in Windows (returns python version of my system) but the same code in my macbook returns end of line, so basically empty. ¿This needs further configuration according to the OS? ¿why is this happening? Answer What error code are you getting? There are (at least) two explanations; that

jps command for Hadoop processes

there. I have hadoop 2.4.1 running on ubuntu. Executing jps command, I am getting this output: is it normal to get “3794 org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar” along with the output of jps? I am asking because didn’t get it before. Suddenly, it started to give this result with jps. Answer jps lists all Java processes on your machine. It is not specific to

java command accessing text files

I want to run my project in the command line with the java command but I get an error, input.txt (no such file or directory) In my program I am reading from the file input.txt and when I compile and run the program from eclipse it works completely fine without any problems, but with the java command I keep on