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

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!
 
Tongue wrestling. It's not what you think. And here, take this tiny ad. You'll need it.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic