Maneesh Godbole wrote:Where have you put the LAF jar? Is it packaged inside your application jar?
Maneesh Godbole wrote:Try the following
1) Create a lib folder and place all your dependent jars in there
2) In your jar's manifest file, define the Classpath element to point to this lib folder.
Jars inside jars do not work.
More details here
Maneesh Godbole wrote:The only way they can work in eclipse is because you have added them to the class path. That is the same as the classpath attribute in the manifest file I mentioned.
Maneesh Godbole wrote:When you try to set the LAF do you get any exception? Can you post the stack trace?
Mayank Jaswal wrote:
Maneesh Godbole wrote:When you try to set the LAF do you get any exception? Can you post the stack trace?
java.lang.ClassNotFoundException: com.birosoft.liquid.LiquidLookAndFeel
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at javax.swing.SwingUtilities.loadSystemClass(Unknown Source)
at javax.swing.UIManager.setLookAndFeel(Unknown Source)
At the center of non-violence stands the principle of love
.... Martin Luther King, Jr.
Ramses Butarbutar wrote:
Mayank Jaswal wrote:
Maneesh Godbole wrote:When you try to set the LAF do you get any exception? Can you post the stack trace?
java.lang.ClassNotFoundException: com.birosoft.liquid.LiquidLookAndFeel
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at javax.swing.SwingUtilities.loadSystemClass(Unknown Source)
at javax.swing.UIManager.setLookAndFeel(Unknown Source)
copy tyhe liquid jar file (liquidlnf.jar, liquidlnf-0.2.6.jar)in the jdk/jre/lib/ext and also in jre/lib/ext
hope this will work
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Ramses Butarbutar wrote:
Mayank Jaswal wrote:
Maneesh Godbole wrote:When you try to set the LAF do you get any exception? Can you post the stack trace?
java.lang.ClassNotFoundException: com.birosoft.liquid.LiquidLookAndFeel
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at javax.swing.SwingUtilities.loadSystemClass(Unknown Source)
at javax.swing.UIManager.setLookAndFeel(Unknown Source)
copy tyhe liquid jar file (liquidlnf.jar, liquidlnf-0.2.6.jar)in the jdk/jre/lib/ext and also in jre/lib/ext
hope this will work
Rob Prime wrote:
Ramses Butarbutar wrote:
Mayank Jaswal wrote:
Maneesh Godbole wrote:When you try to set the LAF do you get any exception? Can you post the stack trace?
java.lang.ClassNotFoundException: com.birosoft.liquid.LiquidLookAndFeel
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at javax.swing.SwingUtilities.loadSystemClass(Unknown Source)
at javax.swing.UIManager.setLookAndFeel(Unknown Source)
copy tyhe liquid jar file (liquidlnf.jar, liquidlnf-0.2.6.jar)in the jdk/jre/lib/ext and also in jre/lib/ext
hope this will work
That would work, but then all Java applications anywhere have access to it, and you can only use that one version. It will override any version specified explicitly on the class path.
Setting the class path correctly seems a better approach.
I tried to do the changes but now a new exception is coming ,And since the lnf jar contains only .class files i am not able to get into the problem
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.birosoft.liquid.LiquidLookAndFeel.getBackgroundColor(LiquidLookAndFeel
.java:948)
at com.birosoft.liquid.skin.Skin.colourImage(Skin.java:463)
at com.birosoft.liquid.LiquidButtonUI.getSkinButton(LiquidButtonUI.java:199)
at com.birosoft.liquid.LiquidButtonUI.paint(LiquidButtonUI.java:183)
at com.birosoft.liquid.LiquidButtonUI.update(LiquidButtonUI.java:226)
at javax.swing.JComponent.paintComponent(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JLayeredPane.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
At the center of non-violence stands the principle of love
.... Martin Luther King, Jr.
If you live in a cold climate and on the grid, incandescent light can use less energy than LED. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
|