Setting environment variable java.awt.headless=true for an account
For one of my GUI installers, there is a requirement to add variable java.awt.headless=true to the environment system properties of the account I am running the installer as.
I take it to mean set environment variable in .bash_profile of the account as export java.awt.headless = true. However, when I su - <user> to the account I get a message -bash: export: `java.awt.headless': not a valid identifier -bash: export: `=': not a valid identifier What am I missing? This is also probably the cause of the error below when I try to run the GUI installer Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit at java.awt.Component.<clinit>(Component.java:595) at com.izforge.izpack.installer.GUIInstaller.showFatalError(Unknown Source) at com.izforge.izpack.installer.GUIInstaller.<init>(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.Class.newInstance(Class.java:374) at com.izforge.izpack.installer.Installer.main(Unknown Source) Any ideas/suggestions on what I could be missing? I have confirmed xeyes works fine so X11 is set correctly. Thanks |
Variable names cannot contain dots in bash. Maybe you want to set it inside the java program. Here is a (maybe) relevant topic: http://stackoverflow.com/questions/2...ogrammatically
|
|
Thank you for the info regarding dots not being allowed. Did not know that. Is there any other way to set this variable at command line level? My installer asks me to run the installer as java -jar <name of jar> and I do not have the source where I can update the variable.
|
Quote:
Code:
java -Djava.awt.headless=true -jar <name of jar> EDIT:... which by the way was also mentioned in the link I posted in my previous answer :-) |
Than You. That got me beyond that error.
|
All times are GMT -5. The time now is 07:52 PM. |