Menu

#1105 Nimbus look and feel returns error

5.8
closed
nobody
None
5
2022-09-17
2022-08-05
Marc Prior
No

As of version 5.6.0, OmegaT can no longer be launched with the Nimbus look and feel.

Launch feedback:

11369: Error: java.lang.ClassCastException: org.omegat.gui.theme.DefaultFlatTheme cannot be cast to javax.swing.plaf.nimbus.NimbusLookAndFeel

(full launch log available if needed)

Related

Bugs: #1105

Discussion

  • Jean-Christophe Helary

    I'm with the latest master (5.8) on macOS and I can't reproduce.

     
    • Marc Prior

      Marc Prior - 2022-08-06

      Thanks JC.

      Here are the combinations I've tested on Linux. OmT = version of OmegaT;
      JRE = JRE of OmegaT version (e.g. 5.5.0 JRE = JRE for Linux version
      shipped with OmegaT 5.5.0)

      5.5.0 OmT + 5.5.0 JRE = works
      5.5.0 OmT + 5.6.0 JRE = works
      5.6.0 OmT + 5.5.0 JRE = fails
      5.6.0 OmT + 5.6.0 JRE = fails
      5.7.0 OmT + 5.5.0 JRE = fails
      5.7.0 OmT + 5.7.0 JRE = fails
      5.7.1 OmT + 5.7.1 JRE = fails
      5.8.0 OmT + 5.7.1 JRE = fails
      I also tried with the latest Oracle JDK, also fails.

      Does your Mac OS system actually use the Nimbus LaF when selected at
      runtime? I have OmegaT 5.7.0 on my Windows box here and (unlike on
      Linux, where the launch fails), it does launch with the Nimbus LaF
      argument on the CLI, but it launches with the default Windows LaF, not
      with Nimbus.

       
  • Jean-Christophe Helary

    I've selected "Nimbus" in the Appearance settings and restarted OmegaT.

    What would be the CLI argument to launch OmegaT with Nimbus?

     
    • Marc Prior

      Marc Prior - 2022-08-06

      I've selected "Nimbus" in the Appearance settings and restarted OmegaT.

      What would be the CLI argument to launch OmegaT with Nimbus?

      -Dswing.crossplatformlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel

      The other command-line LaF arguments (Steel, GTK, Motif) all work.

       
    • Hiroshi Miura

      Hiroshi Miura - 2022-08-10

      OmegaT 5.6.0 and later support theme plugin, that always respect theme on Appearance settings.

      OmegaT calls UIManager#setLookAndFeel method with a name that is configured in Appearance settings.
      It is a genuine way what @brandelune tell.

      I've selected "Nimbus" in the Appearance settings and restarted OmegaT.

      A document for OmegaT 5 should remove an explanation of java command line option.

       
  • Jean-Christophe Helary

    Can you give me a full CL because I can't seem to make that work:

    java -jar -Dswing.crossplatformlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel -Duser.language=en OmegaT.jar
    
     
    • Marc Prior

      Marc Prior - 2022-08-06

      Your launch command should normally work on Linux:

      java -jar
      -Dswing.crossplatformlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel
      -Duser.language=en OmegaT.jar

      For example, on my Linux system, with both OmegaT 5.5.0 and 5.7.1
      installed with the installation script, the command below works as intended:

      /opt/omegat/OmegaT_5.5.0/jre/bin/java
      -Dswing.crossplatformlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel -jar
      /opt/omegat/OmegaT_5.5.0/OmegaT.jar

      This command doesn't work (fails to launch and throws the error):

      /opt/omegat/OmegaT_5.7.1/jre/bin/java
      -Dswing.crossplatformlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel -jar
      /opt/omegat/OmegaT_5.7.1/OmegaT.jar

      (The -jar argument can be in either location)

      Can you give me a full CL because I can't seem to make that work:

      java -jar -Dswing.crossplatformlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel -Duser.language=en OmegaT.jar


      ** [bugs:#1105] Nimbus look and feel returns error**

      Status: open
      Group: 5.8
      Created: Fri Aug 05, 2022 11:26 PM UTC by Marc Prior
      Last Updated: Sat Aug 06, 2022 04:00 PM UTC
      Owner: nobody

      As of version 5.6.0, OmegaT can no longer be launched with the Nimbus look and feel.

      Launch feedback:

      11369: Error: java.lang.ClassCastException: org.omegat.gui.theme.DefaultFlatTheme cannot be cast to javax.swing.plaf.nimbus.NimbusLookAndFeel

      (full launch log available if needed)


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/omegat/bugs/1105/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #1105

  • Jean-Christophe Helary

    Thank you.

    First thing, 5.7.1 launches without error

    java -Dswing.crossplatformlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel -jar /Users/suzume/Downloads/OmegaT_5.7.1_Beta_Without_JRE/OmegaT.jar
    

    But, does not display Nimbus.
    I tried with other LaF and they were not displayed either when launching from the CL.

     
    • Marc Prior

      Marc Prior - 2022-08-07

      What you're seeing is probably intended behaviour on MacOS.

      Marc

      Thank you.

      First thing, 5.7.1 launches without error

      java -Dswing.crossplatformlaf=javax.swing.plaf.nimbus.NimbusLookAndFeel -jar /Users/suzume/Downloads/OmegaT_5.7.1_Beta_Without_JRE/OmegaT.jar
      But, does not display Nimbus.
      I tried with other LaF and they were not displayed either when launching from the CL.


      ** [bugs:#1105] Nimbus look and feel returns error**

      Status: open
      Group: 5.8
      Created: Fri Aug 05, 2022 11:26 PM UTC by Marc Prior
      Last Updated: Sat Aug 06, 2022 05:58 PM UTC
      Owner: nobody

      As of version 5.6.0, OmegaT can no longer be launched with the Nimbus look and feel.

      Launch feedback:

      11369: Error: java.lang.ClassCastException: org.omegat.gui.theme.DefaultFlatTheme cannot be cast to javax.swing.plaf.nimbus.NimbusLookAndFeel

      (full launch log available if needed)


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/omegat/bugs/1105/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #1105

  • Hiroshi Miura

    Hiroshi Miura - 2022-08-11

    @lin4trans

    You can try the demonstration theme plugin that is based on Nimbus LaF which may you want to look.
    OmegaT Appearance settings list 'Nimbus' that is Java native LaF without any change.
    Because Appearance lists all the LaF that is registered on Java JRE.

    New-Nimbus theme loads Nimbus LaF and override with color scheme of OmegaT Default theme.

    You can download a plugin Jar from
    https://codeberg.org/miurahr/omegat-new-nimbus/releases

     
  • Jean-Christophe Helary

    I'm updating the manual so I'll make sure that there are no references to the command line options.

     
    • Marc Prior

      Marc Prior - 2022-08-11

      I take it you mean no references to the command line options for the
      LaF, not no references to command line options in general?

      I'm updating the manual so I'll make sure that there are no references to the command line options.


      ** [bugs:#1105] Nimbus look and feel returns error**

      Status: open
      Group: 5.8
      Created: Fri Aug 05, 2022 11:26 PM UTC by Marc Prior
      Last Updated: Thu Aug 11, 2022 01:00 AM UTC
      Owner: nobody

      As of version 5.6.0, OmegaT can no longer be launched with the Nimbus look and feel.

      Launch feedback:

      11369: Error: java.lang.ClassCastException: org.omegat.gui.theme.DefaultFlatTheme cannot be cast to javax.swing.plaf.nimbus.NimbusLookAndFeel

      (full launch log available if needed)


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/omegat/bugs/1105/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #1105

  • Jean-Christophe Helary

    That's correct :-)

     
  • Hiroshi Miura

    Hiroshi Miura - 2022-09-17
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB