Skip to content
Advertisement

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

Vs code terminal issue

When I tried to run java code in visual studio code, the terminal is throwing an error PowerShell terminated with exit code:4294901760 I have searched all queries but nothing is relatable. Answer You need to install java in VS-Code. To do so you can just search “java” in the extensions search bar. after that you will see an extension called

Package Visibility Issue in Java

DETAILS : I am trying to build a java project from command line with the following directory structure : QUESTION : I assume that Main.java has access to all classes, enums, interfaces, and annotations of all the four folders. But, if I want to use the enum in tokens package, is there any way to do so ? By way,

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

How to create a .jar file using the terminal

I’m trying to create a .jar file using the mac terminal but am having bit of trouble. I followed the steps here but was unsuccessful. I got this error message: So how exactly do you go about doing it? My java program is called Main.java and I have compiled it into a .class file. Now what do I do? Thanks

Advertisement