You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Andrew Zhang <zh...@gmail.com> on 2006/11/09 07:04:28 UTC

Re: [classlib][awt] Does Harmony awt support "win.xpstyle.dllName" desktop property in windows XP?

Thanks Dmitry and Paulex.

After applying Harmony-1887 patch, it returns valid property value.

But there's another problem. Running following code against Harmony will
print NPE while RI returns silently.

public static void main(String[] args) {
  MyToolkit myToolkit = new MyToolkit();
  myToolkit.initializeDesktopProperties();
  Map props = myToolkit.getDesktopProperties();
 }

MyToolkit extends Toolkit, implements all abstract methods by default except
following two methods:
public Map getDesktopProperties() {
  return desktopProperties;
 }
 public void initializeDesktopProperties() {
  super.initializeDesktopProperties();
 }

The output against Harmony:
java.lang.NullPointerException
 at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:73)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)




On 10/17/06, Dmitry Durnev <dm...@gmail.com> wrote:
>
> AFAIK at least 4 'xpstyle'-related windows properties are not described.
> 10/17/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> > How many are there that aren't described?
> >
> > Sergey Soldatov wrote:
> > > No, it doesn't. Unfortunately most of desktop properties are not
> described
> > > in j2se documentation. If you feel that we need to support this
> > > property please file JIRA issue and we'll try to fix it ASAP.
> > >
> > > On 10/17/06, Andrew Zhang <zh...@gmail.com> wrote:
> > >>
> > >> Hi, does Harmony awt support "win.xpstyle.dllName" desktop property
> in
> > >> windows XP?
> > >>
> > >> Consider following code:
> > >>
> > >> public static void main(String[] args) {
> > >> Toolkit toolkit = Toolkit.getDefaultToolkit();
> > >> String xpstyleDll = (String) toolkit
> > >>    .getDesktopProperty("win.xpstyle.dllName");
> > >> System.out.println(xpstyleDll);
> > >> }
> > >>
> > >> RI Output:
> > >> C:\WINDOWS\resources\Themes\luna\luna.msstyles
> > >>
> > >> Harmony Output:
> > >> null
> > >>
> > >>
> > >> --
> > >> Best regards,
> > >> Andrew Zhang
> > >>
> > >>
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
>
> Dmitry A. Durnev,
> Intel Middleware Products Division
>
> ---------------------------------------------------------------------
> Terms of use : http://incubator.apache.org/harmony/mailing.html
> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> For additional commands, e-mail: harmony-dev-help@incubator.apache.org
>
>


-- 
Best regards,
Andrew Zhang

Re: [classlib][awt] Does Harmony awt support "win.xpstyle.dllName" desktop property in windows XP?

Posted by Andrew Zhang <zh...@gmail.com>.
On 11/9/06, Alexey Petrenko <al...@gmail.com> wrote:
>
> Andrew, you know a way! File a JIRA :)


ya, done, Harmony-2116.

http://issues.apache.org/jira/browse/HARMONY-2116

2006/11/9, Andrew Zhang <zh...@gmail.com>:
> > Thanks Dmitry and Paulex.
> >
> > After applying Harmony-1887 patch, it returns valid property value.
> >
> > But there's another problem. Running following code against Harmony will
> > print NPE while RI returns silently.
> >
> > public static void main(String[] args) {
> >  MyToolkit myToolkit = new MyToolkit();
> >  myToolkit.initializeDesktopProperties();
> >  Map props = myToolkit.getDesktopProperties();
> >  }
> >
> > MyToolkit extends Toolkit, implements all abstract methods by default
> except
> > following two methods:
> > public Map getDesktopProperties() {
> >  return desktopProperties;
> >  }
> >  public void initializeDesktopProperties() {
> >  super.initializeDesktopProperties();
> >  }
> >
> > The output against Harmony:
> > java.lang.NullPointerException
> >  at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java
> :73)
> >  at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)
> >
> >
> >
> >
> > On 10/17/06, Dmitry Durnev <dm...@gmail.com> wrote:
> > >
> > > AFAIK at least 4 'xpstyle'-related windows properties are not
> described.
> > > 10/17/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> > > > How many are there that aren't described?
> > > >
> > > > Sergey Soldatov wrote:
> > > > > No, it doesn't. Unfortunately most of desktop properties are not
> > > described
> > > > > in j2se documentation. If you feel that we need to support this
> > > > > property please file JIRA issue and we'll try to fix it ASAP.
> > > > >
> > > > > On 10/17/06, Andrew Zhang <zh...@gmail.com> wrote:
> > > > >>
> > > > >> Hi, does Harmony awt support "win.xpstyle.dllName" desktop
> property
> > > in
> > > > >> windows XP?
> > > > >>
> > > > >> Consider following code:
> > > > >>
> > > > >> public static void main(String[] args) {
> > > > >> Toolkit toolkit = Toolkit.getDefaultToolkit();
> > > > >> String xpstyleDll = (String) toolkit
> > > > >>    .getDesktopProperty("win.xpstyle.dllName");
> > > > >> System.out.println(xpstyleDll);
> > > > >> }
> > > > >>
> > > > >> RI Output:
> > > > >> C:\WINDOWS\resources\Themes\luna\luna.msstyles
> > > > >>
> > > > >> Harmony Output:
> > > > >> null
> > > > >>
> > > > >>
> > > > >> --
> > > > >> Best regards,
> > > > >> Andrew Zhang
> > > > >>
> > > > >>
> > > > >
> > > > >
> > > >
> > > >
> ---------------------------------------------------------------------
> > > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > > > For additional commands, e-mail:
> harmony-dev-help@incubator.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > >
> > > Dmitry A. Durnev,
> > > Intel Middleware Products Division
> > >
> > > ---------------------------------------------------------------------
> > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> > >
> > >
> >
> >
> > --
> > Best regards,
> > Andrew Zhang
> >
> >
>



