cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-2567) javac calling problem when creating client in DynamicClientFactory
Date Fri, 09 Sep 2011 18:43:09 GMT

     [ https://issues.apache.org/jira/browse/CXF-2567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Kulp resolved CXF-2567.
------------------------------

       Resolution: Won't Fix
    Fix Version/s: Invalid


This improvement request has been open for years and no-one has stepped up to implement it.
As such, it does not seems to be a priority for the existing CXF community. If, in the future,
someone would like to tackle this, feel free to open is and attach a patch.

> javac calling problem when creating client in DynamicClientFactory
> ------------------------------------------------------------------
>
>                 Key: CXF-2567
>                 URL: https://issues.apache.org/jira/browse/CXF-2567
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAXB Databinding
>         Environment: linux
>            Reporter: Wilson Lam
>            Priority: Minor
>             Fix For: Invalid
>
>
> When there are multiple JDK on a machine, DynamicClientFactory is currently not supported
to switch javac executable since CXF always call default javac.
> The problem comes from compileJavaSrc:
> Class - org.apache.cxf.endpoint.dynamic.DynamicClientFactory
> Method - compileJavaSrc()
> [ Code segment ]
> ...
>         javacCommand[0] = "javac";
>         javacCommand[1] = "-classpath";
>         javacCommand[2] = classPath;        
>         javacCommand[3] = "-d";
>         javacCommand[4] = dest;
>         javacCommand[5] = "-target";
>         javacCommand[6] = "1.5";
> ...
> return javaCompiler.internalCompile(javacCommand, 7);
> There is no mechanism in Complier.internalCompile() to detect JAVA_HOME and execute the
desired javac command. Another Complier method "compileFiles()" is better in this way:
> Class - org.apache.cxf.common.util.Complier
> Method - compileFiles()
> [ Code segment ]
> ...
>         if (new File(System.getProperty("java.home") + fsep + platformjavacname).exists())
{
>             // check if java.home is jdk home
>             javacstr = System.getProperty("java.home") + fsep + platformjavacname;
>         } else if (new File(System.getProperty("java.home") + fsep + ".." + fsep + "bin"
+ fsep
>                             + platformjavacname).exists()) {
>             // check if java.home is jre home
>             javacstr = System.getProperty("java.home") + fsep + ".." + fsep + "bin" +
fsep
>                        + platformjavacname;
>         }
> ...
> It is possible to add this JAVA_HOME checking in Complier.internalCompile() or DynamicClientFactory.
compileJavaSrc() ?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message