question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ByteBuddy pollutes the temp folder with agent jar's

See original GitHub issue

ByteBuddy leaves hundres of byteBuddyAgent############.jar files in Win10 under

C:\Users<username>\AppData\Local\Temp

grafik

Maybe it is a good idea to check for this specific pattern at startup and delete them.

FYI @raphw

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
raphwcommented, Apr 28, 2018

I included a Byte Buddy update in https://github.com/mockito/mockito/pull/1378 - This should avoid the jar creation.

0reactions
raphwcommented, Mar 4, 2019

Then I suggest the following: In the Mockito Inline Mock maker:

  1. detect if running Windows.
  2. Start a seperate demon thread
  3. Scan the folder in which the temporary file of this run was created for files and remove any other file matching the pattern.

Since I am not running Windows: would you be willing to create a PR?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Relic Solution: Java Agent JARs in the /temp directory
The agent creates these temporary files to do its work on JVM startup. ... The temporary folder that the agent JARS are added...
Read more >
Files appended to bootstrap loader not deleted on exit in ...
This is a problem as many Java agents create temporary files to append classes to the bootstrap loader, thus often polluting the temporary...
Read more >
How to attach bytebuddy agent to the dynamic class ...
I tried attach bytebuddy agent to the old applet. In some runtime stage, that old applet receives a signed jar file from the...
Read more >
Java Agent creates many files in temp folder
jar (where N is some digit). Cause. The Java Agent creates temporary files to support its security analysis. Temporary files are created using ......
Read more >
ByteBuddyAgent (Byte Buddy Java agent 1.9.7 API) - javadoc.io
As an argument to this parameter, one must specify the location of this agent's jar file such as for example in. java -javaagent:byte-buddy-agent.jar...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found