Meaningless Drivel is fun!*
The moose likes Java in General and the fly likes why is this happening REALLY URGENT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "why is this happening REALLY URGENT" Watch "why is this happening REALLY URGENT" New topic
Author

why is this happening REALLY URGENT

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
im trying to create executable jar. I have my class files in
directory a\b\ I jar by: jar cvmf a\b\meta-inf\manifest.mf test.jar a\b\*.class .The jar is created. My manifest contains
Manifest-Version: 1.0
Main-Class: a.b.Prime
Name: a.b.Prime.class
Java-Bean: False
Class-Path: . mail.jar activation.jar smtp.jar
when I javaw -jar test.jar I get the message main class not found
and when I java -jar test.jar I get the message
NoClassFoundError : coke/cocacola/prime(wrong name:cocacola/prime)
what am I doing wrong
Thank u for your time
john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
this is the error message i get
Exception in thread "main" java.lang.NoClassDefFoundError: coke/CocaCola/Prime (
wrong name: CocaCola/Prime)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
1)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
ok i solved the above problem, but now im getting this error
Oh my god this is becoming a nightmare
UIDefaults.getUI() failed: no ComponentUI class for: C.HighlightJButton[,
0,0,0x0,invalid,layout=javax.swing.OverlayLayout,alignmentX=null,alignmentY=null
,border=,flags=0,maximumSize=,minimumSize=,preferredSize=,defaultIcon=,disabledI
con=,disabledSelectedIcon=,margin=null,paintBorder=true,paintFocus=true,pressedI
con=,rolloverEnabled=false,rolloverIcon=,rolloverSelectedIcon=,selectedIcon=,tex
t=OK,defaultCapable=true]
java.lang.Error
at javax.swing.UIDefaults.getUIError(UIDefaults.java:392)
at javax.swing.UIDefaults.getUI(UIDefaults.java:422)
at javax.swing.UIManager.getUI(UIManager.java:566)
at javax.swing.JButton.updateUI(JButton.java:118)
at javax.swing.AbstractButton.init(AbstractButton.java:1605)
at javax.swing.JButton.<init>(JButton.java:108)
at javax.swing.JButton.<init>(JButton.java:83)
at C.HighlightJButton.<init>(HighlightJButton.java)
at CocaCola.DatabaseError.getJButton1(DatabaseError.java)
at C.DatabaseError.getJDialogContentPane(DatabaseError.java)
at C.DatabaseError.<init>(DatabaseError.java)
at C.InfoGetter.<init>(InfoGetter.java)
at C.One.<init>(One.java)
at C.First.<init>(First.java)
at C.Prime.main(Prime.java)
Wilfried LAURENT
Ranch Hand

Joined: Jul 13, 2001
Posts: 269
It is difficult to tell you what is wrong with this stack trace.
The error message clearly states that the delegate associated either with JButton or HighlightJButton could not be found.
It may be useful to know more about it:
What is the relation ship between JButton and HighlightJButton : extension, composition? Did you overload the getUI() method? Does the MetalButtonUI (or whatever delegate for your specific look-and-feel) exist in your classpath?
W.
[This message has been edited by Wilfried LAURENT (edited October 15, 2001).]
john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
u are right its the class path. Its having a
hard time finding the files . I tried to jar
those on their own and set the classpath in
Class-Path: LookFeel.jar and its still not finding the
files. Should I unjar the classes in LookFeel.jar and place
them in with my executable jar?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why is this happening REALLY URGENT