Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5FCD982DD for ; Fri, 9 Sep 2011 18:43:33 +0000 (UTC) Received: (qmail 53962 invoked by uid 500); 9 Sep 2011 18:43:33 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 53940 invoked by uid 500); 9 Sep 2011 18:43:33 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 53928 invoked by uid 99); 9 Sep 2011 18:43:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2011 18:43:33 +0000 X-ASF-Spam-Status: No, hits=-2000.5 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Sep 2011 18:43:30 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8463C8AF4B for ; Fri, 9 Sep 2011 18:43:09 +0000 (UTC) Date: Fri, 9 Sep 2011 18:43:09 +0000 (UTC) From: "Daniel Kulp (JIRA)" To: issues@cxf.apache.org Message-ID: <1624628103.9528.1315593789539.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (CXF-2567) javac calling problem when creating client in DynamicClientFactory MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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