• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java compiler api problem

 
satya saha
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would assume that you need to use some feature of the API to set the compilation classpath.
 
satya saha
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic