Problem running Java applications on Lubuntu 12.10

Aere Greenway Aere at Dvorak-Keyboards.com
Sun Oct 28 22:12:04 UTC 2012


-----Original Message-----
From: Yorvyk <yorvik.ubunto at googlemail.com>
To: lubuntu-users at lists.ubuntu.com
Subject: Re: Problem running Java applications on Lubuntu 12.10
Date: Sun, 28 Oct 2012 09:02:07 +0000


On 28/10/12 02:37, Aere Greenway wrote:
> On Sat, 2012-10-27 at 18:55 -0600, Aere Greenway wrote:
>> On Sat, 2012-10-27 at 12:07 -0600, Aere Greenway wrote:
>>> All:
>>>
>>> I just noticed something running Java applications on Lubuntu
>>> 12.10, and it probably didn't do it before the latest updates I
>>> installed today (which included updates to the Java JRE/JDK's.
>>>
>>> When I run a Java application, there is no indication of it (or
>>> any of its sub-windows) in the taskbar!
>>>
>>> The application is obviously there, and works, but it doesn't
>>> appear in the taskbar.
>>>
>>> When the Java application shows a modal dialog box, that dialog
>>> box gets window focus, but when you finish with it (the dialog is
>>> closed), the main application does not get re-focused.
>>>
>>> I can't get to it via Alt-Tab.  The only application in the
>>> taskbar is Evolution mail.
>>>
>>> The only way I can get back to my Java application main window,
>>> is to actually click on the Java application's window, and I have
>>> to do that every single time it uses a sub-window, which is a
>>> real pain!
>>>
>>> --
>>>
>>> Sincerely, Aere
>>>
>>>
>>
>> All:
>>
>> I have a bit more information on this problem.
>>
>> On one of my upgraded Lubuntu systems (12.04 to 12.10), I had
>> installed specifically the open Java 6 JRE/JDK (instead of the
>> default JRE/JDK, which in 12.10, is Open Java 7).
>>
>> On that machine (which doesn't have Open Java 7), everything is
>> fine - the Java applications are displayed on the taskbar.
>>
>> So it appears to be a problem with Open Java 7.
>>
>> I did still more checking on the machines that had the problem.
>>
>> I found that the problem (no Java applications in the taskbar) was
>> present after the upgrade, and before any Java updates.
>>
>> After applying the Java updates (to both Java 7 and Java 6), the
>> problem was still there.
>>
>> So the problem was not introduced by the recent Java updates.
>>
>> Sincerely, Aere
>>
>>
>
> All:
>
> I have successfully worked-around this problem by removing the
> default-jre and default-jdk packages, along with the specific open
> Java 7 packages.
>
> Of course, at some point, it will cause problems for me again when I
>  eventually have to use open Java 7.
>
> But maybe the problem will be fixed by then...
>
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.  


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.  

In my Windows partition (which has Java 7), it also doesn't show any of
my Java application windows in the task bar.  BUT, when you do Alt-Tab,
they appear in that list, so you can tab-to whichever Java application
window you want, which you can't do on Linux.  On Linux, the only way to
get focus back to the application window is to click on it.    

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.  

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.  

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.  

The Java applications that have the problem, are those that you start
using the "java -jar YourApp.jar" command (where "YourApp" is whatever
the filename is of your Java application).  

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 may migrate them to that anyway.  

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.  

I hope this information is useful.  

-- 


Sincerely,
Aere
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/lubuntu-users/attachments/20121028/53f1cfa4/attachment.html>


More information about the Lubuntu-users mailing list