You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pivot.apache.org by "Sandro Martini (JIRA)" <ji...@apache.org> on 2012/11/06 00:26:12 UTC

[jira] [Comment Edited] (PIVOT-781) Unable to get an initially maximized HostFrame in DesktopApplicationContext due to bug in Java 6 under ubuntu/linux

    [ https://issues.apache.org/jira/browse/PIVOT-781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491005#comment-13491005 ] 

Sandro Martini edited comment on PIVOT-781 at 11/5/12 11:25 PM:
----------------------------------------------------------------

Note that in my Linux VM (ubuntu-10.04.x, with latest JDK 6 from Oracle), I had already set (ok, it was wrong in the test bxml to exit calling System.exit ... now is fixed) under Java user preferences ($USER_HOME/.java/.userPrefs/org/apache/pivot/ ) a maximized = true flag, so even when not specifying --maximized=true in command line arguments to my test case I had some wrong behaviour (in the main() inside DesktopApplicationContext, Java preferences are loaded before command line flags). 
So before proceeding with this fix I had to delete that folder, with: 
rm -r .java/.userPrefs/org/apache/pivot/
anyway could be useful to someone, just to remember this trick.

Note that on the save maximized flag at exit there could be something other to fix, I have to look better ... 
                
      was (Author: smartini):
    Note that in my Linux VM (ubuntu-10.04.x, with latest JDK 6 from Oracle), I had already set (probably from some previous test, I have to look better who if saving here) under Java user preferences ($USER_HOME/.java/.userPrefs/org/apache/pivot/ ) a maximized = true flag, so even when not specifying --maximized=true in command line arguments to my test case I had some wrong behaviour (in the main() inside DesktopApplicationContext, Java preferences are loaded before command line flags). 
So before proceeding with this fix I had to delete that folder, with: 
rm -r .java/.userPrefs/org/apache/pivot/
Maybe this could be another thing to see later ... anyway could be useful to someone, just to remember this trick.

                  
> Unable to get an initially maximized HostFrame in DesktopApplicationContext due to bug in Java 6 under ubuntu/linux
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: PIVOT-781
>                 URL: https://issues.apache.org/jira/browse/PIVOT-781
>             Project: Pivot
>          Issue Type: Bug
>          Components: wtk
>    Affects Versions: 2.0
>         Environment: Ubuntu 11.04 (2.6.38-10-generic), java-6-sun-1.6.0.26 
>            Reporter: Tomas Stenlund
>            Assignee: Sandro Martini
>            Priority: Minor
>             Fix For: 2.0.3
>
>         Attachments: pivot_781.bxml - full screen.launch, pivot_781.bxml.launch, pivot_781.bxml - maximized.launch, pivot_781.bxml - normal.launch
>
>
> When using --maximized=true when starting a desktop application with DesktopApplicationContext.main(class, args) under the environment described. It works under Windows 7.
> Chris Bartlet found out that there is a Java bug for this issue (setExtendedState in DesktopApplicationContext) and suggested a workaround (calling it twice, once before and once after if not already in that state) before Java 7 is established. It seems it will not be fixed for Java 6 by sun (oracle).
> Mail conversation excerpt included below:
> ----8<----------8<-------------8<----------------8<------------8<--------------8<--------------8<-------------8<------------
> Java bug 6365898 - fixed in Java 7
> http://download.java.net/jdk7/changes/jdk7-b14.html
> This looks like it should be the right URL, but it is not bringing anything up
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6365898
> Google has it cached though
> http://www.google.com/search?q=site%3Abugs.sun.com+6365898
> If the workaround is as simple as it seems to be, then I think it
> would be worth including along with a reference to the bug and a TODO
> to remove it once Java 7 is more established, or if Pivot later
> requires Java 7.
> ----8<----------8<-------------8<----------------8<------------8<--------------8<--------------8<-------------8<------------

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira