Hi there,
I am a newbie to R and just installed R 2.7.2 and JGR. As root, JGR
launch successfully both in R or by a launcher (a script in shell), but
it not works for non-root user. What's the cause of this issue?
sudo update-java-alternatives -s java-6-sun
sudo R CMD javareconf
sudo R>install.packages("JGR", dep=TRUE)
>library(JGR)
>JGR() # JGR launched successfully and automatically creat a script
'/usr/local/lib/R/library/JGR/scripts/run'>quit()
now,
'sudo /usr/local/lib/R/library/JGR/scripts/run' can launch JGR.
but as a non-root user,
'/usr/local/lib/R/library/JGR/scripts/run' cannot launch it.
and as a non-root user, again, it cannot launch in R either, as below:
The 'error message' reads:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initSystemColorDefaults(GTKLookAndFeel.java:1267)
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1509)
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel.access$000(GTKLookAndFeel.java:37)
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel$WeakPCL$1.run(GTKLookAndFeel.java:1449)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
ERROR: while running main method:
java.lang.reflect.InvocationTargetException
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at RJavaClassLoader.bootClass(RJavaClassLoader.java:290)
at RJavaClassLoader.main(RJavaClassLoader.java:326)
Caused by: java.lang.NullPointerException
at
javax.swing.plaf.synth.SynthLookAndFeel$AATextListener.propertyChange(SynthLookAndFeel.java:793)
at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:347)
at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
at java.awt.Toolkit.setDesktopProperty(Toolkit.java:1784)
at
sun.awt.SunToolkit.fireDesktopFontPropertyChanges(SunToolkit.java:1714)
at sun.awt.SunToolkit.setAAFontSettingsCondition(SunToolkit.java:1759)
at
sun.swing.SwingUtilities2$AATextInfo.getAATextInfo(SwingUtilities2.java:119)
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initComponentDefaults(GTKLookAndFeel.java:1258)
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel.getDefaults(GTKLookAndFeel.java:294)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:537)
at javax.swing.UIManager.setLookAndFeel(UIManager.java:581)
at org.rosuda.JGR.JGR.main(JGR.java:528)
... 6 more
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel.initSystemColorDefaults(GTKLookAndFeel.java:1267)
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel.loadStyles(GTKLookAndFeel.java:1509)
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel.access$000(GTKLookAndFeel.java:37)
at
com.sun.java.swing.plaf.gtk.GTKLookAndFeel$WeakPCL$1.run(GTKLookAndFeel.java:1449)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
at
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
at
java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)