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

Javassist with Maven

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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:

 
Any sufficiently advanced technology will be used as a cat toy. And this tiny ad contains a very small cat:
create, convert, edit or print DOC and DOCX in Java
https://products.aspose.com/words/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!