This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Features new in Java 7 and the fly likes Unable to compile default package class refered in other classes using JavaCompiler API Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Features new in Java 7
Reply locked New topic
Author

Unable to compile default package class refered in other classes using JavaCompiler API

thinkpavan pavan
Greenhorn

Joined: Apr 06, 2011
Posts: 6
I have a situvation where i need to compile classes dynamically.

Following is the structure in which my java classes have been organized.

where A is a class with default package, and B is a class with package name test. B has A as a attribute.

Files are saved in their respective folders( as per package )

I fail to compile this with JAVA Compiler API.

Any help !!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 62123
    
  68

Please do not post the same question more than once.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Unable to compile default package class refered in other classes using JavaCompiler API