• 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
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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: 70223
282
  • 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: 70223
282
  • 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: 70223
282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
for explaining it.
 
The glass is neither half full or half empty. It is too big. But this tiny ad is just right:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic