This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Replacing the older apt tool : Thinking in Java Source

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

Recently I have migrated the source code for "Thinking in Java" to a maven project, hence making it easier to import the source code as a maven project. https://github.com/gauravojha/tij4-maven

However, my aim was to also upgrade the code to use the newer Java versions (I tried SE8).

Everything else is fine, the only problem is in the annotations package. This package used the older, deprecated apt tool. I would like to replace it with newer APIs as mentioned on http://docs.oracle.com/javase/7/docs/technotes/guides/apt/

I fixed most of the classes, except a few. Can someone help / contribute in doing so? There is an open issue logged there as well.

Thanks in advance,
Gaurav
 
Marshal
Posts: 65755
250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Don't know about apt; it said in the link you quoted that support had been migrated to the javac tool.
I shall move this discussion as too difficult for “beginning”.
 
Gaurav Ojha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fixed the issue.
 
Campbell Ritchie
Marshal
Posts: 65755
250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well done What was the solution?
 
Gaurav Ojha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since the problem was only one package which was using the older apt tool. This tool was deprecated in Java 7 and removed in Java 8. I had Java 8 on my system. So I took the tools.jar from older OpenJDK7u51 and included it as an external jar to my project. Problem solved

I know the issue I raised was help in migrating the code from apt tool. But now since the compilation errors have been removed, I can proceed with proper replacement on my own.
 
Campbell Ritchie
Marshal
Posts: 65755
250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for explaining it.
 
Is that a spider in your hair? Here, threaten it with this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!