From: <php...@li...> - 2006-03-23 10:12:30
|
Thanks for the tip : I did not know that javac (i.e the one in=20 tools.jar) did not inherit the runtime classpath (but it seems logical=20 because, for example, I do not want my compilation be influenced by my=20 eclipse classpath). I used the solution previously provided (i.e set java.classpath in the=20 php.ini) which seems to do the same thing (put the jars in the system=20 class loader). I prefer to stay with this solution because it is clearly more simple=20 than to hook the JasperReports sources or than to set a system property=20 in an obscure part of the code (what I mean is that if other=20 applications use PHP-Java-bridge, it is simpler for them to know that=20 there already are some classes in the system classpath via php.ini). Anyway, I will fill a bug on JasperReports to say that it will be good=20 to provide the necessarly used runtime jars to the javac compiler. Thanks to take time to think on my problem. Regards, chris php...@li... wrote: > php...@li... wrote: >> Just to say I digg into this problem all day and still find no solutio= n. >> What I do not understand is why a thread does not inherit the=20 >> classpath from the creating thread > > I guess that's not the problem. The problem is, that javac does not=20 > inherit the classpath. i.e. just because the classes are available > to the compiler in it's runtime environment does not mean that he has=20 > access to the class definitions. (i.e. class files) - nor that he knows > how to find them. > > I have done something similar once, and you definitely need to tell=20 > javac explicitly where to find the classes it needs. > If they are in /jre/lib/ext he will look there anyway, but it's not=20 > really a classloader problem - it's just that javac does not utilize > it's own classloader to look for classes - it uses the system=20 > classpath, plus classpaths he has been explicitly told to use. > > Try System.setProperty to change the system classpath and try again, I=20 > guess that will help. > > best regards, > > Kai Londenberg > > > > > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting=20 > language > that extends applications into web and mobile media. Attend the live=20 > webcast > and join the prime developer group breaking into this new coding=20 > territory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > --=20 =20 _________________________________________________________________________= ______________ Tennaxia, www.tennaxia.com, Pilotez vos obligations environnementales _________________________________________________________________________= ______________ Si=E8ge social : 6, rue L=E9onard de Vinci - 53001 Laval Cedex -=20 T=E9l : 02 43 49 75 50 - Fax : 02 43 49 75 77 Agence Paris : 19, rue r=E9aumur - 75003 Paris -=20 T=E9l : 01 42 77 04 19 - Fax : 08 25 19 19 61 Agence Lyon : Parc du Chater - 63 rue de la garenne - 69340 FRANCHEVILLE -=20 T=E9l : 04 72 39 98 14 - Fax : 04 72 39 93 85 Les informations contenues dans ce message envoy=E9es par TENNAXIA sont c= onfidentielles et sont =E9tablies =E0 l'attention exclusive de leurs destinataires. L'acc=E8= s =E0 ce message par toute autre personne n'est pas autoris=E9. Si vous n'=EAtes pas le de= stinataire de ce message, merci de le d=E9truire et d'en avertir l'exp=E9diteur : toute al= t=E9ration, copie, distribution ou toute action prise ou omise sont interdites et peuvent =EA= tre ill=E9gales. The information in this message sent by TENNAXIA is confidential and may = be legally privileged. It is intended solely for the addressee(s). Access to this me= ssage by anyone else is unauthorized. If you are not the intended recipient, please delet= e it and notify the sender : any disclosure, copying, distribution or any action taken or= omitted to be taken in reliance on it, is prohibited and may be unlawful. |