unable to compile on java 1.8
Hi,
I've been trying to build the agent on java 1.8 with the following errors
agentdebug/src/main/java/ee/schimke/AgentMain.java:3: error: package com.sun.tools.attach does not exist import com.sun.tools.attach.AgentInitializationException;
With java 11 I am successfully running your code and the agent is working perfectly.
What could be the possible problem causing this error?
thank you
At minimum you will have to change the call to is.readAllBytes.
https://docs.oracle.com/javase/9/docs/api/java/io/InputStream.html#readAllBytes--
But openjdk8 definitely has that package
Is it possible you are using a JRE? Looks like it is related to tools.jar in older JVMs.
https://stackoverflow.com/questions/11901156/missing-library-com-sun-tools-attach
thanks, will look into it right now