• 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
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

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: 64618
225
  • 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: 64618
225
  • 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: 64618
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for explaining it.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!