-- 
Best regards,
Andrew Zhang

Re: [classlib][awt] Does Harmony awt support "win.xpstyle.dllName" desktop property in windows XP?

Posted by Alexey Petrenko <al...@gmail.com>.
Andrew, you know a way! File a JIRA :)

2006/11/9, Andrew Zhang <zh...@gmail.com>:
> Thanks Dmitry and Paulex.
>
> After applying Harmony-1887 patch, it returns valid property value.
>
> But there's another problem. Running following code against Harmony will
> print NPE while RI returns silently.
>
> public static void main(String[] args) {
>  MyToolkit myToolkit = new MyToolkit();
>  myToolkit.initializeDesktopProperties();
>  Map props = myToolkit.getDesktopProperties();
>  }
>
> MyToolkit extends Toolkit, implements all abstract methods by default except
> following two methods:
> public Map getDesktopProperties() {
>  return desktopProperties;
>  }
>  public void initializeDesktopProperties() {
>  super.initializeDesktopProperties();
>  }
>
> The output against Harmony:
> java.lang.NullPointerException
>  at java.awt.EventDispatchThread.runModalLoop(EventDispatchThread.java:73)
>  at java.awt.EventDispatchThread.run(EventDispatchThread.java:48)
>
>
>
>
> On 10/17/06, Dmitry Durnev <dm...@gmail.com> wrote:
> >
> > AFAIK at least 4 'xpstyle'-related windows properties are not described.
> > 10/17/06, Geir Magnusson Jr. <ge...@pobox.com> wrote:
> > > How many are there that aren't described?
> > >
> > > Sergey Soldatov wrote:
> > > > No, it doesn't. Unfortunately most of desktop properties are not
> > described
> > > > in j2se documentation. If you feel that we need to support this
> > > > property please file JIRA issue and we'll try to fix it ASAP.
> > > >
> > > > On 10/17/06, Andrew Zhang <zh...@gmail.com> wrote:
> > > >>
> > > >> Hi, does Harmony awt support "win.xpstyle.dllName" desktop property
> > in
> > > >> windows XP?
> > > >>
> > > >> Consider following code:
> > > >>
> > > >> public static void main(String[] args) {
> > > >> Toolkit toolkit = Toolkit.getDefaultToolkit();
> > > >> String xpstyleDll = (String) toolkit
> > > >>    .getDesktopProperty("win.xpstyle.dllName");
> > > >> System.out.println(xpstyleDll);
> > > >> }
> > > >>
> > > >> RI Output:
> > > >> C:\WINDOWS\resources\Themes\luna\luna.msstyles
> > > >>
> > > >> Harmony Output:
> > > >> null
> > > >>
> > > >>
> > > >> --
> > > >> Best regards,
> > > >> Andrew Zhang
> > > >>
> > > >>
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> > >
> > >
> >
> >
> > --
> >
> > Dmitry A. Durnev,
> > Intel Middleware Products Division
> >
> > ---------------------------------------------------------------------
> > Terms of use : http://incubator.apache.org/harmony/mailing.html
> > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
> > For additional commands, e-mail: harmony-dev-help@incubator.apache.org
> >
> >
>
>
> --
> Best regards,
> Andrew Zhang
>
>