I have to install a jar file to /usr/local/. But when I run the command :
java -jar installme.jar
It gives an error about display:
No protocol specified
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class sun.awt.X11GraphicsEnvironment
However, when I login as a normal user instead of root, it allows me to start graphical installation. But, the setup needs to copy some files to /usr/local folder for which root's privileges is needed.
I've tried to write to .bashrc and profile this:
but it didn't work. What can I do? Thanks