• Post Reply Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError  RSS feed

 
Sandeep Advani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • 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
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you including "." in your classpath?
 
Sandeep Advani
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That was a silly mistake. Thanks for pointing that out!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!