ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Wiesenbacher <markus.wiesenbac...@intrafind.de>
Subject AW: Cannot find symbol (CertAndKeyGen) with JDK8
Date Mon, 19 May 2014 10:56:13 GMT
- 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.wiesenbacher@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-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message