Created attachment 1092547 [details] Sample program to demonstrate bug Running appletviewer Test.java complains about /opt/X11/bin/xprop not being found. xprop is located in /usr/bin in fedora 23. Sample program attached to demonstrate problem. Run: javac Test.java appletviewer Test.java Expected Results: appletviewer not complaining and throwing expectations, and figuring out where xprop is. I appreciate the community effort. Giorgian
Looks like we may just need to add a path to the search location string/array. Assigning to Omair assuming this is something that can be quickly addressed.
Hi Giorgian, So I've tried reproducing your bug on Fedora 23, using the latest java-1.8.0-openjdk after a dnf update, but am unable to reproduce. Could you indicate the exact version of the openjdk packages you have installed, and also perhaps a text dump of how you run the program and the exact output you see? Thanks, Anirudh
Here's what happens when I run it [giorgian@fedora ~]$ javac Test.java [giorgian@fedora ~]$ appletviewer Test.java java.io.IOException: Cannot run program "/opt/X11/bin/xprop": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at java.lang.Runtime.exec(Runtime.java:620) at java.lang.Runtime.exec(Runtime.java:450) at java.lang.Runtime.exec(Runtime.java:347) at org.GNOME.Accessibility.AtkWrapper.<clinit>(AtkWrapper.java:34) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at java.lang.Class.newInstance(Class.java:442) at java.awt.Toolkit.loadAssistiveTechnologies(Toolkit.java:805) at java.awt.Toolkit.getDefaultToolkit(Toolkit.java:887) at java.awt.Window.getToolkit(Window.java:1362) at java.awt.Window.init(Window.java:506) at java.awt.Window.<init>(Window.java:537) at java.awt.Frame.<init>(Frame.java:420) at java.awt.Frame.<init>(Frame.java:385) at sun.applet.AppletViewer.<init>(AppletViewer.java:159) at sun.applet.StdAppletViewerFactory.createAppletViewer(AppletViewer.java:98) at sun.applet.AppletViewer.parse(AppletViewer.java:1158) at sun.applet.AppletViewer.parse(AppletViewer.java:1092) at sun.applet.Main.run(Main.java:156) at sun.applet.Main.main(Main.java:98) Caused by: java.io.IOException: error=2, No such file or directory at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.<init>(UNIXProcess.java:248) at java.lang.ProcessImpl.start(ProcessImpl.java:134) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 22 more Info about openjdk: [giorgian@fedora ~]$ sudo dnf install java-1.8.0-openjdk Last metadata expiration check performed 0:00:57 ago on Thu Nov 12 16:03:56 2015. Package java-1.8.0-openjdk-1:1.8.0.65-3.b17.fc23.x86_64 is already installed, skipping. Dependencies resolved. Nothing to do. Complete! [giorgian@fedora ~]$ dnf info java-1.8.0-openjdk Last metadata expiration check performed 1 day, 19:00:24 ago on Tue Nov 10 21:05:03 2015. Installed Packages Name : java-1.8.0-openjdk Arch : x86_64 Epoch : 1 Version : 1.8.0.65 Release : 3.b17.fc23 Size : 501 k Repo : @System From repo : updates Summary : OpenJDK Runtime Environment URL : http://openjdk.java.net/ License : ASL 1.1 and ASL 2.0 and GPL+ and GPLv2 and GPLv2 with exceptions and LGPL+ and LGPLv2 and : MPLv1.0 and MPLv1.1 and Public Domain and W3C Description : The OpenJDK runtime environment. Available Packages Name : java-1.8.0-openjdk Arch : i686 Epoch : 1 Version : 1.8.0.65 Release : 3.b17.fc23 Size : 217 k Repo : updates Summary : OpenJDK Runtime Environment URL : http://openjdk.java.net/ License : ASL 1.1 and ASL 2.0 and GPL+ and GPLv2 and GPLv2 with exceptions and LGPL+ and LGPLv2 and : MPLv1.0 and MPLv1.1 and Public Domain and W3C Description : The OpenJDK runtime environment. Giorgian
Ok, this isn't part of OpenJDK - I checked the sources and also couldn't reproduce it here - this hard-wired path is coming from the GNOME accessibility layer: java.io.IOException: Cannot run program "/opt/X11/bin/xprop": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) at java.lang.Runtime.exec(Runtime.java:620) at java.lang.Runtime.exec(Runtime.java:450) at java.lang.Runtime.exec(Runtime.java:347) at org.GNOME.Accessibility.AtkWrapper.<clinit>(AtkWrapper.java:34)
(In reply to Andrew John Hughes from comment #4) > Ok, this isn't part of OpenJDK - I checked the sources and also couldn't > reproduce it here - this hard-wired path is coming from the GNOME > accessibility layer: > > java.io.IOException: Cannot run program "/opt/X11/bin/xprop": error=2, No > such file or directory > at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048) > at java.lang.Runtime.exec(Runtime.java:620) > at java.lang.Runtime.exec(Runtime.java:450) > at java.lang.Runtime.exec(Runtime.java:347) > at org.GNOME.Accessibility.AtkWrapper.<clinit>(AtkWrapper.java:34) What should I do then?
I think this bug needs to be looked at by whoever works on the accessibility layer. I'm not sure who that is.
I guess the problem goes away if Giorgian removes java-atk-wrapper. $ jar -tf /usr/lib64/java-atk-wrapper/java-atk-wrapper.jar | grep AtkWrapper org/GNOME/Accessibility/AtkWrapper$1.class org/GNOME/Accessibility/AtkWrapper$2.class org/GNOME/Accessibility/AtkWrapper$3.class org/GNOME/Accessibility/AtkWrapper$4.class org/GNOME/Accessibility/AtkWrapper.class $ rpm -qf /usr/lib64/java-atk-wrapper/java-atk-wrapper.jar java-atk-wrapper-0.33.2-0.fc23.x86_64
(In reply to Andrew John Hughes from comment #6) > I think this bug needs to be looked at by whoever works on the accessibility > layer. I'm not sure who that is. So is the problem in java-atk-wrapper or the code that it interfaces with in Gnome?
(In reply to Severin Gehwolf from comment #7) > I guess the problem goes away if Giorgian removes java-atk-wrapper. > > $ jar -tf /usr/lib64/java-atk-wrapper/java-atk-wrapper.jar | grep AtkWrapper > org/GNOME/Accessibility/AtkWrapper$1.class > org/GNOME/Accessibility/AtkWrapper$2.class > org/GNOME/Accessibility/AtkWrapper$3.class > org/GNOME/Accessibility/AtkWrapper$4.class > org/GNOME/Accessibility/AtkWrapper.class > $ rpm -qf /usr/lib64/java-atk-wrapper/java-atk-wrapper.jar > java-atk-wrapper-0.33.2-0.fc23.x86_64 It's not exactly a functional problem, more of a aesthetics problem. Also this could also be the reason why (my) applets haven't been displaying the way I expect them too (It could just be me though. Just learning to use the Java AWT.)
(In reply to Deepak Bhole from comment #8) > (In reply to Andrew John Hughes from comment #6) > > I think this bug needs to be looked at by whoever works on the accessibility > > layer. I'm not sure who that is. > > So is the problem in java-atk-wrapper or the code that it interfaces with in > Gnome? Yes. I couldn't remember the name of the new package and it doesn't appear to be coming up for me to re-assign this bug to it. But not an OpenJDK issue.
(In reply to Andrew John Hughes from comment #10) > (In reply to Deepak Bhole from comment #8) > > (In reply to Andrew John Hughes from comment #6) > > > I think this bug needs to be looked at by whoever works on the accessibility > > > layer. I'm not sure who that is. > > > > So is the problem in java-atk-wrapper or the code that it interfaces with in > > Gnome? > > Yes. I couldn't remember the name of the new package and it doesn't appear > to be coming up for me to re-assign this bug to it. But not an OpenJDK issue. Thanks, re-assigning.
Keeping assignment to Anirudh despite new component (which is also under our team) to investigate.
I have this same issue when trying to launch armitage. I created a the /opt/X11/bin directory and then added a soft link mkdir /opt/X11 mkdir /opt/X11/bin ln -s /usr/bin/xprop /opt/X11/bin/xprop This made the binary available! You may want to just add in soft links instead of rewritting openJDK for the mean time. This has been an issue in Fedora for quite a while.
> You may want to just add in soft links > instead of rewritting openJDK for the mean time. This has been an issue in > Fedora for quite a while. As mentioned above, this is not an OpenJDK bug, but an issue with java-atk-wrapper. If you don't need the accessibility layer, you can just remove that package to fix the problem. Anirudh, what is the status of this issue?
(In reply to Andrew John Hughes from comment #14) > > You may want to just add in soft links > > instead of rewritting openJDK for the mean time. This has been an issue in > > Fedora for quite a while. > > As mentioned above, this is not an OpenJDK bug, but an issue with > java-atk-wrapper. If you don't need the accessibility layer, you can just > remove that package to fix the problem. > > Anirudh, what is the status of this issue? The issue is that sources downloaded for the package contain a pre-built AtkWrapper.java with an incorrect path to xprop. As of now, I have made a fix in rawhide to remove that file so that it is auto-generated again with the correct path during package installation.
(In reply to Anirudh Mukundan from comment #15) > As of now, I have made a fix in rawhide to remove that file so that it is > auto-generated again with the correct path during package installation. If the fix is safe to backport, please backport it to F23 too. Then we can close this bug.
java-atk-wrapper-0.33.2-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2016-458ecd40b9
java-atk-wrapper-0.33.2-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-458ecd40b9
java-atk-wrapper-0.33.2-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.