• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

why is this happening REALLY URGENT

 
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic