You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2011/01/28 19:35:49 UTC
DO NOT REPLY [Bug 50682] New: javac: import
com.sun.org.apache.xml.internal.security.utils.Base64; fails
https://issues.apache.org/bugzilla/show_bug.cgi?id=50682
Summary: javac: import
com.sun.org.apache.xml.internal.security.utils.Base64;
fails
Product: Ant
Version: 1.8.2
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: critical
Priority: P2
Component: Core
AssignedTo: notifications@ant.apache.org
ReportedBy: dlkingjr@yahoo.com
The class import of com.sun.org.apache.xml.internal.security.utils.Base64
fails.
ant output:
[javac] C:\....\security\EncryptionManager.java:23: package
com.sun.org.apache.xml.internal.security.utils does not exist
[javac] import com.sun.org.apache.xml.internal.security.utils.Base64;
The above specified class is in ${JAVA_HOME}/jre/lib/rt.jar. The javac task is
not allowing this jar to be specified in the class path to the compiler if the
jar is specified using the ${JAVA_HOME}/jre/lib/rt.jar path.
This class is found if rt.jar is copied to the project lib directory and then
specified in the classpath to the javac task.
This does not happen when the same class is compiled in Eclipse.
Relevant build.xml fragments:
<path id="project.classpath">
<fileset dir="./lib">
<include name="*.jar"/>
</fileset>
<pathelement path="${java.home}/lib/rt.jar"/> <!-- this is ignored!!!
-->
<pathelement path="${java.home}/lib/resources.jar"/>
<pathelement path="${java.home}/lib/jsse.jar"/>
<pathelement path="${java.home}/lib/jce.jar"/>
<pathelement path="${java.home}/lib/charsets.jar"/>
<pathelement path="${java.home}/lib/dnsns.jar"/>
<pathelement path="${java.home}/lib/localedata.jar"/>
<pathelement path="${java.home}/lib/plugin.jar"/>
<pathelement path="${java.home}/lib/sunjce_provider.jar"/>
<pathelement path="${java.home}/lib/sunmscapi.jar"/>
<pathelement path="${java.home}/lib/sunpkcs11.jar"/>
</path>
<target name="classes" depends="init">
<pathconvert targetos="windows" refid="project.classpath"/>
<javac srcdir="./src"
destdir="./build/classes"
source="1.6"
target="1.6"
includeAntRuntime="no"
includeJavaRuntime="yes"
classpathref="project.classpath"/>
</target>
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 50682] javac: import
com.sun.org.apache.xml.internal.security.utils.Base64; fails
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=50682
Jesse Glick <jg...@netbeans.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |jglick@netbeans.org
Resolution| |INVALID
--- Comment #1 from Jesse Glick <jg...@netbeans.org> 2011-01-28 14:08:41 EST ---
com.sun.**.internal.** classes are not part of the JRE's exposed API and code
is forbidden to compile against them. Use e.g.
org.apache.commons.codec.binary.Base64 instead.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.