3

I am upgrading my application from java 1.8 to java 11 When I try to build using ant 1.10.8, my build fails but I also see a warning

warning: [options] bootstrap class path not set in conjunction with -source 8

I have set source=1.8 and target=1.8 in build.xml javac ant task

D:\Build>java -version
java version **"11.0.7" 2020-04-14 LTS**
Java(TM) SE Runtime Environment 18.9 (build 11.0.7+8-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.7+8-LTS, mixed mode)
D:\Build>javac -version
javac 11.0.7

Am I missing anything? If Im not wrong, I need to set the bootstrap class path but I am not sure how to do it in ant build.xml file. I also get below error

cannot find symbol [javac] import javax.annotation.PostConstruct;

Please help

    **Note:** Im using javax.xml.ws, javax.xml.bind, javax.activation in my project
Daniel Walker
  • 6,380
  • 5
  • 22
  • 45
Shiva
  • 81
  • 2
  • 5

1 Answers1

0

According to this post (Java 11 package javax.xml.bind does not exist) :

java.xml.bind (JAXB) - REMOVED

Java 8 - OK
Java 9 - DEPRECATED
Java 10 - DEPRECATED
Java 11 - REMOVED

Currently, I'm trying to find a solution with Maven to warn when a deprecation occurs.

I hope this answer can satisfy you

ADinhLux
  • 121
  • 1
  • 7
  • One way to get rid of this warning is to add **release** attribute in your javac ant task. It will not show up again. e.g. ` – Shiva Jul 07 '20 at 12:48