Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #7991 > unrolled thread

Could not initialize class javax.swing.UIManager

Started bygbattine <giuseppe.battinelli@gmail.com>
First post2011-09-13 15:09 -0700
Last post2011-09-15 09:47 -0700
Articles 4 — 3 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Could not initialize class javax.swing.UIManager gbattine <giuseppe.battinelli@gmail.com> - 2011-09-13 15:09 -0700
    Re: Could not initialize class javax.swing.UIManager gbattine <giuseppe.battinelli@gmail.com> - 2011-09-15 05:18 -0700
      Re: Could not initialize class javax.swing.UIManager markspace <-@.> - 2011-09-15 09:16 -0700
    Re: Could not initialize class javax.swing.UIManager Roedy Green <see_website@mindprod.com.invalid> - 2011-09-15 09:47 -0700

#7991 — Could not initialize class javax.swing.UIManager

Fromgbattine <giuseppe.battinelli@gmail.com>
Date2011-09-13 15:09 -0700
SubjectCould not initialize class javax.swing.UIManager
Message-ID<0305657f-3523-4a3a-a966-68afcf6833df@r21g2000yqr.googlegroups.com>
Dear all,
sorry if I cross-posted this issue both on javafx and swing space,
cause I think it may interest to both...so cause I've not received any
reply on other one I try on this one, cause I think it depends most on
swing than javafx.
I'm newbie of java technology.
I need your help to solve my issue.
I developed a Java fx application and I run it with:

javafx -classpath application.jar application.Main



It works on every win 7 system.

On some xp system (not everyone, only some one) I got this exception:

java.lang.noclassdeffounderror: Could not initialize class
javax.swing.UIManager
at
programPackage.Main.javafx$run$(Main.fx:29)


line on which error appears is the following

for (info: LookAndFeelInfo in UIManager.getInstalledLookAndFeels()) {


,

from this code

// use NIMBUS look
    try {
        for (info: LookAndFeelInfo in
UIManager.getInstalledLookAndFeels()) {
            if ("Nimbus".equals(info.getName())) {
                UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }
    } catch (cEx: Exception) {
        println(cEx.getMessage());
    }


Could you please help me??
I'm desperate...I can't reproduce error on each xp system, because on
most of them application works...only on some xp system it appears.
I tried to uninstall jre and install latest one and I also updated
graphic drivers to latest one.

I hope someone can help me...I can't solve it and I'm crazying.

Thanks in advance

[toc] | [next] | [standalone]


#8051

Fromgbattine <giuseppe.battinelli@gmail.com>
Date2011-09-15 05:18 -0700
Message-ID<8b1912a9-3815-4382-a14b-35b62f7ed2cc@dp9g2000vbb.googlegroups.com>
In reply to#7991
On 14 Set, 00:09, gbattine <giuseppe.battine...@gmail.com> wrote:
> Dear all,
> sorry if I cross-posted this issue both on javafx and swing space,
> cause I think it may interest to both...so cause I've not received any
> reply on other one I try on this one, cause I think it depends most on
> swing than javafx.
> I'm newbie of java technology.
> I need your help to solve my issue.
> I developed a Java fx application and I run it with:
>
> javafx -classpath application.jar application.Main
>
> It works on every win 7 system.
>
> On some xp system (not everyone, only some one) I got this exception:
>
> java.lang.noclassdeffounderror: Could not initialize class
> javax.swing.UIManager
> at
> programPackage.Main.javafx$run$(Main.fx:29)
>
> line on which error appears is the following
>
> for (info: LookAndFeelInfo in UIManager.getInstalledLookAndFeels()) {
>
> ,
>
> from this code
>
> // use NIMBUS look
>     try {
>         for (info: LookAndFeelInfo in
> UIManager.getInstalledLookAndFeels()) {
>             if ("Nimbus".equals(info.getName())) {
>                 UIManager.setLookAndFeel(info.getClassName());
>                 break;
>             }
>         }
>     } catch (cEx: Exception) {
>         println(cEx.getMessage());
>     }
>
> Could you please help me??
> I'm desperate...I can't reproduce error on each xp system, because on
> most of them application works...only on some xp system it appears.
> I tried to uninstall jre and install latest one and I also updated
> graphic drivers to latest one.
>
> I hope someone can help me...I can't solve it and I'm crazying.
>
> Thanks in advance

no one could help me?
Thanks

[toc] | [prev] | [next] | [standalone]


#8059

Frommarkspace <-@.>
Date2011-09-15 09:16 -0700
Message-ID<j4t8d3$95k$1@dont-email.me>
In reply to#8051
On 9/15/2011 5:18 AM, gbattine wrote:
>> javafx -classpath application.jar application.Main
>
> no one could help me?


I don't think there's a lot of expertise on JavaFX here.  It's not 
exactly a popular programming language or environment.

So, just to be clear:  You have some systems in your possession that 
reproduce the problem, yes?

Can you post the entire stack trace, and any other messages the system 
produces?  These might be important clues.

Can you create a Short Self-Contained Compilable Example which 
reproduces the problem?  Just try that loop at first at the JavaFX entry 
point.  Does it fail on the systems known to be not working?

The short self-contained compilable example is an SSCCE:

http://sscce.org

[toc] | [prev] | [next] | [standalone]


#8060

FromRoedy Green <see_website@mindprod.com.invalid>
Date2011-09-15 09:47 -0700
Message-ID<bta4775f86k09qi031a5vgkr8mb5v224ti@4ax.com>
In reply to#7991
On Tue, 13 Sep 2011 15:09:03 -0700 (PDT), gbattine
<giuseppe.battinelli@gmail.com> wrote, quoted or indirectly quoted
someone who said :

>UIManager.getInstalledLookAndFeels()) {
>            if ("Nimbus".equals(info.getName())) {

see http://mindprod.com/jgloss/laf.html

The catch is Nimbus is fairly new, and is not available on older
Javas.  Try updating the Java.  With any L&F code you pretty well have
to assume a given L&F may or may not be present.  You have to make
contingencies falling back all the way to default if the ones you want
are not there.  See my code as part of
http://mindprod.com/products1.html#COMMON3
for doing that.
-- 
Roedy Green Canadian Mind Products
http://mindprod.com
Your top priority should be fixing bugs. If you carry on development, 
you are just creating more places you will have to search for them.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web