• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFoundError

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

I have 2 files AgentHost.java and Frame1.java that create a simple GUI. I developed them using JBuilder. I tried running them through command prompt since this trial version expires shortly. So I coped them under C:\TestArena and saved them as same file names.

Note that I do NOT have any package declarations on these files. I compiles these files using javac -classpath [path] *.java
where [path] are bunch of jars under jbuilder\lib folder. I do this because Frame1.java has a reference
import com.borland.jbcl.layout.*;

Compiles fine !

But when I run using java -classpath [path] AgentHost

I get an error, Exception in thread "main" java.lang.NoClassDefFoundError: AgentHost

There is a class file AgentHost getting created under this folder.

Any hints? Or is there any other way where I can run these 2 files keeping in mind to the reference to com.borland.jbcl.layout ???

Sandeep
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you including "." in your classpath?
 
Sandeep Advani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That was a silly mistake. Thanks for pointing that out!
 
Good heavens! What have you done! Here, try to fix it with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic