Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

why is this happening REALLY URGENT

 
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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?
 
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic