[ 
http://jira.codehaus.org/browse/MOJO-944?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_113270
 ] 

Pawel S. Veselov commented on MOJO-944:
---------------------------------------

Hi. Ugh.

Well, the good news is that the patch seems to work well :)

However, for some wonderful reason, the ${java.home} points to the JRE, not JDK.

My environment JAVA_HOME is /usr/local/jdk, my JAVA_HOME in ~/.mavenrc is 
/usr/local/jdk.
The ${java.home} in maven is then nicely set to /usr/local/jdk/jre .... WHY ?

I was able to get away with it using 
<javahPath>${env.JAVA_HOME}/bin/javah</javaPath>, however,
this is really a nasty hack, because maven binary script though reads the 
~/.mavenrc into it's shell space,
still doesn't export the JAVA_HOME var, so it has to be set up in the 
environment explicetely...

Any way I can get the actual java home value by using a legit maven variable ?

-- Pawel.


> javah is not looked up in ${jdk.home}
> -------------------------------------
>
>                 Key: MOJO-944
>                 URL: http://jira.codehaus.org/browse/MOJO-944
>             Project: Mojo
>          Issue Type: Bug
>          Components: native
>         Environment: Linux
>            Reporter: Pawel S. Veselov
>         Attachments: 3.diff, 4.diff, 
> org.codehaus.mojo.natives.compiler.CompilerUtilTest.txt
>
>
> When native:javah is executed, the "javah" path is used for the binary. Only 
> on MacOS, the ${jdk.home}/bin/javah is used.
> ${java.home} should be used at all times, because:
> a) One doesn't have to add JDK bin directory to current PATH
> b) The JDK directory in the path may not be the same that is used for Maven
> c) the javah binary in the path may not even be JavaH
> The trivial fix is to roll up 
> org.codehaus.mojo.natives.javah.JavahMacOSExecutable into 
> org.codehaus.mojo.natives.javah.JavahExecutable.
> Anyone knows how to make native pick up the MacOS executable as a workaround ?
> -- Pawel.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to