Java- Can't apply Java Look and Feel

前端 未结 2 1810
北恋
北恋 2021-01-23 12:51

I\'m using Synthetica Look and Feel in my application and it works fine on Eclipse. But when i export the Jar file and execute it i got these errors :

Exception          


        
相关标签:
2条回答
  • 2021-01-23 13:28

    Please see the error it can't find the sun/swing/plaf/synth/SynthUI Library. In development mode You are include that jar file in eclipse library but when you are create a jar file then you are not include the Synthui theme jar. Put that Synthui jar file in jar, ext/ folder and it work fine

    0 讨论(0)
  • 2021-01-23 13:42

    I think the way you are exporting the jar file is not correct.

    Try exporting the jar as a Runnable jar file.
    Follow these steps to export your app as a runnable jar.
    1) select export from the file menu.
    2) select Java->Runnable JAR file
    3) Select the launch configuration i.e your main class.
    4) first two option of library handling if you want to package the substance library file in your own jar and the third option(copy required library into a sub folder next to the generated jar) if you want to separate the generated jar file and substance libs.
    5)Press finish.

    I hope this would solve your problem. :)

    0 讨论(0)
提交回复
热议问题