I have not seen other APT plugin implementations.  I agree with you that the
apt-plugin should be handling this problem.  I will try to get in touch with
the tobago people.

Thanks,
Evan

On Dec 27, 2007 2:13 PM, Brett Porter <[EMAIL PROTECTED]> wrote:

> I think you can use ${java.home}/../lib/tools.jar (and remember to
> omit it on non-Sun JVM platforms), and document that the user must be
> running Java from the JDK, not a JRE (and present a helpful error
> message if the class you are looking for cannot be found). You might
> look at the source for plexus-compiler-javac for some guidance. I'm
> not sure if that is all in the scope of what you are doing or
> something the apt plugin should be doing (aren't there other
> implementations of the apt plugin too?)
>
> - Brett
>
> On 28/12/2007, at 9:03 AM, Evan Worley wrote:
>
> > Thanks for the info Brett,
> >
> > I am loading it via a dependency.  I depend on the maven-apt-plugin (
> > http://myfaces.apache.org/tobago/tobago-tool/maven-apt-plugin/)
> > which has a
> > system scoped dependency on tools.jar
> >
> > So if we can't ensure that java.home is set to a JDK, how can we
> > recommend
> > people use the java.home relative path to find the tools.jar?
> >
> > Thanks,
> > Evan
> >
> > On Dec 27, 2007 1:56 PM, Brett Porter <[EMAIL PROTECTED]> wrote:
> >
> >> It's set by the JVM itself - you will probably need profiles for the
> >> different possibilities (like the Mac one, where there is no
> >> tools.jar).
> >>
> >> Are you loading this via a dependency, or creating your own
> >> classloader?
> >>
> >> - Brett
> >>
> >> On 28/12/2007, at 5:24 AM, Evan Worley wrote:
> >>
> >>> Hi All,
> >>>
> >>> I need to have the JDK's tools.jar on my classpath and have been
> >>> fumbling
> >>> through the configuration to make this happen.  I found the
> >>> following page
> >>> which describes how to use the java.home property to locate the
> >>> tools.jar,
> >>> http://maven.apache.org/general.html#tools-jar-dependency.  But I
> >>> have also
> >>> found several pages, such as
> >>> http://docs.codehaus.org/display/MAVENUSER/MavenPropertiesGuide
> >>> which point
> >>> out that java.home might be a JRE and not a JDK.  How can we ensure
> >>> that
> >>> tools.jar can be found using a relative path from ${java.home}?
> >>>
> >>> Does anyone know how java.home is computed?  I have read that it is
> >>> not
> >>> always equal to the JAVA_HOME environment variable.
> >>>
> >>> Also if context might help, I need the tools.jar to use the
> >>> maven-apt-plugin.
> >>>
> >>> Thanks for any help,
> >>> Evan
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to