• 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:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Javassist with Maven

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to do some byte code manipulation with Javassist using Maven. I keep getting a compilation error:

It's as if the JDK is missing a class file. I have the sun JDK installed and I know that maven is using it because when I do a mvn -v call it gives me this (I'm using Ubuntu by the way):

I have this as my pom file (this is currently just a test project to make sure that I can get everything set up correctly):

Any ideas on how to fix this problem?
 
Michael Golightly
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Turns out it wasn't loading the tools.jar library in the jdk lib folder. I added this to the pom file and it worked:

 
Michael Golightly
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I should note that this solution apparently doesn't work on mac's. We've replaced the dependency with a profile instead:

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic