In my case Java app is JDownloader. I prepared chroot environment as explained here:
http://www.0x61.com/forum/post5240333.html#p5240333(broken link)- Error running java in a chroot on Linux, and
- xchroot (at estel.org)
So, I have java installed, added group and user, JDownload files copied, but when I try to run it (as regular user under chroot; I run chroot as root, but once I am in chroot, I switch to chroot regular user):
java -Xmx512m -jar JDownloader.jar
I got some positive messages like loading skins by JDownloader
10 4/6/11 2:15:17 PM - FINER [jd.JDClassLoader(<init>)] -> Look and Feel JAR loaded: /mnt/jd/libs/laf/syntheticaSilverMoon.jar
but that's end of the story – app does not show up. No matter if I use chroot to run chroot environment or openroot, the outcome is the same.
When I run JDownload as chroot-root I got a little more output but at the end exception occurs:
10 4/6/11 2:39:23 PM - FINER [jd.config.DatabaseConnector(<init>)] -> Loading database
10 4/6/11 2:39:23 PM - FINER [jd.config.DatabaseConnector(checkDatabaseHeader)] -> Checking database
10 4/6/11 2:39:23 PM - INFO [jd.Main(main)] -> init Splash
------------------------ Thread: 11 -----------------------
11 4/6/11 2:39:25 PM - INFO [jd.gui.swing.laf.LookAndFeelController(setUIManager)] -> Use Look & Feel: de.javasoft.plaf.synthetica.SyntheticaSimple2DLookAndFeel
11 4/6/11 2:39:25 PM - SEVERE [jd.controlling.JDLogger(exception)] -> SEVERE Exception occurred java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
I have the same Java installed in chroot and normal system, and I can run the same JDownloader in normal system; no problems here.
What I am missing here? How do I run GUI Java app?
schroot
and set the$DISPLAY
environment variable in the chroot.