I have a very simple program here:
public class Test {
public static void main(String[] args) {
System.err.println("HI");
}
}
When I execute this with the following command: gksu "java Test.class"
and enter in my password, it does not return "HI" as expected. What am I doing wrong here? I am stumped.
The reason I am using gksu
and not just normal java
is because I want to launch my program as root from eclipse. I followed this answer and this is my outcome. My original program is a lot bigger than this. This is just a demo to display the problem.