I'm trying to create two progressbars for tasks in two different threads, but only one progressbar shows properly in windows cmd or powershell.
here's my code:
new Thread(){
@Override
public void run() {
ProgressBar pb = new ProgressBar("task 1",100);
for(int i = 0 ; i < 100 ; ++i){
pb.step();
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}.start();
new Thread(){
@Override
public void run() {
ProgressBar pb = new ProgressBar("task 2",200);
for(int i = 0 ; i < 100 ; ++i){
pb.step();
try {
Thread.sleep(500);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}.start();
See #100 and #109 : Progressbar is known to be broken on Cygwin / cmd / Powershell when using multiple bars. Multiple bars are only working under Linux/Mac/WSL. Sorry, but as of now there is no fix to this.
I'm trying to create two progressbars for tasks in two different threads, but only one progressbar shows properly in windows cmd or powershell. here's my code:
Please correct me if any usage is wrong, thanks.