File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes java compiler api problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "java compiler api problem" Watch "java compiler api problem" New topic
Author

java compiler api problem

satya saha
Greenhorn

Joined: Aug 08, 2008
Posts: 13
Hi,

I am using java compiler api for compiling classes dynamically, my .java classes are there in blazeds folder iam trying to invoke a remote service for compiling classes
it is giving me errors.
some of my classes extends other classses which are already there same folder(as .classs)
Ex:
i am trying to compile Condesor class in Condensor package which extending Tree class which there in AlaramTress package.
It is giving me error like can not find symbol Tree ,even though class file is there .I also tried with out package structure but no luck,and i attached all of my classes with folder structure




and my compile method code is:


please help me

Thanks in advance[/color]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41798
    
  62
I would assume that you need to use some feature of the API to set the compilation classpath.


Ping & DNS - my free Android networking tools app
satya saha
Greenhorn

Joined: Aug 08, 2008
Posts: 13
Thanks for your reply

i am also thinking like that,but i do n't know how to set the classpath


please help me
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41798
    
  62
This looks promising: http://stackoverflow.com/questions/274474/how-do-i-use-jdk6-toolprovider-and-javacompiler-with-the-context-classloader

I found it by searching for "javacompiler classpath".
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java compiler api problem