This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in dynamic class creation

 
syruss kumar
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI all,


I have tried to create a class dynamically compiled and run that in java 1.5 .I can create a class and compile that but while i try to create a instance for that i got a ClassNotFoundException.Class file should physically located in the file structure?




Please help me to resolve that.

Thanks in advance
 
Ernesto Chicas
Greenhorn
Posts: 18
Debian Java jQuery
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
seeing your source code, you should save your "dynamic" class in the same directory as the class you've written with the main, probably the class is being saved in the root directory of your project and compiled in the same place
 
syruss kumar
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ernesto,

Thanks for the reply.Yes i can get the DynamicClass.class in the output folder .What im trying is to generate a class dynamically,compile and use that but while i trying to access the MyDynamicClassTest7.class i got the classNotfound Exception.




Please help me out

Thanks in advance
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic