I am doing something about getting execution logs form a java program. But I just achieve this when it's a jar file using command like java -javaagent:agent1.jar -jar MyProgram.jar
. But if there is a software which don't need using java -jar
to open , how can I use my agent1.jar
to get its execution data ? For example, I made a game by java ,and I open it by opening the file MyGame.exe
,which mean that I can't use javaagent:agent.jar
to instrument and get logs.
Are there any ways to solve this problem or any other tools can give me a reference?