Win a copy of Head First Android this week in the Android 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Replacing the older apt tool : Thinking in Java Source

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 74371
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Fixed the issue.
 
Campbell Ritchie
Marshal
Posts: 74371
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well done What was the solution?
 
Gaurav Ojha
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 74371
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
for explaining it.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic