<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>xuwei</author_name>
  <author_url>https://blog.hatena.ne.jp/xuwei/</author_url>
  <blog_title>xuwei-k's blog</blog_title>
  <blog_url>https://xuwei-k.hatenablog.com/</blog_url>
  <categories>
    <anon>sbt</anon>
    <anon>java</anon>
    <anon>scala</anon>
  </categories>
  <description>JVMにはjavaagentという特別な仕組みがあるのを知ってますか？ 自分が雑に思いついた具体例を書いておくと、例えばdatadogのtrace用のSDKがjavaagentで実装されてますね。 使用例は色々あるかもしれませんが、javaagentの例や、それの仕組みを詳細に解説するのが今回の目的ではないので、そこの詳細は各自ググってください。 すごく大雑把にいうと、特定の規約に従った普通とは違ったclassを定義して、そのpathを -javaagent: という引数とともに渡すと、普通のmainより先に特別に呼ばれる、という感じだと思います。 (正確には、単に先に呼ばれるより面白いことが…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxuwei-k.hatenablog.com%2Fentry%2F2024%2F05%2F29%2F091227&quot; title=&quot;1つのsbt projectでjavaagentの定義と利用をするsample。あるいはsbtのTests.Setupの代替案 - xuwei-k&amp;#39;s blog&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-05-29 09:12:27</published>
  <title>1つのsbt projectでjavaagentの定義と利用をするsample。あるいはsbtのTests.Setupの代替案</title>
  <type>rich</type>
  <url>https://xuwei-k.hatenablog.com/entry/2024/05/29/091227</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
