aspose file tools*
The moose likes Java in General and the fly likes Problem in dynamic class creation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem in dynamic class creation" Watch "Problem in dynamic class creation" New topic
Author

Problem in dynamic class creation

syruss kumar
Ranch Hand

Joined: Jul 23, 2009
Posts: 93
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


All search starts with beginner's luck and all search ends with victor's severly tested.
Ernesto Chicas
Greenhorn

Joined: Jan 13, 2010
Posts: 18

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

Joined: Jul 23, 2009
Posts: 93
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in dynamic class creation
 
Similar Threads
HELP!!!
Loading POJO object without loading library first
what is the replacement for BatchEnvironment ?
what is the replacement for BatchEnvironment ?
Encrypt a zip file using PGP in java