<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.6.0">
</HEAD>
<BODY>
-----Original Message-----<BR>
<B>From</B>: Yorvyk <<A HREF="mailto:Yorvyk%20%3cyorvik.ubunto@googlemail.com%3e">yorvik.ubunto@googlemail.com</A>><BR>
<B>To</B>: <A HREF="mailto:lubuntu-users@lists.ubuntu.com">lubuntu-users@lists.ubuntu.com</A><BR>
<B>Subject</B>: Re: Problem running Java applications on Lubuntu 12.10<BR>
<B>Date</B>: Sun, 28 Oct 2012 09:02:07 +0000<BR>
<BR>
<PRE>
On 28/10/12 02:37, Aere Greenway wrote:
<FONT COLOR="#737373">> On Sat, 2012-10-27 at 18:55 -0600, Aere Greenway wrote:</FONT>
<FONT COLOR="#737373">>> On Sat, 2012-10-27 at 12:07 -0600, Aere Greenway wrote:</FONT>
<FONT COLOR="#737373">>>> All:</FONT>
<FONT COLOR="#737373">>>></FONT>
<FONT COLOR="#737373">>>> I just noticed something running Java applications on Lubuntu</FONT>
<FONT COLOR="#737373">>>> 12.10, and it probably didn't do it before the latest updates I</FONT>
<FONT COLOR="#737373">>>> installed today (which included updates to the Java JRE/JDK's.</FONT>
<FONT COLOR="#737373">>>></FONT>
<FONT COLOR="#737373">>>> When I run a Java application, there is no indication of it (or</FONT>
<FONT COLOR="#737373">>>> any of its sub-windows) in the taskbar!</FONT>
<FONT COLOR="#737373">>>></FONT>
<FONT COLOR="#737373">>>> The application is obviously there, and works, but it doesn't</FONT>
<FONT COLOR="#737373">>>> appear in the taskbar.</FONT>
<FONT COLOR="#737373">>>></FONT>
<FONT COLOR="#737373">>>> When the Java application shows a modal dialog box, that dialog</FONT>
<FONT COLOR="#737373">>>> box gets window focus, but when you finish with it (the dialog is</FONT>
<FONT COLOR="#737373">>>> closed), the main application does not get re-focused.</FONT>
<FONT COLOR="#737373">>>></FONT>
<FONT COLOR="#737373">>>> I can't get to it via Alt-Tab.  The only application in the</FONT>
<FONT COLOR="#737373">>>> taskbar is Evolution mail.</FONT>
<FONT COLOR="#737373">>>></FONT>
<FONT COLOR="#737373">>>> The only way I can get back to my Java application main window,</FONT>
<FONT COLOR="#737373">>>> is to actually click on the Java application's window, and I have</FONT>
<FONT COLOR="#737373">>>> to do that every single time it uses a sub-window, which is a</FONT>
<FONT COLOR="#737373">>>> real pain!</FONT>
<FONT COLOR="#737373">>>></FONT>
<FONT COLOR="#737373">>>> --</FONT>
<FONT COLOR="#737373">>>></FONT>
<FONT COLOR="#737373">>>> Sincerely, Aere</FONT>
<FONT COLOR="#737373">>>></FONT>
<FONT COLOR="#737373">>>></FONT>
<FONT COLOR="#737373">>></FONT>
<FONT COLOR="#737373">>> All:</FONT>
<FONT COLOR="#737373">>></FONT>
<FONT COLOR="#737373">>> I have a bit more information on this problem.</FONT>
<FONT COLOR="#737373">>></FONT>
<FONT COLOR="#737373">>> On one of my upgraded Lubuntu systems (12.04 to 12.10), I had</FONT>
<FONT COLOR="#737373">>> installed specifically the open Java 6 JRE/JDK (instead of the</FONT>
<FONT COLOR="#737373">>> default JRE/JDK, which in 12.10, is Open Java 7).</FONT>
<FONT COLOR="#737373">>></FONT>
<FONT COLOR="#737373">>> On that machine (which doesn't have Open Java 7), everything is</FONT>
<FONT COLOR="#737373">>> fine - the Java applications are displayed on the taskbar.</FONT>
<FONT COLOR="#737373">>></FONT>
<FONT COLOR="#737373">>> So it appears to be a problem with Open Java 7.</FONT>
<FONT COLOR="#737373">>></FONT>
<FONT COLOR="#737373">>> I did still more checking on the machines that had the problem.</FONT>
<FONT COLOR="#737373">>></FONT>
<FONT COLOR="#737373">>> I found that the problem (no Java applications in the taskbar) was</FONT>
<FONT COLOR="#737373">>> present after the upgrade, and before any Java updates.</FONT>
<FONT COLOR="#737373">>></FONT>
<FONT COLOR="#737373">>> After applying the Java updates (to both Java 7 and Java 6), the</FONT>
<FONT COLOR="#737373">>> problem was still there.</FONT>
<FONT COLOR="#737373">>></FONT>
<FONT COLOR="#737373">>> So the problem was not introduced by the recent Java updates.</FONT>
<FONT COLOR="#737373">>></FONT>
<FONT COLOR="#737373">>> Sincerely, Aere</FONT>
<FONT COLOR="#737373">>></FONT>
<FONT COLOR="#737373">>></FONT>
<FONT COLOR="#737373">></FONT>
<FONT COLOR="#737373">> All:</FONT>
<FONT COLOR="#737373">></FONT>
<FONT COLOR="#737373">> I have successfully worked-around this problem by removing the</FONT>
<FONT COLOR="#737373">> default-jre and default-jdk packages, along with the specific open</FONT>
<FONT COLOR="#737373">> Java 7 packages.</FONT>
<FONT COLOR="#737373">></FONT>
<FONT COLOR="#737373">> Of course, at some point, it will cause problems for me again when I</FONT>
<FONT COLOR="#737373">>  eventually have to use open Java 7.</FONT>
<FONT COLOR="#737373">></FONT>
<FONT COLOR="#737373">> But maybe the problem will be fixed by then...</FONT>
<FONT COLOR="#737373">></FONT>
A quick google shows that this has been a problem with java apps for
some time.  There doesn't appear to be any single solution.



Yorvyk, and all:

Just a few more relevant pieces of information on this problem.  

</PRE>
On Java 7, there are things one can do within a program to put icons in the system tray - normally an icon only, so I suspect it is not the task-bar, but really the System Tray.  <BR>
<BR>
In my Windows partition (which has Java 7), it also doesn't show any of my Java application windows in the task bar.  <I>BUT,</I> when you do Alt-Tab, they appear in that list, so you can tab-to whichever Java application window you want, which you <I>can't</I> do on Linux.  On Linux, the only way to get focus back to the application window is to click on it.    <BR>
<BR>
Also, in Windows, when you dismiss a sub-window, focus returns to the main Java application window, so it avoids the extreme aggravation you experience on Linux, where it leaves either no window focused, or some other window focused (such as your e-mail client), rather than the Java application you called-up the sub-window from.  <BR>
<BR>
I will be experimenting with the code to put my application windows in the system tray, but keep in mind that there are so many Java applications out there that don't do this code (if the code can be made to do it at all), and the user can't just re-compile the application they got and make those changes.  <BR>
<BR>
One good thing I noticed, is that if I launch the application using the JNLP (Java Network Launch Protocol), all of the application windows appear in the task-bar, so there is something that Java Web-Start does for you to make this happen.  I have not yet learned what that 'something' is.  <BR>
<BR>
The Java applications that have the problem, are those that you start using the "<TT>java -jar YourApp.jar</TT>" command (where "YourApp" is whatever the filename is of your Java application).  <BR>
<BR>
If I cannot solve the problem from within the Java code, I will simply migrate my applications to be launched using Java Web-Start (JNLP), and I <I>may</I> migrate them to that anyway.  <BR>
<BR>
One other piece of information, is that I reproduced the problem on Ubuntu (Unity desktop) 12.10, so it is not a problem specific to Lubuntu.  <BR>
<BR>
I hope this information is useful.  <BR>
<BR>
-- 
<PRE>

Sincerely,
Aere
</PRE>
</BODY>
</HTML>