- To be more specific, I am running this script from CLI: <?xml version="1.0" ?>
<project default="Compile"> <target name="Compile"> <mkdir dir="classes"/> <javac srcdir="src" includes="**/*.java" destdir="classes" source="1.8" target="1.8" debug="false"> </javac> </target> </project> - This is the class: import sun.security.tools.keytool.CertAndKeyGen; public class AntProblem { } - This is the error: Buildfile: P:\workspaces\TEST\AntProblem\build.xml Compile: [javac] P:\workspaces\TEST\AntProblem\build.xml:14: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 1 source file to P:\workspaces\TEST\AntProblem\classes [javac] P:\workspaces\TEST\AntProblem\src\AntProblem.java:1: error: package sun.security.tools.keytool does not exist [javac] import sun.security.tools.keytool.CertAndKeyGen; [javac] ^ [javac] 1 error BUILD FAILED P:\workspaces\TEST\AntProblem\build.xml:14: Compile failed; see the compiler error output for details. Total time: 624 milliseconds Best regards Markus -----Ursprüngliche Nachricht----- Von: Markus Wiesenbacher [mailto:markus.wiesenbac...@intrafind.de] Gesendet: Montag, 19. Mai 2014 11:43 An: user@ant.apache.org Betreff: Cannot find symbol (CertAndKeyGen) with JDK8 Hi, I am trying to compile my classes (which make use of sun.security.tools.keytool CertAndKeyGen) but I am always getting "cannot find symbol". If I add the JRE-lib folder into my build-script it works. I don´t know why, as the JDK-lib folder also contains the rt.jar containing the needed classes. With JDK7 it always worked without that. I am using Ant v1.9.4. Any suggestions? Thanks and best regards Markus --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org