Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to compile default package class used in other classes JavaCompiler API

 
thinkpavan pavan
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 !!
 
Syed Muhammad Nayyar Mustafa
Greenhorn
Posts: 11
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if you mean through javax.tools.JavaCompiler, then use getTask method to set classpath option


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic