<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mohammad Mostafa Dastjerdi</title>
    <description>The latest articles on DEV Community by Mohammad Mostafa Dastjerdi (@mohammadmd1383).</description>
    <link>https://dev.to/mohammadmd1383</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4246260%2Ff52d8fb5-cdba-46de-b930-e926edf84a2f.jpg</url>
      <title>DEV Community: Mohammad Mostafa Dastjerdi</title>
      <link>https://dev.to/mohammadmd1383</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/mohammadmd1383"/>
    <language>en</language>
    <item>
      <title>Your library mod updated. What broke? Diff two mod jars and find every addon call site that hits it</title>
      <dc:creator>Mohammad Mostafa Dastjerdi</dc:creator>
      <pubDate>Sat, 05 Dec 2026 00:30:09 +0000</pubDate>
      <link>https://dev.to/mohammadmd1383/your-library-mod-updated-what-broke-diff-two-mod-jars-and-find-every-addon-call-site-that-hits-it-eo8</link>
      <guid>https://dev.to/mohammadmd1383/your-library-mod-updated-what-broke-diff-two-mod-jars-and-find-every-addon-call-site-that-hits-it-eo8</guid>
      <description>&lt;p&gt;A library mod you depend on goes from 1.4.2 to 2.0.0. The changelog says "cleaned up the registry API". Your addon still compiles in your head. Then a player sends you a &lt;code&gt;NoSuchMethodError&lt;/code&gt; from the launcher log.&lt;/p&gt;

&lt;p&gt;The question you need answered before you bump the version is: &lt;strong&gt;what changed in the public API, and which of my methods touch it?&lt;/strong&gt; You can answer both from the jar files, with no IDE project and no decompiling by hand, using &lt;a href="https://github.com/MohammadMD1383/jdx" rel="noopener noreferrer"&gt;jdx&lt;/a&gt;, an open-source CLI (and MCP server) that reads Java/Kotlin bytecode.&lt;/p&gt;

&lt;p&gt;Everything below was run with &lt;strong&gt;jdx 1.8.6&lt;/strong&gt; (the latest release) on small fixture jars: &lt;code&gt;relicapi-1.4.2.jar&lt;/code&gt;, &lt;code&gt;relicapi-2.0.0.jar&lt;/code&gt; (a made-up library mod with a &lt;code&gt;fabric.mod.json&lt;/code&gt;), and &lt;code&gt;mods/relicbags-1.1.0.jar&lt;/code&gt;, an addon compiled against 1.4.2. The output is pasted exactly as printed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
&lt;span class="c"&gt;# Windows: irm https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.ps1 | iex&lt;/span&gt;
&lt;span class="c"&gt;# needs JDK 21+&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 1: diff the two mod jars
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx diff relicapi-1.4.2.jar relicapi-2.0.0.jar
api diff relicapi-1.4.2.jar -&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; relicapi-2.0.0.jar &lt;span class="o"&gt;(&lt;/span&gt;public surface&lt;span class="o"&gt;)&lt;/span&gt;
breaking  TYPE_MADE_FINAL  com.example.relicapi.api.RelicSlot
breaking  MEMBER_REMOVED  com.example.relicapi.api.RelicRegistry#register&lt;span class="o"&gt;(&lt;/span&gt;java.lang.String, com.example.relicapi.api.Relic&lt;span class="o"&gt;)&lt;/span&gt;
breaking  MEMBER_REMOVED  com.example.relicapi.api.RelicSlot#index
breaking  ABSTRACT_ADDED  com.example.relicapi.api.Relic#isCursed&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
breaking  RETURN_TYPE_CHANGED  com.example.relicapi.api.Relic#getCooldownTicks&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;: int -&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; long
breaking  RETURN_TYPE_CHANGED  com.example.relicapi.api.RelicRegistry#get&lt;span class="o"&gt;(&lt;/span&gt;java.lang.String&lt;span class="o"&gt;)&lt;/span&gt;: com.example.relicapi.api.Relic -&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; java.util.Optional
info  MEMBER_ADDED  com.example.relicapi.api.Relic#tier&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
info  MEMBER_ADDED  com.example.relicapi.api.RelicRegistry#register&lt;span class="o"&gt;(&lt;/span&gt;java.lang.String, java.lang.String, com.example.relicapi.api.Relic&lt;span class="o"&gt;)&lt;/span&gt;
info  MEMBER_ADDED  com.example.relicapi.api.RelicSlot#index&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
info  FIELD_CONSTANT_VALUE_CHANGED  com.example.relicapi.api.RelicSlot#MAX_SLOTS: 4 -&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; 6
6 breaking 路 0 suspicious 路 4 informational 路 0 types added 路 0 types removed
source: relicapi-1.4.2.jar &lt;span class="o"&gt;(&lt;/span&gt;bytecode&lt;span class="o"&gt;)&lt;/span&gt;
source: relicapi-2.0.0.jar &lt;span class="o"&gt;(&lt;/span&gt;bytecode&lt;span class="o"&gt;)&lt;/span&gt;
next: jdx members com.example.relicapi.api.RelicSlot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Some notes for modders:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The most breaking findings come first.&lt;/strong&gt; Each line names one rule (&lt;code&gt;MEMBER_REMOVED&lt;/code&gt;, &lt;code&gt;RETURN_TYPE_CHANGED&lt;/code&gt;, &lt;code&gt;ABSTRACT_ADDED&lt;/code&gt;, ...), so you can filter by rule instead of matching on text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A changed return type breaks binary compatibility.&lt;/strong&gt; The JVM links a call by its full descriptor, so &lt;code&gt;getCooldownTicks()I&lt;/code&gt; and &lt;code&gt;getCooldownTicks()J&lt;/code&gt; are different methods. An addon built against 1.4.2 gets a &lt;code&gt;NoSuchMethodError&lt;/code&gt; at runtime even though the source looks almost the same.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;ABSTRACT_ADDED&lt;/code&gt; on an interface&lt;/strong&gt; means every addon class that implements &lt;code&gt;Relic&lt;/code&gt; without the new method throws &lt;code&gt;AbstractMethodError&lt;/code&gt; when the game calls it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;FIELD_CONSTANT_VALUE_CHANGED&lt;/code&gt;&lt;/strong&gt; is only informational, but it is easy to miss. &lt;code&gt;static final&lt;/code&gt; constants are inlined at compile time, so an addon built against 1.4.2 keeps using &lt;code&gt;4&lt;/code&gt; until you recompile it.&lt;/li&gt;
&lt;li&gt;The ref on each line is already in jdx's canonical form, so you can paste it into the next command.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The default surface is &lt;code&gt;public&lt;/code&gt; (public and protected, which is what an addon compiles against). Add &lt;code&gt;--visibility all&lt;/code&gt; if you mixin into private members too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: which of &lt;em&gt;my&lt;/em&gt; methods hit those changes?
&lt;/h2&gt;

&lt;p&gt;A diff gives you a list of changes. What you need is the list of your own methods that touch them. Put your addon jar and the &lt;strong&gt;old&lt;/strong&gt; library jar on the classpath. Old, because your bytecode still refers to the old members. Then ask about each breaking ref:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx callers &lt;span class="s1"&gt;'com.example.relicapi.api.RelicRegistry#register(java.lang.String, com.example.relicapi.api.Relic)'&lt;/span&gt; --jars &lt;span class="s1"&gt;'mods/*.jar'&lt;/span&gt; --jars relicapi-1.4.2.jar
callers of &lt;span class="s1"&gt;'com.example.relicapi.api.RelicRegistry#register(java.lang.String, com.example.relicapi.api.Relic)'&lt;/span&gt;
  call com.example.relicbags.RelicBags#onInitialize&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;  relicbags-1.1.0.jar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx callers &lt;span class="s1"&gt;'com.example.relicapi.api.Relic#getCooldownTicks()'&lt;/span&gt; --jars &lt;span class="s1"&gt;'mods/*.jar'&lt;/span&gt; --jars relicapi-1.4.2.jar
callers of &lt;span class="s1"&gt;'com.example.relicapi.api.Relic#getCooldownTicks()'&lt;/span&gt;
  call com.example.relicbags.RelicBags#onInitialize&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;  relicbags-1.1.0.jar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A field is not a method, so for the &lt;code&gt;index&lt;/code&gt; field that became private you use &lt;code&gt;usages&lt;/code&gt; (here &lt;code&gt;--in&lt;/code&gt; limits the output to the addon jar):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx usages &lt;span class="s1"&gt;'com.example.relicapi.api.RelicSlot#index'&lt;/span&gt; --in &lt;span class="s1"&gt;'relicbags*'&lt;/span&gt; --jars &lt;span class="s1"&gt;'mods/*.jar'&lt;/span&gt; --jars relicapi-1.4.2.jar
usages of &lt;span class="s1"&gt;'com.example.relicapi.api.RelicSlot#index'&lt;/span&gt;
relicbags-1.1.0.jar &lt;span class="o"&gt;(&lt;/span&gt;1&lt;span class="o"&gt;)&lt;/span&gt;
  &lt;span class="nb"&gt;read&lt;/span&gt; com.example.relicbags.BagScreen#firstSlotIndex&lt;span class="o"&gt;(&lt;/span&gt;com.example.relicapi.api.RelicSlot&lt;span class="o"&gt;)&lt;/span&gt;  BagScreen.java:4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That is a file and a line number, read from the &lt;code&gt;LineNumberTable&lt;/code&gt; in the addon's bytecode.&lt;/p&gt;

&lt;p&gt;For &lt;code&gt;ABSTRACT_ADDED&lt;/code&gt;, the question is "who implements this interface?":&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx implementors com.example.relicapi.api.Relic --jars &lt;span class="s1"&gt;'mods/*.jar'&lt;/span&gt; --jars relicapi-1.4.2.jar
hierarchy of &lt;span class="s1"&gt;'com.example.relicapi.api.Relic'&lt;/span&gt;
  subtypes &lt;span class="k"&gt;in&lt;/span&gt; workspace &lt;span class="o"&gt;(&lt;/span&gt;1&lt;span class="o"&gt;)&lt;/span&gt;
    class com.example.relicbags.SatchelRelic  relicbags-1.1.0.jar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;SatchelRelic&lt;/code&gt; must now implement &lt;code&gt;isCursed()&lt;/code&gt;. Its &lt;code&gt;int getCooldownTicks()&lt;/code&gt; also no longer overrides anything, because 2.0.0 declares &lt;code&gt;long getCooldownTicks()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Last, check the replacement API in the new jar before you rewrite the call:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx signature &lt;span class="s1"&gt;'com.example.relicapi.api.RelicRegistry#register'&lt;/span&gt; --jars relicapi-2.0.0.jar
signatures of com.example.relicapi.api.RelicRegistry#register
  public static void register&lt;span class="o"&gt;(&lt;/span&gt;java.lang.String namespace, java.lang.String path, com.example.relicapi.api.Relic relic&lt;span class="o"&gt;)&lt;/span&gt;
source: relicapi-2.0.0.jar &lt;span class="o"&gt;(&lt;/span&gt;bytecode&lt;span class="o"&gt;)&lt;/span&gt;
next: jdx show com.example.relicapi.api.RelicRegistry
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This took four lookups and no launcher run. Each of the three source files that need edits is named: &lt;code&gt;RelicBags&lt;/code&gt;, &lt;code&gt;BagScreen&lt;/code&gt; and &lt;code&gt;SatchelRelic&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: loop over every breaking ref
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;--json&lt;/code&gt; gives you the same report as data, so you can feed the breaking refs into the lookups above:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx diff relicapi-1.4.2.jar relicapi-2.0.0.jar --json &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.result.findings[] | select(.severity=="breaking") | .ref'&lt;/span&gt;
com.example.relicapi.api.RelicSlot
com.example.relicapi.api.RelicRegistry#register&lt;span class="o"&gt;(&lt;/span&gt;java.lang.String, com.example.relicapi.api.Relic&lt;span class="o"&gt;)&lt;/span&gt;
com.example.relicapi.api.RelicSlot#index
com.example.relicapi.api.Relic#isCursed&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
com.example.relicapi.api.Relic#getCooldownTicks&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
com.example.relicapi.api.RelicRegistry#get&lt;span class="o"&gt;(&lt;/span&gt;java.lang.String&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each finding also has &lt;code&gt;severity&lt;/code&gt;, &lt;code&gt;rule&lt;/code&gt;, &lt;code&gt;type&lt;/code&gt; and &lt;code&gt;detail&lt;/code&gt; (for example &lt;code&gt;"int -&amp;gt; long"&lt;/code&gt;).&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: gate your own library's releases
&lt;/h2&gt;

&lt;p&gt;If you are the one &lt;em&gt;publishing&lt;/em&gt; the library mod, run the check the other way: compare your last release against the new build in CI. &lt;code&gt;diff&lt;/code&gt; exits 0 whenever the comparison ran. Add &lt;code&gt;--fail-on breaking&lt;/code&gt; to turn breaking changes into exit 1:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx diff relicapi-1.4.2.jar relicapi-2.0.0.jar --severity breaking --fail-on breaking
api diff relicapi-1.4.2.jar -&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; relicapi-2.0.0.jar &lt;span class="o"&gt;(&lt;/span&gt;public surface&lt;span class="o"&gt;)&lt;/span&gt;
breaking  TYPE_MADE_FINAL  com.example.relicapi.api.RelicSlot
breaking  MEMBER_REMOVED  com.example.relicapi.api.RelicRegistry#register&lt;span class="o"&gt;(&lt;/span&gt;java.lang.String, com.example.relicapi.api.Relic&lt;span class="o"&gt;)&lt;/span&gt;
breaking  MEMBER_REMOVED  com.example.relicapi.api.RelicSlot#index
breaking  ABSTRACT_ADDED  com.example.relicapi.api.Relic#isCursed&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
breaking  RETURN_TYPE_CHANGED  com.example.relicapi.api.Relic#getCooldownTicks&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;: int -&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; long
breaking  RETURN_TYPE_CHANGED  com.example.relicapi.api.RelicRegistry#get&lt;span class="o"&gt;(&lt;/span&gt;java.lang.String&lt;span class="o"&gt;)&lt;/span&gt;: com.example.relicapi.api.Relic -&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; java.util.Optional
4 findings below --severity breaking
6 breaking 路 0 suspicious 路 4 informational 路 0 types added 路 0 types removed
fail-on breaking: 6 breaking changes &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt; 1&lt;span class="o"&gt;)&lt;/span&gt;
source: relicapi-1.4.2.jar &lt;span class="o"&gt;(&lt;/span&gt;bytecode&lt;span class="o"&gt;)&lt;/span&gt;
source: relicapi-2.0.0.jar &lt;span class="o"&gt;(&lt;/span&gt;bytecode&lt;span class="o"&gt;)&lt;/span&gt;
next: jdx members com.example.relicapi.api.RelicSlot
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The tally always covers the whole comparison, even when &lt;code&gt;--severity&lt;/code&gt; hides some lines. A build with no API change prints &lt;code&gt;no differences (3 types compared)&lt;/code&gt; and exits 0. If you meant to break things (it is 2.0.0, after all), the report is a ready-made "Breaking changes" section for your changelog.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest caveats
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;jdx does not remap.&lt;/strong&gt; It reads names exactly as they are stored in the jar. A mod jar from Modrinth or CurseForge built for Fabric or Quilt uses intermediary names for &lt;em&gt;game&lt;/em&gt; classes, while your dev build uses Yarn or Mojang names. If your question involves Minecraft classes, pass the &lt;strong&gt;Loom-mapped&lt;/strong&gt; jar that Fabric Loom or NeoForge ModDevGradle already wrote, with &lt;code&gt;--jars&lt;/code&gt; (for &lt;code&gt;callers&lt;/code&gt;/&lt;code&gt;usages&lt;/code&gt;/&lt;code&gt;signature&lt;/code&gt;) or as a &lt;code&gt;diff&lt;/code&gt; argument.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;diff only works within one mapping namespace.&lt;/strong&gt; Yarn vs Mojmap, or intermediary vs named, share almost no names, so the report looks like everything was removed and re-added. That comparison is meaningless. Compare two jars that use the same names: two builds of a library compiled in one namespace (as here, where the library's own package names are not remapped), or two Loom-mapped Minecraft jars with the same mappings. Remapping is tracked in &lt;a href="https://github.com/MohammadMD1383/jdx/issues/24" rel="noopener noreferrer"&gt;#24&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It compares bytecode, not behavior.&lt;/strong&gt; If a method keeps its signature but its meaning changes, the diff cannot see it. Use &lt;code&gt;jdx body&lt;/code&gt; on both jars for that.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reflection and string-based lookups are invisible&lt;/strong&gt; to &lt;code&gt;callers&lt;/code&gt;/&lt;code&gt;usages&lt;/code&gt;, and so are mixin targets that are written as strings. Check your mixin configs separately.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;callers&lt;/code&gt; and &lt;code&gt;usages&lt;/code&gt; here are a static index of your jars, not a running game.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Guide (canonical for this post): &lt;a href="https://mohammadmd1383.github.io/jdx/docs/minecraft-version-diff/" rel="noopener noreferrer"&gt;See what changed between two Minecraft or mod versions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Rule list and CI recipe: &lt;a href="https://mohammadmd1383.github.io/jdx/docs/api-diff/" rel="noopener noreferrer"&gt;API diff for upgrades&lt;/a&gt; 路 &lt;a href="https://mohammadmd1383.github.io/jdx/docs/reference/diff/" rel="noopener noreferrer"&gt;jdx diff reference&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/MohammadMD1383/jdx" rel="noopener noreferrer"&gt;MohammadMD1383/jdx&lt;/a&gt;. If you have two real versions of a library mod where the report looks wrong, please open an issue.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>minecraft</category>
      <category>java</category>
      <category>modding</category>
      <category>cli</category>
    </item>
    <item>
      <title>Catch a broken quilt.mod.json before your players do: jdx resources --check (v1.8.6)</title>
      <dc:creator>Mohammad Mostafa Dastjerdi</dc:creator>
      <pubDate>Thu, 03 Dec 2026 16:50:12 +0000</pubDate>
      <link>https://dev.to/mohammadmd1383/catch-a-broken-quiltmodjson-before-your-players-do-jdx-resources-check-v186-51h9</link>
      <guid>https://dev.to/mohammadmd1383/catch-a-broken-quiltmodjson-before-your-players-do-jdx-resources-check-v186-51h9</guid>
      <description>&lt;p&gt;Quilt's loader is strict about &lt;code&gt;quilt.mod.json&lt;/code&gt;: a missing &lt;code&gt;schema_version&lt;/code&gt;, a mod id with a capital letter, a &lt;code&gt;depends&lt;/code&gt; that is a string where an array is expected. You find out when the game refuses to start, or when a player opens an issue after you have published.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;jdx&lt;/a&gt; is an open-source CLI and MCP server (Kotlin, Java 21+, Apache-2.0) that answers IDE-style questions about JVM jars without loading or running them. &lt;code&gt;jdx resources --check&lt;/code&gt; arrived in v1.8.5 and covered Fabric and (Neo)Forge metadata well, but its Quilt support was shallow. &lt;a href="https://github.com/MohammadMD1383/jdx/releases/tag/v1.8.6" rel="noopener noreferrer"&gt;v1.8.6&lt;/a&gt;, released today (&lt;a href="https://github.com/MohammadMD1383/jdx/issues/200" rel="noopener noreferrer"&gt;issue #200&lt;/a&gt;, &lt;a href="https://github.com/MohammadMD1383/jdx/pull/206" rel="noopener noreferrer"&gt;PR #206&lt;/a&gt;), checks &lt;code&gt;quilt.mod.json&lt;/code&gt; as deeply as &lt;code&gt;fabric.mod.json&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
&lt;span class="c"&gt;# Windows: irm https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.ps1 | iex&lt;/span&gt;
&lt;span class="c"&gt;# existing release installs: jdx upgrade&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Two small Quilt mods
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;quilt-demo-1.0.0.jar&lt;/code&gt; is written correctly. It bundles a tiny library under &lt;code&gt;META-INF/jars/&lt;/code&gt; and depends on it, on Quilted Fabric API and on the loader itself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"schema_version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"quilt_loader"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"group"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"com.example"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"quilt_demo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"1.0.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"entrypoints"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"init"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"com.example.quiltdemo.QuiltDemo"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"jars"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"META-INF/jars/tiny-config-2.1.0.jar"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"depends"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="s2"&gt;"org.quiltmc:quilt_loader"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"quilted_fabric_api"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"versions"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&amp;gt;=9.0.0"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="s2"&gt;"tiny_config"&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"mixin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"quilt_demo.mixins.json"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;sloppy-0.1.0.jar&lt;/code&gt; is the kind of file you write at 2 a.m.:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"quilt_loader"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Sloppy-Mod"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"0.1.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"entrypoints"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"init"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"com.example.sloppy.SloppyInit"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"jars"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"META-INF/jars/forgotten.jar"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"depends"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"quilted_fabric_api"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"mixin"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"sloppy.mixins.json"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Check them
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resources --check --jars mods &lt;span class="s1"&gt;'quilt.mod.json'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Real output from jdx 1.8.6:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;checked 4 metadata files: 7 errors, 1 warning
quilt-demo-1.0.0.jar
  quilt.mod.json (quilt.mod.json): 1 warning
    warning: dependency 'quilted_fabric_api' is not provided by any opened jar or nested jar (add it to --jars, or the game or loader supplies it)
  quilt_demo.mixins.json (mixin config): ok
quilt-demo-1.0.0.jar!META-INF/jars/tiny-config-2.1.0.jar
  quilt.mod.json (quilt.mod.json): ok
sloppy-0.1.0.jar
  quilt.mod.json (quilt.mod.json): 7 errors
    error: missing required field 'schema_version'
    error: missing required field 'quilt_loader.group'
    error: 'quilt_loader.id' "Sloppy-Mod" must be 2-64 characters of a-z, 0-9, - or _, starting with a letter
    error: entrypoint 'init' class com.example.sloppy.SloppyInit is not on the classpath
    error: mixin config 'sloppy.mixins.json' is not in this jar
    error: nested jar 'META-INF/jars/forgotten.jar' is not in this jar
    error: 'quilt_loader.depends' must be an array
note: --check reads metadata in place; use --cat to print a file raw. Nothing is downloaded.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What happened there:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quilt-only shape rules.&lt;/strong&gt; &lt;code&gt;schema_version&lt;/code&gt;, &lt;code&gt;quilt_loader.group&lt;/code&gt;, the id format, and &lt;code&gt;depends&lt;/code&gt; / &lt;code&gt;jars&lt;/code&gt; / &lt;code&gt;mixin&lt;/code&gt; being the right JSON type are new in 1.8.6. In 1.8.5 the same &lt;code&gt;sloppy&lt;/code&gt; jar showed only the entrypoint and mixin-config errors.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;group:id&lt;/code&gt; dependencies.&lt;/strong&gt; &lt;code&gt;org.quiltmc:quilt_loader&lt;/code&gt; is matched by its mod id, so it is no longer reported as missing (1.8.5 warned about it).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nested jars.&lt;/strong&gt; &lt;code&gt;tiny_config&lt;/code&gt; lives only inside &lt;code&gt;quilt-demo&lt;/code&gt;'s &lt;code&gt;META-INF/jars/&lt;/code&gt;. jdx opens that nested jar as its own root, checks its &lt;code&gt;quilt.mod.json&lt;/code&gt;, and counts its id when matching dependencies, so it is not flagged. A path listed in &lt;code&gt;quilt_loader.jars&lt;/code&gt; that is not in the jar is an error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Classes are looked up, not loaded.&lt;/strong&gt; The entrypoint check means "no class with that name in the opened jars"; nothing is run.&lt;/li&gt;
&lt;li&gt;The one warning is honest: Quilted Fabric API is not in &lt;code&gt;--jars&lt;/code&gt;. Add its jar, or accept that the game supplies it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Use it as a CI gate
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;--check&lt;/code&gt; does not change the exit code on findings (it exits 0 when it checked a file), so gate on the JSON instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;./gradlew build
jdx resources --check --jars build/libs/sloppy-0.1.0.jar &lt;span class="s1"&gt;'quilt.mod.json'&lt;/span&gt; --json \
  &lt;span class="o"&gt;|&lt;/span&gt; jq -e &lt;span class="s1"&gt;'.result.errors == 0'&lt;/span&gt;
&lt;span class="c"&gt;# prints false, exit 1  (for quilt-demo-1.0.0.jar: true, exit 0)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every finding is in &lt;code&gt;.result.files[].findings[]&lt;/code&gt; with a &lt;code&gt;severity&lt;/code&gt; and a &lt;code&gt;message&lt;/code&gt;, so you can also print them in the job log. Warnings about dependencies the game provides do not count as errors, so a lone mod jar still passes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does not do
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No version ranges.&lt;/strong&gt; &lt;code&gt;"versions": "&amp;gt;=9.0.0"&lt;/code&gt; is not evaluated (&lt;a href="https://github.com/MohammadMD1383/jdx/issues/199" rel="noopener noreferrer"&gt;#199&lt;/a&gt; is open).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No load order, no loader emulation.&lt;/strong&gt; It reads files; it does not resolve the dependency graph the way Quilt Loader does.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No remapping.&lt;/strong&gt; jdx reads names as stored. A published mod uses intermediary names, your dev build uses Mojang/Yarn names. When an entrypoint or mixin target needs game classes, pass the Loom-mapped Minecraft jar with &lt;code&gt;--jars&lt;/code&gt;, and keep everything in one mapping namespace (the same applies to &lt;code&gt;jdx diff&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;No Quilt-only fields beyond the loader basics were added; unknown keys are ignored, not flagged.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same &lt;code&gt;--check&lt;/code&gt; covers &lt;code&gt;fabric.mod.json&lt;/code&gt;, &lt;code&gt;META-INF/mods.toml&lt;/code&gt;, &lt;code&gt;META-INF/neoforge.mods.toml&lt;/code&gt; and mixin configs, and it is available to AI agents as the MCP tool &lt;code&gt;jdx_resources&lt;/code&gt; with &lt;code&gt;check&lt;/code&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Docs: &lt;a href="https://mohammadmd1383.github.io/jdx/docs/reference/resources/" rel="noopener noreferrer"&gt;resources reference&lt;/a&gt;, &lt;a href="https://mohammadmd1383.github.io/jdx/docs/minecraft-mods/" rel="noopener noreferrer"&gt;Minecraft mods guide&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Release notes: &lt;a href="https://github.com/MohammadMD1383/jdx/releases/tag/v1.8.6" rel="noopener noreferrer"&gt;v1.8.6&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Repo: &lt;a href="https://github.com/MohammadMD1383/jdx" rel="noopener noreferrer"&gt;MohammadMD1383/jdx&lt;/a&gt; (issues and Quilt mods to test against are very welcome)&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>minecraft</category>
      <category>java</category>
      <category>modding</category>
      <category>quilt</category>
    </item>
    <item>
      <title>Lint a mods folder before you launch: jdx resources --check</title>
      <dc:creator>Mohammad Mostafa Dastjerdi</dc:creator>
      <pubDate>Wed, 02 Dec 2026 16:35:33 +0000</pubDate>
      <link>https://dev.to/mohammadmd1383/lint-a-mods-folder-before-you-launch-jdx-resources-check-2o0l</link>
      <guid>https://dev.to/mohammadmd1383/lint-a-mods-folder-before-you-launch-jdx-resources-check-2o0l</guid>
      <description>&lt;p&gt;A typo in &lt;code&gt;fabric.mod.json&lt;/code&gt;, a mixin config that never made it into the jar, a client entrypoint renamed in code but not in metadata: the loader reports all of these, but only after you have started the game. In a big pack, that start can take a minute or more.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;jdx&lt;/a&gt; is an open-source CLI and MCP server (Kotlin, Java 21+, Apache-2.0) that answers IDE-style questions about JVM jars without loading or running them. Since v1.8.5 (&lt;a href="https://github.com/MohammadMD1383/jdx/pull/198" rel="noopener noreferrer"&gt;PR #198&lt;/a&gt;, &lt;a href="https://github.com/MohammadMD1383/jdx/issues/179" rel="noopener noreferrer"&gt;issue #179&lt;/a&gt;), &lt;code&gt;jdx resources --check&lt;/code&gt; reads the mod metadata inside the jars and reports problems before you launch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Windows: &lt;code&gt;irm https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.ps1 | iex&lt;/code&gt;. Existing release installs update with &lt;code&gt;jdx upgrade&lt;/code&gt;.)&lt;/p&gt;

&lt;h2&gt;
  
  
  What it reads
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;--check&lt;/code&gt; looks at &lt;code&gt;fabric.mod.json&lt;/code&gt;, &lt;code&gt;quilt.mod.json&lt;/code&gt;, &lt;code&gt;META-INF/mods.toml&lt;/code&gt;, &lt;code&gt;META-INF/neoforge.mods.toml&lt;/code&gt; and mixin configs, plus the mixin configs those files name. It reports:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;JSON or TOML that doesn't parse, with the line (and the column for JSON).&lt;/li&gt;
&lt;li&gt;Missing required fields: &lt;code&gt;schemaVersion&lt;/code&gt;, &lt;code&gt;id&lt;/code&gt; and &lt;code&gt;version&lt;/code&gt; for Fabric; &lt;code&gt;modLoader&lt;/code&gt;, &lt;code&gt;loaderVersion&lt;/code&gt;, &lt;code&gt;license&lt;/code&gt; and a &lt;code&gt;[[mods]]&lt;/code&gt; entry with a &lt;code&gt;modId&lt;/code&gt; for Forge and NeoForge.&lt;/li&gt;
&lt;li&gt;Entrypoint, mixin and mixin-plugin classes that aren't in any opened jar.&lt;/li&gt;
&lt;li&gt;Mixin configs named in the metadata that aren't in the same jar.&lt;/li&gt;
&lt;li&gt;Declared dependencies that no jar in &lt;code&gt;--jars&lt;/code&gt; provides. &lt;code&gt;minecraft&lt;/code&gt;, &lt;code&gt;java&lt;/code&gt; and the loaders themselves are skipped, and so are optional Forge/NeoForge dependencies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each finding is an &lt;code&gt;error&lt;/code&gt; or a &lt;code&gt;warning&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A small broken pack
&lt;/h2&gt;

&lt;p&gt;To test it, I built three tiny jars:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;examplemod-1.0.0.jar&lt;/code&gt;: its &lt;code&gt;fabric.mod.json&lt;/code&gt; names a &lt;code&gt;main&lt;/code&gt; entrypoint that exists, a &lt;code&gt;client&lt;/code&gt; entrypoint that doesn't, two mixin configs (only one is in the jar) and depends on &lt;code&gt;fabric-api&lt;/code&gt; and &lt;code&gt;cloth-config&lt;/code&gt;. The mixin config that is in the jar has a trailing comma.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;cloth-config-15.0.140.jar&lt;/code&gt;: only a valid &lt;code&gt;fabric.mod.json&lt;/code&gt; with &lt;code&gt;"id": "cloth-config"&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;forgeymod-1.0.0.jar&lt;/code&gt;: a &lt;code&gt;META-INF/mods.toml&lt;/code&gt; with an unclosed string on &lt;code&gt;displayName&lt;/code&gt;, and a required dependency on &lt;code&gt;jei&lt;/code&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resources --check --jars mods --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;checked 4 metadata files: 4 errors, 1 warning
cloth-config-15.0.140.jar
  fabric.mod.json (fabric.mod.json): ok
examplemod-1.0.0.jar
  examplemod.mixins.json (mixin config): 1 error
    error: malformed JSON: line 8, column 3: unexpected character ']'
  fabric.mod.json (fabric.mod.json): 2 errors, 1 warning
    error: entrypoint 'client' class com.example.client.ExampleModClient is not on the classpath
    error: mixin config 'examplemod.client.mixins.json' is not in this jar
    warning: dependency 'fabric-api' is not provided by any opened jar (add it to --jars, or the game or loader supplies it)
forgeymod-1.0.0.jar
  META-INF/mods.toml (mods.toml): 1 error
    error: malformed TOML: line 8: unterminated string
note: --check reads metadata in place; use --cat to print a file raw. Nothing is downloaded.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's how to read it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;cloth-config&lt;/code&gt; is satisfied because a jar in &lt;code&gt;--jars&lt;/code&gt; declares that mod id, so there is no warning for it. &lt;code&gt;fabric-api&lt;/code&gt; isn't in the folder, so it gets a warning. &lt;code&gt;minecraft&lt;/code&gt; and &lt;code&gt;fabricloader&lt;/code&gt; aren't reported at all.&lt;/li&gt;
&lt;li&gt;The JSON error points at the &lt;code&gt;]&lt;/code&gt; right after the trailing comma, and the TOML error points at the &lt;code&gt;displayName&lt;/code&gt; line.&lt;/li&gt;
&lt;li&gt;A file that doesn't parse can't be checked further. That's why the mixin classes and the &lt;code&gt;jei&lt;/code&gt; dependency aren't reported yet.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;After fixing the comma and the quote and rebuilding the two jars, the same command goes one level deeper:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;checked 4 metadata files: 3 errors, 2 warnings
cloth-config-15.0.140.jar
  fabric.mod.json (fabric.mod.json): ok
examplemod-1.0.0.jar
  examplemod.mixins.json (mixin config): 1 error
    error: mixin class com.example.mixin.ChatHudMixin (in 'mixins') is not on the classpath
  fabric.mod.json (fabric.mod.json): 2 errors, 1 warning
    error: entrypoint 'client' class com.example.client.ExampleModClient is not on the classpath
    error: mixin config 'examplemod.client.mixins.json' is not in this jar
    warning: dependency 'fabric-api' is not provided by any opened jar (add it to --jars, or the game or loader supplies it)
forgeymod-1.0.0.jar
  META-INF/mods.toml (mods.toml): 1 warning
    warning: dependency 'jei' is not provided by any opened jar (add it to --jars, or the game or loader supplies it)
note: --check reads metadata in place; use --cat to print a file raw. Nothing is downloaded.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;TitleScreenMixin&lt;/code&gt; is in the jar, so only &lt;code&gt;ChatHudMixin&lt;/code&gt; is reported. Missing fields look like this, for a &lt;code&gt;neoforge.mods.toml&lt;/code&gt; whose &lt;code&gt;[[mods]]&lt;/code&gt; entry has no &lt;code&gt;modId&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;checked 1 metadata file: 1 error, 0 warnings
neomod-2.0.0.jar
  META-INF/neoforge.mods.toml (neoforge.mods.toml): 1 error
    error: [[mods]] #1 is missing 'modId'
note: --check reads metadata in place; use --cat to print a file raw. Nothing is downloaded.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Narrowing it down
&lt;/h2&gt;

&lt;p&gt;The usual &lt;code&gt;resources&lt;/code&gt; filters work. &lt;code&gt;--in&lt;/code&gt; limits the check to one jar, and the other jars still count as providers:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resources --check --in &lt;span class="s1"&gt;'examplemod*'&lt;/span&gt; --jars mods --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That prints &lt;code&gt;checked 2 metadata files: 3 errors, 1 warning&lt;/code&gt; with just the &lt;code&gt;examplemod-1.0.0.jar&lt;/code&gt; section. A pattern works too: &lt;code&gt;jdx resources --check fabric.mod.json --jars mods --no-jdk&lt;/code&gt; checks every &lt;code&gt;fabric.mod.json&lt;/code&gt; and the mixin configs they name. &lt;code&gt;--limit&lt;/code&gt; caps how many files are listed.&lt;/p&gt;

&lt;h2&gt;
  
  
  In a script or CI
&lt;/h2&gt;

&lt;p&gt;Findings don't change the exit code. The command exits 0 when at least one metadata file was checked, even with errors, and 1 when nothing matched:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ jdx resources --check 'nothing-here.toml' --jars mods --no-jdk
not found: nothing-here.toml
no mod metadata matching 'nothing-here.toml'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(exit 1). &lt;code&gt;--check&lt;/code&gt; together with &lt;code&gt;--cat&lt;/code&gt; is a usage error (exit 3).&lt;/p&gt;

&lt;p&gt;To fail a build, use &lt;code&gt;--json&lt;/code&gt;, which carries every finding with its &lt;code&gt;severity&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resources --check --jars mods --no-jdk --json \
  &lt;span class="o"&gt;|&lt;/span&gt; jq -r &lt;span class="s1"&gt;'.result.files[] | .artifact as $a | .findings[] | select(.severity=="error") | "\($a): \(.message)"'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;examplemod-1.0.0.jar: mixin class com.example.mixin.ChatHudMixin (in 'mixins') is not on the classpath
examplemod-1.0.0.jar: entrypoint 'client' class com.example.client.ExampleModClient is not on the classpath
examplemod-1.0.0.jar: mixin config 'examplemod.client.mixins.json' is not in this jar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The summary also includes &lt;code&gt;.result.errors&lt;/code&gt; and &lt;code&gt;.result.warnings&lt;/code&gt; counts, so &lt;code&gt;jq -e '.result.errors == 0'&lt;/code&gt; makes a one-line gate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No remapping.&lt;/strong&gt; Class checks look for the names the jar stores. For anything that refers to game classes, pass the Loom-mapped Minecraft jar with &lt;code&gt;--jars&lt;/code&gt;, in the same namespace as the mods.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version ranges aren't checked.&lt;/strong&gt; &lt;code&gt;"cloth-config": "&amp;gt;=15"&lt;/code&gt; passes if any jar declares &lt;code&gt;cloth-config&lt;/code&gt;, whatever its version.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No load order.&lt;/strong&gt; jdx doesn't simulate the loader. It doesn't resolve which mod wins, doesn't detect conflicts between mods and doesn't apply mixins.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nothing is downloaded and no class is loaded.&lt;/strong&gt; A missing dependency is a warning. jdx never fetches it, and the game or loader may still supply it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Exit code.&lt;/strong&gt; Findings don't change the exit code (see above).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Nested jars.&lt;/strong&gt; In v1.8.5, a dependency that a mod only bundles as jar-in-jar can still show up as "not provided". The fix (&lt;a href="https://github.com/MohammadMD1383/jdx/pull/203" rel="noopener noreferrer"&gt;PR #203&lt;/a&gt;) is on main and will be in the next release.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  From an agent
&lt;/h2&gt;

&lt;p&gt;The MCP tool &lt;code&gt;jdx_resources&lt;/code&gt; takes &lt;code&gt;check&lt;/code&gt;, so after &lt;code&gt;jdx setup --agent claude-code&lt;/code&gt; an agent can run the same check on a mods folder and read the findings as JSON.&lt;/p&gt;

&lt;p&gt;The repo is at &lt;a href="https://github.com/MohammadMD1383/jdx" rel="noopener noreferrer"&gt;https://github.com/MohammadMD1383/jdx&lt;/a&gt;. The modpack guide covers the other questions, like which mod logs a message, ships a duplicate class or mixes into a class: &lt;a href="https://mohammadmd1383.github.io/jdx/docs/minecraft-modpack/" rel="noopener noreferrer"&gt;https://mohammadmd1383.github.io/jdx/docs/minecraft-modpack/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>minecraft</category>
      <category>java</category>
      <category>modding</category>
      <category>cli</category>
    </item>
    <item>
      <title>Which mod ships this recipe, loot table or texture? Search assets/ and data/ across a whole mods folder</title>
      <dc:creator>Mohammad Mostafa Dastjerdi</dc:creator>
      <pubDate>Tue, 01 Dec 2026 16:37:00 +0000</pubDate>
      <link>https://dev.to/mohammadmd1383/which-mod-ships-this-recipe-loot-table-or-texture-search-assets-and-data-across-a-whole-mods-1g71</link>
      <guid>https://dev.to/mohammadmd1383/which-mod-ships-this-recipe-loot-table-or-texture-search-assets-and-data-across-a-whole-mods-1g71</guid>
      <description>&lt;p&gt;A crafting recipe is not what the wiki says. A block drops the wrong item. A texture looks like it came from a different mod. In a modpack the answer is almost always "some jar in &lt;code&gt;mods/&lt;/code&gt; ships a file under &lt;code&gt;data/&lt;/code&gt; or &lt;code&gt;assets/&lt;/code&gt; that wins", and the usual way to find it is unzipping jars one by one.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;jdx&lt;/a&gt; is an open-source CLI and MCP server (Kotlin, Java 21+, Apache-2.0) that answers IDE-style questions about JVM jars without loading or running them. This post is about one small command: &lt;code&gt;jdx resources&lt;/code&gt;, which lists the non-class files inside jars. Since v1.8.2 (PR #167) its pattern can be a glob, which is what makes it useful on a whole mods folder.&lt;/p&gt;

&lt;h2&gt;
  
  
  The basics
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resources &lt;span class="s1"&gt;'diamond_sword.json'&lt;/span&gt; --jars mods --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--jars mods&lt;/code&gt; reads every &lt;code&gt;.jar&lt;/code&gt;/&lt;code&gt;.zip&lt;/code&gt; directly inside the folder (the same as &lt;code&gt;--jars 'mods/*.jar'&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--no-jdk&lt;/code&gt; leaves the JDK's own modules out, since they ship no mod data.&lt;/li&gt;
&lt;li&gt;Output is grouped by jar, with a count per jar and one path per line, so the jar name is your answer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The pattern rules are short:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;No &lt;code&gt;*&lt;/code&gt; or &lt;code&gt;?&lt;/code&gt;: a plain &lt;strong&gt;substring&lt;/strong&gt; of the entry path.&lt;/li&gt;
&lt;li&gt;With &lt;code&gt;*&lt;/code&gt; or &lt;code&gt;?&lt;/code&gt;: a &lt;strong&gt;glob&lt;/strong&gt;. &lt;code&gt;*&lt;/code&gt; and &lt;code&gt;?&lt;/code&gt; stay inside one path segment, &lt;code&gt;**&lt;/code&gt; crosses &lt;code&gt;/&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A glob containing &lt;code&gt;/&lt;/code&gt; must match the &lt;strong&gt;whole&lt;/strong&gt; path. A glob without &lt;code&gt;/&lt;/code&gt; also matches just the &lt;strong&gt;file name&lt;/strong&gt;, at any depth.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Nothing matched exits 1. Listing stops at 50 rows by default; raise it with &lt;code&gt;--limit&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which mods add or override recipes?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# every recipe in the pack, grouped by jar&lt;/span&gt;
jdx resources &lt;span class="s1"&gt;'data/*/recipe*/**'&lt;/span&gt; --jars mods --no-jdk --limit 500

&lt;span class="c"&gt;# who ships a recipe in the minecraft namespace (i.e. overrides vanilla)?&lt;/span&gt;
jdx resources &lt;span class="s1"&gt;'data/minecraft/recipe*/**'&lt;/span&gt; --jars mods --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;recipe*&lt;/code&gt; matches both &lt;code&gt;recipe/&lt;/code&gt; and &lt;code&gt;recipes/&lt;/code&gt; folders, since the folder name differs between Minecraft versions. The second command is the useful one when a vanilla recipe changed: a mod that ships &lt;code&gt;data/minecraft/...&lt;/code&gt; is replacing a vanilla file.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which mod changes this loot table?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resources &lt;span class="s1"&gt;'data/*/loot_table*/blocks/diamond_ore.json'&lt;/span&gt; --jars mods --no-jdk
jdx resources &lt;span class="s1"&gt;'diamond_ore.json'&lt;/span&gt; --jars mods --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On a small test folder with two mods, the first command prints:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resources matching 'data/*/loot_table*/blocks/diamond_ore.json'
examplemod-1.0.jar (1)
  data/examplemod/loot_table/blocks/diamond_ore.json
othermod-2.0.jar (1)
  data/minecraft/loot_table/blocks/diamond_ore.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;othermod&lt;/code&gt; ships a file under &lt;code&gt;data/minecraft/&lt;/code&gt;, so it replaces the vanilla drop. The first command is precise. The second is a file-name glob, so it also finds blockstates, models and recipes with the same name. Sometimes that's exactly what you want.&lt;/p&gt;

&lt;h2&gt;
  
  
  Which mod ships this texture?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resources &lt;span class="s1"&gt;'assets/*/textures/**/ruby*.png'&lt;/span&gt; --jars mods --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can't &lt;code&gt;--cat&lt;/code&gt; a PNG. jdx refuses to dump binary payloads and only reports the size. For text files, &lt;code&gt;--cat&lt;/code&gt; prints the content of the one file that matches:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resources &lt;span class="s1"&gt;'data/minecraft/recipe*/diamond_sword.json'&lt;/span&gt; --cat --in &lt;span class="s1"&gt;'examplemod*'&lt;/span&gt; --jars mods --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If more than one path matches, &lt;code&gt;--cat&lt;/code&gt; exits 2 and lists &lt;code&gt;path --in artifact&lt;/code&gt; candidates. Narrow the jar with &lt;code&gt;--in&lt;/code&gt; (a glob on the jar file name) or tighten the pattern. &lt;code&gt;--max-lines&lt;/code&gt; caps the output (default 200).&lt;/p&gt;

&lt;h2&gt;
  
  
  Mixin configs and metadata, same command
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resources &lt;span class="s1"&gt;'*.mixins.json'&lt;/span&gt; --jars mods --no-jdk --limit 200
jdx resources fabric.mod.json --cat --in &lt;span class="s1"&gt;'examplemod*'&lt;/span&gt; --jars mods --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before v1.8.2 the first line found nothing, because the pattern was a substring and no path contains a literal &lt;code&gt;*&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Caveats
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Jar-in-jar is not opened.&lt;/strong&gt; Fabric bundles libraries as nested jars under &lt;code&gt;META-INF/jars/&lt;/code&gt;, and jdx doesn't look inside them (issue #176 is still open). &lt;code&gt;jdx resources META-INF/jars --jars mods --no-jdk&lt;/code&gt; at least shows which mod bundles which nested jar.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Subfolders aren't scanned.&lt;/strong&gt; &lt;code&gt;--jars mods&lt;/code&gt; reads jars directly inside the folder only (issue #177). Add another &lt;code&gt;--jars&lt;/code&gt; for each subfolder.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It lists files, it doesn't resolve load order.&lt;/strong&gt; If two mods ship the same &lt;code&gt;data/minecraft/...&lt;/code&gt; path, jdx shows both. Which one the game uses depends on the loader and datapack ordering, and jdx doesn't model that.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;--cat&lt;/code&gt; prints, it doesn't validate.&lt;/strong&gt; A broken JSON file is printed as stored.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No remapping.&lt;/strong&gt; For class queries (not resources), jdx answers in whatever names each jar stores. Game classes aren't in &lt;code&gt;mods/&lt;/code&gt;, so pass the Loom-mapped Minecraft jar with &lt;code&gt;--jars&lt;/code&gt;, and only &lt;code&gt;diff&lt;/code&gt; jars that use the same mapping namespace.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  From an agent
&lt;/h2&gt;

&lt;p&gt;The same query works over MCP as &lt;code&gt;jdx_resources&lt;/code&gt;. Run &lt;code&gt;jdx setup --agent claude-code&lt;/code&gt; once and ask "which mod in ./mods overrides the vanilla diamond sword recipe?"&lt;/p&gt;

&lt;p&gt;The modpack guide covers the other questions (which mod logs a message, ships a duplicate class, or mixes into a class): &lt;a href="https://mohammadmd1383.github.io/jdx/docs/minecraft-modpack/" rel="noopener noreferrer"&gt;https://mohammadmd1383.github.io/jdx/docs/minecraft-modpack/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>minecraft</category>
      <category>java</category>
      <category>modding</category>
      <category>cli</category>
    </item>
    <item>
      <title>Which mods hook into this? Find every implementor of a Fabric or Minecraft type across a mods folder</title>
      <dc:creator>Mohammad Mostafa Dastjerdi</dc:creator>
      <pubDate>Mon, 30 Nov 2026 00:28:28 +0000</pubDate>
      <link>https://dev.to/mohammadmd1383/which-mods-hook-into-this-find-every-implementor-of-a-fabric-or-minecraft-type-across-a-mods-folder-469h</link>
      <guid>https://dev.to/mohammadmd1383/which-mods-hook-into-this-find-every-implementor-of-a-fabric-or-minecraft-type-across-a-mods-folder-469h</guid>
      <description>&lt;p&gt;A modpack crashes, a log line names an interface, and the real question is: &lt;strong&gt;which of these 200 jars actually implements it?&lt;/strong&gt; In an IDE that is one click on "Find implementations". In a folder full of mod jars it usually means unzipping everything or loading the whole pack into a dev workspace.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;jdx&lt;/a&gt; is an open-source CLI and MCP server (Kotlin, Java 21+, Apache-2.0) that answers IDE questions about any JVM jar. It reads bytecode with ASM and never loads or runs the classes it inspects. This post is about one of those questions: &lt;strong&gt;who implements this type?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Every mod's entrypoint, in one command
&lt;/h2&gt;

&lt;p&gt;Fabric API's own types are not Minecraft classes, so they keep the same names in every mapping namespace. That makes them a good first query against a real &lt;code&gt;mods/&lt;/code&gt; folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx implementors net.fabricmc.api.ModInitializer --jars &lt;span class="s1"&gt;'mods/*.jar'&lt;/span&gt; --no-jdk
jdx implementors net.fabricmc.api.ClientModInitializer --jars &lt;span class="s1"&gt;'mods/*.jar'&lt;/span&gt; --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each line is a class plus the jar it came from, so you get a map of "which mod runs code at startup, and in which class" without opening a single jar. Quote the glob so the shell does not expand it; &lt;code&gt;--no-jdk&lt;/code&gt; keeps &lt;code&gt;java.*&lt;/code&gt; out of the answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Narrow it down
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;--in '*sodium*'&lt;/code&gt; keeps only subtypes from jars whose name matches the glob; &lt;code&gt;--exclude 'fabric-api*'&lt;/code&gt; drops the noise.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--direct&lt;/code&gt; shows only direct subtypes; &lt;code&gt;--depth N&lt;/code&gt; caps transitive levels.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--limit&lt;/code&gt; controls how many rows you see (default 50), with a footer telling you how many were cut.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The other direction: what does this class extend?
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;jdx hierarchy&lt;/code&gt; walks both ways: supertypes up (full chain, interfaces included) and subtypes down. Point it at a mod's block or entity class and you see exactly which vanilla or library types it builds on, and who else extends it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx hierarchy &lt;span class="s1"&gt;'&amp;lt;the mod class&amp;gt;'&lt;/span&gt; --jars &lt;span class="s2"&gt;"$MAPPED_JAR"&lt;/span&gt; --jars &lt;span class="s1"&gt;'mods/*.jar'&lt;/span&gt; --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you paste a short name that matches more than one class, jdx does not guess: it exits 2 and lists every candidate as a paste-ready ref. Add &lt;code&gt;--json&lt;/code&gt; if a script or an AI agent is reading the output.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest caveats
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;jdx does not remap.&lt;/strong&gt; It answers in the names stored in the file. Mods in a production &lt;code&gt;mods/&lt;/code&gt; folder are usually compiled against intermediary names, so querying a Minecraft type there means using that same namespace. For Yarn or Mojmap names, pass the jar Fabric Loom or NeoForge ModDevGradle already produced with &lt;code&gt;--jars&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lambdas are not classes.&lt;/strong&gt; A callback written as a lambda or method reference does not produce an implementing class in the jar, so it will not show up as an implementor.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Mixing namespaces gives nonsense.&lt;/strong&gt; Comparing or joining an intermediary jar with a Yarn jar will not line up. The same rule applies to &lt;code&gt;jdx diff&lt;/code&gt;: it only means something within one mapping namespace.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Minecraft guide: &lt;a href="https://mohammadmd1383.github.io/jdx/docs/minecraft-mods/" rel="noopener noreferrer"&gt;https://mohammadmd1383.github.io/jdx/docs/minecraft-mods/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;implementors&lt;/code&gt; reference: &lt;a href="https://mohammadmd1383.github.io/jdx/docs/reference/implementors/" rel="noopener noreferrer"&gt;https://mohammadmd1383.github.io/jdx/docs/reference/implementors/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Source: &lt;a href="https://github.com/MohammadMD1383/jdx" rel="noopener noreferrer"&gt;https://github.com/MohammadMD1383/jdx&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The same commands are available as MCP tools (&lt;code&gt;jdx mcp&lt;/code&gt;), so an AI coding agent can ask "who implements this?" across your mods folder too.&lt;/p&gt;

</description>
      <category>minecraft</category>
      <category>java</category>
      <category>modding</category>
      <category>cli</category>
    </item>
    <item>
      <title>Who calls this Minecraft method? Find callers and usages across your mod, Fabric API and the game jar</title>
      <dc:creator>Mohammad Mostafa Dastjerdi</dc:creator>
      <pubDate>Sat, 28 Nov 2026 16:25:07 +0000</pubDate>
      <link>https://dev.to/mohammadmd1383/who-calls-this-minecraft-method-find-callers-and-usages-across-your-mod-fabric-api-and-the-game-5f5j</link>
      <guid>https://dev.to/mohammadmd1383/who-calls-this-minecraft-method-find-callers-and-usages-across-your-mod-fabric-api-and-the-game-5f5j</guid>
      <description>&lt;p&gt;When I change a mixin or wrap a vanilla method, the first thing I want to know is: &lt;strong&gt;who else calls this?&lt;/strong&gt; Vanilla code, Fabric API, my own sources, maybe another mod I depend on. In an IDE that's "Find Usages". From a terminal, or from an AI coding agent, it usually turns into unzip + javap + grep.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/MohammadMD1383/jdx" rel="noopener noreferrer"&gt;jdx&lt;/a&gt; answers that question as a command. Here is the workflow I use, with the limits up front.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build a workspace over the jars you care about
&lt;/h2&gt;

&lt;p&gt;jdx reads Maven/Gradle dependency caches on its own, but &lt;strong&gt;the Loom-remapped Minecraft jar is not auto-discovered&lt;/strong&gt;, so pass it explicitly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx ws create mc \
  --jars &lt;span class="s2"&gt;"$HOME/.gradle/caches/fabric-loom/&amp;lt;minecraft-version&amp;gt;/minecraft-common.jar"&lt;/span&gt; \
  --src ./src/main/java
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Some Loom versions write &lt;code&gt;minecraft-client.jar&lt;/code&gt; instead. Use whichever remapped jar is actually in that folder. For NeoForge/Forge, point &lt;code&gt;--jars&lt;/code&gt; at that toolchain's remapped jar.) Add Fabric API or another mod's jar with more &lt;code&gt;--jars&lt;/code&gt; globs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Callers: who calls this method?
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx -w mc callers &lt;span class="s1"&gt;'net.minecraft.world.item.ItemStack#getMaxStackSize()'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;callers&lt;/code&gt; is &lt;strong&gt;override-aware by default&lt;/strong&gt;: a call through a supertype or an override counts too. Add &lt;code&gt;--exact&lt;/code&gt; when you only want calls that bind to exactly that declaration. Bytecode edges carry &lt;strong&gt;file:line&lt;/strong&gt; from the class's LineNumberTable, so you can jump straight to the spot.&lt;/p&gt;

&lt;p&gt;The other direction is &lt;code&gt;calls&lt;/code&gt;: what does this method call?&lt;/p&gt;

&lt;h2&gt;
  
  
  Usages: every reference to a type, with context
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx -w mc usages net.minecraft.world.item.ItemStack --context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--context&lt;/code&gt; prints a short inline snippet for each hit instead of a bare list. Every command also has &lt;code&gt;--json&lt;/code&gt; if you want to script it, and if a name is ambiguous jdx exits 2 and lists each candidate as a paste-ready ref instead of guessing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let your agent ask the same question
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;jdx mcp&lt;/code&gt; exposes the same engine as an MCP server (&lt;code&gt;jdx_callers&lt;/code&gt;, &lt;code&gt;jdx_usages&lt;/code&gt;, &lt;code&gt;jdx_calls&lt;/code&gt; …), and &lt;code&gt;jdx setup --agent claude-code --scope project&lt;/code&gt; (or cursor, codex, cline, …) wires it up. The agent gets a short, precise answer instead of a 60 KB javap dump in its context window.&lt;/p&gt;

&lt;h2&gt;
  
  
  Honest caveats
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;jdx does not remap.&lt;/strong&gt; Names come out in whatever namespace the jar already uses (Yarn, Mojmap, intermediary). Query with the names that jar uses.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Pass the Loom jar with &lt;code&gt;--jars&lt;/code&gt;&lt;/strong&gt;; only Maven-style dependencies are discovered automatically.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;callers&lt;/code&gt;/&lt;code&gt;usages&lt;/code&gt; see the classpath you give them, nothing more. They are ordinary bytecode navigation, not a Minecraft-aware feature, and they don't understand mixin injection targets.&lt;/li&gt;
&lt;li&gt;If you also diff two game versions, &lt;code&gt;jdx diff&lt;/code&gt; only makes sense &lt;strong&gt;within one mapping namespace&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;jdx parses bytecode with ASM and never loads or runs the classes, so inspecting a random mod jar doesn't execute it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Needs Java 21+, works on Linux, macOS and Windows, Apache-2.0. Docs and the Minecraft guide: &lt;a href="https://mohammadmd1383.github.io/jdx/docs/minecraft-mods/" rel="noopener noreferrer"&gt;https://mohammadmd1383.github.io/jdx/docs/minecraft-mods/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>minecraft</category>
      <category>java</category>
      <category>cli</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Classpath MCP without a workspace: let an AI agent read Java jars in jdx v1.8.0</title>
      <dc:creator>Mohammad Mostafa Dastjerdi</dc:creator>
      <pubDate>Thu, 26 Nov 2026 06:05:38 +0000</pubDate>
      <link>https://dev.to/mohammadmd1383/classpath-mcp-without-a-workspace-let-an-ai-agent-read-java-jars-in-jdx-v180-3bjb</link>
      <guid>https://dev.to/mohammadmd1383/classpath-mcp-without-a-workspace-let-an-ai-agent-read-java-jars-in-jdx-v180-3bjb</guid>
      <description>&lt;p&gt;When I first shipped the jdx MCP server, an AI coding agent could already ask IDE questions about a JVM jar — members, one method body, usages, implementors — but only after I had created a stored workspace. That is a good setup for a long-lived project. It is the wrong setup when you just want Claude Desktop or Cursor to look at one jar, a Maven coordinate already in your cache, or the Gradle project in the working directory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/MohammadMD1383/jdx/releases/tag/v1.8.0" rel="noopener noreferrer"&gt;jdx v1.8.0&lt;/a&gt; changes that. Classpath MCP tools now take optional &lt;code&gt;jars&lt;/code&gt;, &lt;code&gt;coord&lt;/code&gt;, and &lt;code&gt;discover&lt;/code&gt; arguments. If the call does not name a workspace and the server does not have one, those arguments are enough on their own.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;jdx&lt;/a&gt; is an open-source (Apache-2.0) command-line tool and MCP server I built for Java and Kotlin. It parses bytecode with ASM and never loads or executes the classes it inspects. It needs a Java 21+ runtime and runs on Linux, macOS, and Windows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Windows (PowerShell):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="n"&gt;irm&lt;/span&gt; &lt;span class="n"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;githubusercontent&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;com&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="nc"&gt;MohammadMD1383&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;jdx&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;main&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;install&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;release&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ps1&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;iex&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or download &lt;code&gt;jdx-1.8.0-windows.zip&lt;/code&gt; from the &lt;a href="https://github.com/MohammadMD1383/jdx/releases/tag/v1.8.0" rel="noopener noreferrer"&gt;release assets&lt;/a&gt; and run &lt;code&gt;install-release.ps1&lt;/code&gt;, or &lt;code&gt;sh install-release.sh --tarball jdx-1.8.0-windows.zip&lt;/code&gt;. After that, &lt;code&gt;jdx upgrade&lt;/code&gt; self-updates. Releases are unsigned, so expect a first-run warning: &lt;code&gt;Unblock-File&lt;/code&gt; on Windows, or &lt;code&gt;xattr -d com.apple.quarantine &amp;lt;install-dir&amp;gt;/jdx&lt;/code&gt; on macOS.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wire it into Claude Desktop, Cursor, or another MCP client
&lt;/h2&gt;

&lt;p&gt;Any MCP client, including Claude Desktop, can use this config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"jdx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"jdx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cursor, Claude Code, Codex CLI, GitHub Copilot CLI, OpenCode, and the other supported agents can be wired with one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx setup --agent cursor --scope project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Desktop clients that install an MCP Bundle can use &lt;code&gt;jdx-mcp-1.8.0.mcpb&lt;/code&gt; from the same release instead of a &lt;code&gt;PATH&lt;/code&gt; entry. The bundle launches &lt;code&gt;bin/jdx mcp&lt;/code&gt; over stdio, and &lt;code&gt;bin/jdx.bat mcp&lt;/code&gt; on Windows. A Java 21+ runtime must still be on &lt;code&gt;PATH&lt;/code&gt; or in &lt;code&gt;JAVA_HOME&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pass a jar, a Maven coordinate, or discover the project
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;jars&lt;/code&gt; and &lt;code&gt;coord&lt;/code&gt; accept a comma-separated string or a JSON array, the same shape as CLI &lt;code&gt;--jars&lt;/code&gt; and &lt;code&gt;--coord&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Point a tool call at jars you already have:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"jars"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"build/libs/app.jar,libs/dep.jar"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or as an array:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"jars"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"build/libs/app.jar"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"libs/dep.jar"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Ask from a Maven coordinate that is already in &lt;code&gt;~/.gradle/caches&lt;/code&gt; or &lt;code&gt;~/.m2&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"coord"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"com.google.code.gson:gson:2.14.0"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"coord"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"com.google.code.gson:gson:2.14.0"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;MCP does not download. An uncached coordinate is exit 5, and the message names a cold CLI &lt;code&gt;--fetch&lt;/code&gt;. Prime the cache once from the terminal, then the agent can keep using &lt;code&gt;coord&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For a Gradle or Maven checkout, turn project auto-discovery on for the session:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx mcp --discover
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"jdx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"jdx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"--discover"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Discovery walks up from the server's working directory and never runs Gradle or Maven. A per-call &lt;code&gt;discover&lt;/code&gt; argument overrides that session flag. Explicit jars and coordinate jars merge in front of workspace or discovered jars.&lt;/p&gt;

&lt;p&gt;A few rules keep this predictable:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If a call sets &lt;code&gt;workspace&lt;/code&gt;, that stored name must exist. A miss is exit 4 even when &lt;code&gt;jars&lt;/code&gt; or &lt;code&gt;discover&lt;/code&gt; are also set.&lt;/li&gt;
&lt;li&gt;When the call does not name a workspace and the server's workspace is missing, &lt;code&gt;jars&lt;/code&gt;, &lt;code&gt;coord&lt;/code&gt;, or discovery answer on their own.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;diff&lt;/code&gt;, &lt;code&gt;version&lt;/code&gt;, &lt;code&gt;doctor&lt;/code&gt;, and &lt;code&gt;health&lt;/code&gt; do not take these arguments. The unix daemon and HTTP API are unchanged.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Read-only by design
&lt;/h2&gt;

&lt;p&gt;The v1 daemon, HTTP, and MCP wire stays read-only (issue &lt;a href="https://github.com/MohammadMD1383/jdx/issues/19" rel="noopener noreferrer"&gt;#19&lt;/a&gt;). There is no workspace or cache tool on that wire. &lt;code&gt;jdx_doctor&lt;/code&gt; is refused with exit 6; MCP tells you to run &lt;code&gt;jdx doctor&lt;/code&gt; in a shell. &lt;code&gt;jdx doctor&lt;/code&gt; and &lt;code&gt;jdx batch&lt;/code&gt; still answer &lt;code&gt;doctor&lt;/code&gt; in-process.&lt;/p&gt;

&lt;p&gt;Every MCP tool is annotated &lt;code&gt;readOnlyHint: true&lt;/code&gt;, &lt;code&gt;destructiveHint: false&lt;/code&gt;, &lt;code&gt;idempotentHint: true&lt;/code&gt;, and &lt;code&gt;openWorldHint: false&lt;/code&gt;. No tool declares &lt;code&gt;fetch&lt;/code&gt;. Inspected classes are parsed with ASM and never loaded. That is the contract I want an agent to see: it can read a jar, and it cannot change your machine through this server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Minecraft mod jars
&lt;/h2&gt;

&lt;p&gt;If the jar is a Minecraft mod, the same &lt;code&gt;jars&lt;/code&gt; argument is how you pass the Loom-mapped jar that Fabric Loom or NeoForge ModDevGradle already wrote. jdx does not remap. A &lt;code&gt;diff&lt;/code&gt; is only meaningful when both sides already share one mapping namespace. The &lt;a href="https://mohammadmd1383.github.io/jdx/docs/minecraft-mods/" rel="noopener noreferrer"&gt;Minecraft mods guide&lt;/a&gt; and the new &lt;a href="https://mohammadmd1383.github.io/jdx/blog/reading-minecraft-mod-internals/" rel="noopener noreferrer"&gt;blog post&lt;/a&gt; cover those limits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx mcp --discover
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or, from the CLI, the same classpath shapes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx members com.google.gson.Gson --coord com.google.code.gson:gson:2.14.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The longer MCP walkthrough is &lt;a href="https://mohammadmd1383.github.io/jdx/docs/java-mcp-server/" rel="noopener noreferrer"&gt;An MCP server for Java and Kotlin bytecode&lt;/a&gt;. Release notes: &lt;a href="https://github.com/MohammadMD1383/jdx/releases/tag/v1.8.0" rel="noopener noreferrer"&gt;jdx v1.8.0&lt;/a&gt;. Source: &lt;a href="https://github.com/MohammadMD1383/jdx" rel="noopener noreferrer"&gt;github.com/MohammadMD1383/jdx&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>java</category>
      <category>kotlin</category>
      <category>mcp</category>
      <category>ai</category>
    </item>
    <item>
      <title>Read the Javadoc of any jar from the terminal (Maven deps, the JDK, and your AI agent)</title>
      <dc:creator>Mohammad Mostafa Dastjerdi</dc:creator>
      <pubDate>Wed, 25 Nov 2026 03:11:04 +0000</pubDate>
      <link>https://dev.to/mohammadmd1383/read-the-javadoc-of-any-jar-from-the-terminal-maven-deps-the-jdk-and-your-ai-agent-ek9</link>
      <guid>https://dev.to/mohammadmd1383/read-the-javadoc-of-any-jar-from-the-terminal-maven-deps-the-jdk-and-your-ai-agent-ek9</guid>
      <description>&lt;p&gt;You're in a terminal, or your AI coding agent is, and you need the Javadoc for one method in a dependency. The usual options: dig through an HTML javadoc tree, open an IDE just to hover, or unzip a &lt;code&gt;-sources.jar&lt;/code&gt; and grep for the comment.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;jdx&lt;/a&gt; is an open-source CLI (and MCP server) that answers IDE questions about JVM jars. One of those questions is "what does the Javadoc say?", and &lt;code&gt;jdx doc&lt;/code&gt; prints the answer as plain text, plus the file and line range it came from.&lt;/p&gt;

&lt;h2&gt;
  
  
  A class comment from a Maven coordinate
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx doc com.google.gson.Gson --coord com.google.code.gson:gson:2.14.0 --fetch
com.google.gson.Gson
  source: gson-2.14.0-sources.jar · com/google/gson/Gson.java:49-134
This is the main class &lt;span class="k"&gt;for&lt;/span&gt; using Gson. Gson is typically used by first constructing a Gson
instance and &lt;span class="k"&gt;then&lt;/span&gt; invoking &lt;span class="c"&gt;#toJson(Object) or Class) methods on&lt;/span&gt;
it. Gson instances are Thread-safe so you can reuse them freely across multiple threads.
…
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--fetch&lt;/code&gt; allows a download when the coordinate isn't already in &lt;code&gt;~/.gradle/caches&lt;/code&gt; or &lt;code&gt;~/.m2&lt;/code&gt;, and it also pulls the &lt;code&gt;-sources.jar&lt;/code&gt; when the repository publishes one. Without the flag, nothing is downloaded. Long comments are capped by &lt;code&gt;--max-lines&lt;/code&gt; (default 200).&lt;/p&gt;

&lt;h2&gt;
  
  
  One method, without guessing which overload
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;Gson#toJson&lt;/code&gt; has 8 overloads. jdx won't pick one for you: it exits 2 and prints every candidate as a reference you can paste.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx doc &lt;span class="s1"&gt;'com.google.gson.Gson#toJson'&lt;/span&gt; --coord com.google.code.gson:gson:2.14.0 --fetch
ambiguous: 8 candidates &lt;span class="k"&gt;for&lt;/span&gt; com.google.gson.Gson#toJson
  com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;com.google.gson.JsonElement&lt;span class="o"&gt;)&lt;/span&gt;
  com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;java.lang.Object&lt;span class="o"&gt;)&lt;/span&gt;
  …
hint: re-run with one of the refs above
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx doc &lt;span class="s1"&gt;'com.google.gson.Gson#toJson(Object)'&lt;/span&gt; --coord com.google.code.gson:gson:2.14.0 --fetch
com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;java.lang.Object&lt;span class="o"&gt;)&lt;/span&gt;
  source: gson-2.14.0-sources.jar · com/google/gson/Gson.java:527-541
This method serializes the specified object into its equivalent JSON representation. …
@param src the object &lt;span class="k"&gt;for&lt;/span&gt; which JSON representation is to be created
@return JSON representation of src.
@see &lt;span class="c"&gt;#toJson(Object, Appendable)&lt;/span&gt;
@see &lt;span class="c"&gt;#toJson(Object, Type)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Block tags like &lt;code&gt;@param&lt;/code&gt; and &lt;code&gt;@return&lt;/code&gt; stay; known HTML tags are stripped. Quote references in your shell, since &lt;code&gt;#&lt;/code&gt;, &lt;code&gt;(&lt;/code&gt; and &lt;code&gt;$&lt;/code&gt; are shell syntax.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inherited comments and the JDK
&lt;/h2&gt;

&lt;p&gt;A method with no comment of its own falls back to the nearest documenting supertype, and the &lt;code&gt;source:&lt;/code&gt; line says so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx doc &lt;span class="s1"&gt;'java.util.Collections$UnmodifiableMap#get(Object)'&lt;/span&gt;
java.util.Collections&lt;span class="nv"&gt;$UnmodifiableMap&lt;/span&gt;#get&lt;span class="o"&gt;(&lt;/span&gt;java.lang.Object&lt;span class="o"&gt;)&lt;/span&gt;
  source: src.zip · java.base/java/util/Map.java:217-240 &lt;span class="o"&gt;(&lt;/span&gt;inherited from java.util.Map&lt;span class="o"&gt;)&lt;/span&gt;
Returns the value to which the specified key is mapped,
or null &lt;span class="k"&gt;if&lt;/span&gt; this map contains no mapping &lt;span class="k"&gt;for&lt;/span&gt; the key.
…
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The running JDK is on the classpath by default, read from its &lt;code&gt;lib/src.zip&lt;/code&gt;. &lt;code&gt;--no-inherited&lt;/code&gt; keeps only the comment written on that exact symbol, and &lt;code&gt;--raw&lt;/code&gt; prints the comment verbatim.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pair it with members and body
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;jdx members --with-doc&lt;/code&gt; adds the first sentence of each member's Javadoc to the listing, and &lt;code&gt;jdx body --with-doc&lt;/code&gt; puts the comment beside the method body. That's usually all an agent needs to call an unfamiliar API correctly, in two small answers instead of a page of HTML.&lt;/p&gt;

&lt;h2&gt;
  
  
  For AI agents
&lt;/h2&gt;

&lt;p&gt;The same command is the &lt;code&gt;jdx_doc&lt;/code&gt; tool in &lt;code&gt;jdx mcp&lt;/code&gt;. &lt;code&gt;jdx setup --agent claude-code --scope project&lt;/code&gt; (or cursor, codex, copilot, cline and others) wires it up. Every command also takes &lt;code&gt;--json&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;jdx needs Java 21+, runs on Linux, macOS and Windows, and is Apache-2.0. Install with one line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Full guide with every example (each one runs when the docs are built): &lt;a href="https://mohammadmd1383.github.io/jdx/docs/read-javadoc-from-jar/" rel="noopener noreferrer"&gt;Read Javadoc from a jar in the terminal&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>java</category>
      <category>cli</category>
      <category>mcp</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Which JAR contains this class? Finding classes across libs/, mods/ and Maven deps from the terminal</title>
      <dc:creator>Mohammad Mostafa Dastjerdi</dc:creator>
      <pubDate>Sun, 22 Nov 2026 21:13:28 +0000</pubDate>
      <link>https://dev.to/mohammadmd1383/which-jar-contains-this-class-finding-classes-across-libs-mods-and-maven-deps-from-the-terminal-29in</link>
      <guid>https://dev.to/mohammadmd1383/which-jar-contains-this-class-finding-classes-across-libs-mods-and-maven-deps-from-the-terminal-29in</guid>
      <description>&lt;p&gt;You get a &lt;code&gt;NoClassDefFoundError&lt;/code&gt;, a duplicate-class warning, or a crash log that names &lt;code&gt;com.something.FooHandler&lt;/code&gt; and you need one answer: &lt;strong&gt;which jar ships that class?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The classic answer is a loop:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="k"&gt;for&lt;/span&gt; j &lt;span class="k"&gt;in&lt;/span&gt; libs/*.jar&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; unzip -l &lt;span class="s2"&gt;"$j"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; grep -q &lt;span class="s1"&gt;'FooHandler'&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"$j"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="k"&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It works, but it greps zip entry paths, not class names, it misses nested classes unless you remember the &lt;code&gt;$&lt;/code&gt;, and it gets slow once you point it at a full modpack or a Gradle cache.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;jdx&lt;/a&gt; is a small command-line tool (and MCP server) that reads class names from bytecode and prints the jar on the same line. Here is the whole workflow; the full guide with real output is at &lt;strong&gt;&lt;a href="https://mohammadmd1383.github.io/jdx/docs/find-class-in-jar/" rel="noopener noreferrer"&gt;Find which JAR contains a class&lt;/a&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  One exact name: &lt;code&gt;jdx resolve&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resolve FooHandler --jars &lt;span class="s1"&gt;'libs/*.jar'&lt;/span&gt; --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;resolve&lt;/code&gt; accepts a simple name, a dotted or binary name, a &lt;code&gt;Type#member&lt;/code&gt;, or a package. Each row is kind, canonical name, and the artifact's file name. If the same simple name lives in two jars you get two rows, which is exactly what you want when you are hunting a duplicate class. A miss exits 1 and prints did-you-mean suggestions; several candidates exit 0 and list every one.&lt;/p&gt;

&lt;p&gt;Real run against Gson from Maven Central:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx resolve JsonParser --coord com.google.code.gson:gson:2.14.0 --fetch --no-jdk
search results &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="s1"&gt;'JsonParser'&lt;/span&gt;
  class com.google.gson.JsonParser  gson-2.14.0.jar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two details that save time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Quote the glob.&lt;/strong&gt; &lt;code&gt;--jars 'libs/*.jar'&lt;/code&gt; lets jdx expand it; an unquoted shell expansion is rejected (exit 3) instead of silently doing the wrong thing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;code&gt;--no-jdk&lt;/code&gt;&lt;/strong&gt; keeps JDK classes out of the answer. Leave it off and you can ask the JDK too: &lt;code&gt;jdx resolve HashMap&lt;/code&gt; answers &lt;code&gt;java.base&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A partial name: &lt;code&gt;jdx search&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;When you only remember part of the name:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx search &lt;span class="s1"&gt;'*Http*Client'&lt;/span&gt; --kind class --jars &lt;span class="s1"&gt;'libs/*.jar'&lt;/span&gt; --no-jdk
jdx search HMap --kind class            &lt;span class="c"&gt;# camel humps find HashMap&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Globs, case-insensitive substrings, camel humps, &lt;code&gt;--regex&lt;/code&gt;, and &lt;code&gt;--fuzzy&lt;/code&gt; (retries a miss within two edits). &lt;code&gt;--in 'app*.jar'&lt;/code&gt; narrows to artifacts whose file name matches.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is inside a jar: &lt;code&gt;jdx tree&lt;/code&gt; and &lt;code&gt;jdx ls&lt;/code&gt;
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx tree &lt;span class="s1"&gt;'gson*'&lt;/span&gt; --depth 2 --counts --coord com.google.code.gson:gson:2.14.0 --fetch --no-jdk
package tree &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="s1"&gt;'gson*'&lt;/span&gt;
gson-2.14.0.jar
  com &lt;span class="o"&gt;(&lt;/span&gt;221 types&lt;span class="o"&gt;)&lt;/span&gt;
    com.google &lt;span class="o"&gt;(&lt;/span&gt;221 types&lt;span class="o"&gt;)&lt;/span&gt;
      com.google.gson &lt;span class="o"&gt;(&lt;/span&gt;221 types&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;jdx ls com.google.gson.stream ...&lt;/code&gt; then lists every type in that package, one per line, with its jar.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Minecraft case: which mod ships this class?
&lt;/h2&gt;

&lt;p&gt;This is where I use it most. A crash report names a class and you have 150 jars in &lt;code&gt;mods/&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resolve SomeMixinTarget --jars &lt;span class="s1"&gt;'mods/*.jar'&lt;/span&gt; --no-jdk
jdx search &lt;span class="s1"&gt;'*Compat*'&lt;/span&gt; --kind class --jars &lt;span class="s1"&gt;'mods/*.jar'&lt;/span&gt; --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You get the mod jar's file name next to each hit, so "which mod adds this class" or "which two mods both bundle this library" is one command. Honest caveats: jdx does &lt;strong&gt;not&lt;/strong&gt; remap. A mod's own classes keep their names, but Minecraft classes appear in whatever namespace the jar was built with. For readable Minecraft names in a dev environment, pass the mapped jar Loom already produced with &lt;code&gt;--jars&lt;/code&gt;. The &lt;a href="https://mohammadmd1383.github.io/jdx/docs/minecraft-mods/" rel="noopener noreferrer"&gt;Minecraft mods guide&lt;/a&gt; covers that setup.&lt;/p&gt;

&lt;h2&gt;
  
  
  Maven coordinates without a project
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;--coord group:artifact:version&lt;/code&gt; resolves from &lt;code&gt;~/.gradle/caches&lt;/code&gt; and &lt;code&gt;~/.m2&lt;/code&gt; first; add &lt;code&gt;--fetch&lt;/code&gt; to allow a checksum-verified download. Inside a Gradle or Maven project, jdx discovers dependency jars from the caches without running the build.&lt;/p&gt;

&lt;h2&gt;
  
  
  Next step
&lt;/h2&gt;

&lt;p&gt;Once you know the class and its jar, &lt;code&gt;jdx members&lt;/code&gt; and &lt;code&gt;jdx body&lt;/code&gt; show its API and one method's code (decompiled with Vineflower and labelled when there is no sources jar). That is covered in &lt;a href="https://mohammadmd1383.github.io/jdx/docs/read-jar-from-terminal/" rel="noopener noreferrer"&gt;Read and decompile a JAR from the terminal&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Every command takes &lt;code&gt;--json&lt;/code&gt;, and the same lookups are exposed as MCP tools (&lt;code&gt;jdx mcp&lt;/code&gt;), so an AI coding agent can ask "which jar has this class" instead of guessing.&lt;/p&gt;

&lt;p&gt;jdx is Apache-2.0, needs Java 21+, and runs on Linux, macOS and Windows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Docs: &lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;https://mohammadmd1383.github.io/jdx/&lt;/a&gt; · Source: &lt;a href="https://github.com/MohammadMD1383/jdx" rel="noopener noreferrer"&gt;https://github.com/MohammadMD1383/jdx&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>minecraft</category>
      <category>cli</category>
      <category>kotlin</category>
    </item>
    <item>
      <title>A javap alternative for AI agents: an MCP server that reads Java bytecode</title>
      <dc:creator>Mohammad Mostafa Dastjerdi</dc:creator>
      <pubDate>Sat, 21 Nov 2026 21:13:00 +0000</pubDate>
      <link>https://dev.to/mohammadmd1383/a-javap-alternative-for-ai-agents-an-mcp-server-that-reads-java-bytecode-3322</link>
      <guid>https://dev.to/mohammadmd1383/a-javap-alternative-for-ai-agents-an-mcp-server-that-reads-java-bytecode-3322</guid>
      <description>&lt;p&gt;When an AI coding agent needs to know what a dependency jar actually contains, it usually reaches for the tools a human would: &lt;code&gt;unzip -l&lt;/code&gt;, &lt;code&gt;javap&lt;/code&gt;, &lt;code&gt;grep&lt;/code&gt;, &lt;code&gt;sed&lt;/code&gt;. That works, but it is expensive. &lt;code&gt;javap -c&lt;/code&gt; dumps the whole class, the agent pages through it with &lt;code&gt;head&lt;/code&gt;, and a lot of tokens go to output it never needed.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;jdx&lt;/a&gt; is an open-source (Apache-2.0) command line tool and &lt;strong&gt;MCP server&lt;/strong&gt; that answers IDE-style questions about any JVM jar, &lt;code&gt;-sources.jar&lt;/code&gt;, class directory, Maven coordinate or the JDK itself, and returns only the part you asked for.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cost of the javap route
&lt;/h2&gt;

&lt;p&gt;The jdx README has a reproducible benchmark (&lt;code&gt;sh docs/bench-compare.sh&lt;/code&gt;) for one task: &lt;em&gt;list Gson's API, then show only &lt;code&gt;toJson(Object)&lt;/code&gt;&lt;/em&gt; on gson-2.14.0.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Calls&lt;/th&gt;
&lt;th&gt;Output&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;unzip + javap + grep + sed&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;~17.5 KB (~4.4k tokens), and &lt;code&gt;head -200&lt;/code&gt; misses the method (it is at line 542 of 1265)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;jdx members&lt;/code&gt; + &lt;code&gt;jdx body&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;~4.6 KB (~1.2k tokens)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The method body alone is 267 bytes from jdx, versus 60,590 bytes for &lt;code&gt;javap -c&lt;/code&gt; on the class (226x) or 58,251 bytes for the full &lt;code&gt;Gson.java&lt;/code&gt; (218x).&lt;/p&gt;

&lt;h2&gt;
  
  
  What a targeted answer looks like
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx body &lt;span class="s1"&gt;'com.google.gson.Gson#toJson(Object)'&lt;/span&gt; --coord com.google.code.gson:gson:2.14.0
com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;java.lang.Object&lt;span class="o"&gt;)&lt;/span&gt;
  source: gson-2.14.0-sources.jar · com/google/gson/Gson.java:542-547
  public String toJson&lt;span class="o"&gt;(&lt;/span&gt;Object src&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;src &lt;span class="o"&gt;==&lt;/span&gt; null&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="nb"&gt;return&lt;/span&gt; toJson&lt;span class="o"&gt;(&lt;/span&gt;JsonNull.INSTANCE&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="nb"&gt;return&lt;/span&gt; toJson&lt;span class="o"&gt;(&lt;/span&gt;src, src.getClass&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
next: jdx show com.google.gson.Gson
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every answer says where it came from (&lt;code&gt;source:&lt;/code&gt; line). When there is no sources jar, jdx decompiles with Vineflower and labels the output &lt;code&gt;⚠ reconstructed&lt;/code&gt;; &lt;code&gt;--engine javap&lt;/code&gt; still gives you raw bytecode when you want it.&lt;/p&gt;

&lt;p&gt;It also refuses to guess. Ask for &lt;code&gt;Gson#toJson&lt;/code&gt; without a signature and it exits with code 2 and lists all 8 overloads as paste-ready references, so an agent can pick the right one instead of reading the wrong method.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using it as an MCP server
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;jdx mcp&lt;/code&gt; exposes 27 typed tools (v1.7.0): &lt;code&gt;jdx_members&lt;/code&gt;, &lt;code&gt;jdx_body&lt;/code&gt;, &lt;code&gt;jdx_source&lt;/code&gt;, &lt;code&gt;jdx_signature&lt;/code&gt;, &lt;code&gt;jdx_usages&lt;/code&gt;, &lt;code&gt;jdx_callers&lt;/code&gt;, &lt;code&gt;jdx_implementors&lt;/code&gt;, &lt;code&gt;jdx_hierarchy&lt;/code&gt;, &lt;code&gt;jdx_diff&lt;/code&gt;, &lt;code&gt;jdx_literals&lt;/code&gt;, &lt;code&gt;jdx_resources&lt;/code&gt; and more. Generic config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"jdx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"jdx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or wire it into your agent in one command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx setup --agent claude-code --scope project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Supported agents: Claude Code, Cursor, Codex CLI, GitHub Copilot CLI, OpenCode, Kilo Code, Cline (&lt;code&gt;--scope system&lt;/code&gt;), Antigravity, Windsurf and Aider. Per-agent guides: &lt;a href="https://mohammadmd1383.github.io/jdx/integrations/" rel="noopener noreferrer"&gt;integrations&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Through the daemon/MCP server answers are warm (about 20 ms, per the docs), versus roughly 250 ms for a cold one-shot CLI call.&lt;/p&gt;

&lt;h2&gt;
  
  
  Safe to point at unknown jars
&lt;/h2&gt;

&lt;p&gt;jdx parses bytecode with ASM and never loads or executes the classes it inspects. It only touches the network when you pass &lt;code&gt;--fetch&lt;/code&gt; (or run &lt;code&gt;jdx upgrade&lt;/code&gt; / &lt;code&gt;jdx kotlin install&lt;/code&gt;). Inside a Gradle or Maven project it finds sources and dependency jars from the local caches without running the build.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kotlin and Minecraft mods too
&lt;/h2&gt;

&lt;p&gt;For Kotlin jars it reads &lt;code&gt;@Metadata&lt;/code&gt; and shows true signatures (suspend, properties, default arguments, nullability). Minecraft modders can inspect mod jars from the terminal; jdx does not remap, so pass the Loom-remapped jar with &lt;code&gt;--jars&lt;/code&gt;. There is a guide: &lt;a href="https://mohammadmd1383.github.io/jdx/docs/minecraft-mods/" rel="noopener noreferrer"&gt;Inspect Minecraft mod jars from the terminal&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
jdx members java.util.HashMap --limit 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Needs a Java 21+ runtime; works on Linux, macOS and Windows. Docs and quickstart: &lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;https://mohammadmd1383.github.io/jdx/&lt;/a&gt; · Source: &lt;a href="https://github.com/MohammadMD1383/jdx" rel="noopener noreferrer"&gt;https://github.com/MohammadMD1383/jdx&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>mcp</category>
      <category>ai</category>
      <category>kotlin</category>
    </item>
    <item>
      <title>Inspect a Minecraft mod jar from the terminal with jdx</title>
      <dc:creator>Mohammad Mostafa Dastjerdi</dc:creator>
      <pubDate>Fri, 20 Nov 2026 08:38:33 +0000</pubDate>
      <link>https://dev.to/mohammadmd1383/inspect-a-minecraft-mod-jar-from-the-terminal-with-jdx-2epk</link>
      <guid>https://dev.to/mohammadmd1383/inspect-a-minecraft-mod-jar-from-the-terminal-with-jdx-2epk</guid>
      <description>&lt;p&gt;I built &lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;jdx&lt;/a&gt; mainly because I was writing Minecraft mods and wanted IDE answers about a jar I did not author — metadata, mixin configs, a class body — without unzipping it or running it.&lt;/p&gt;

&lt;p&gt;This is a short walkthrough for a Fabric, Quilt, Forge or NeoForge &lt;em&gt;mod&lt;/em&gt; jar you already have on disk. It is not a remapper, and it is a different tutorial from my earlier one about giving an AI agent an IDE for ordinary Java libraries.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;jdx v1.7.0 and a Java 21+ runtime (Linux, macOS or Windows). Install:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
jdx version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;On Windows, use the PowerShell installer in the &lt;a href="https://mohammadmd1383.github.io/jdx/docs/installation/" rel="noopener noreferrer"&gt;installation guide&lt;/a&gt;. Releases are unsigned, so Gatekeeper or SmartScreen may warn on first run.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A mod jar, for example &lt;code&gt;./mods/YourMod.jar&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1. List the non-class files
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;jdx resources&lt;/code&gt; lists resource paths (anything that is not a &lt;code&gt;.class&lt;/code&gt;). Pass the jar with &lt;code&gt;--jars&lt;/code&gt;. &lt;code&gt;--no-jdk&lt;/code&gt; keeps the running JDK off the classpath so you only see that jar:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resources --jars ./mods/YourMod.jar --no-jdk
jdx resources fabric.mod.json --jars ./mods/YourMod.jar --no-jdk
jdx resources mixin --jars ./mods/YourMod.jar --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same command works for &lt;code&gt;quilt.mod.json&lt;/code&gt;, &lt;code&gt;mods.toml&lt;/code&gt; or &lt;code&gt;neoforge.mods.toml&lt;/code&gt; — those are just path substrings. Mixin JSON is listed as an ordinary resource; jdx does not parse mixin configs.&lt;/p&gt;

&lt;p&gt;To print the text of one unique path, use &lt;code&gt;--cat&lt;/code&gt;. If more than one path matches, jdx exits 2 and lists the candidates instead of guessing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx resources --cat fabric.mod.json --jars ./mods/YourMod.jar --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Binary resources are not dumped as bytes; you get a size instead. Details: &lt;a href="https://mohammadmd1383.github.io/jdx/docs/reference/resources/" rel="noopener noreferrer"&gt;jdx resources&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Find a class, then read one method
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx search &lt;span class="s1"&gt;'com.example.*'&lt;/span&gt; --jars ./mods/YourMod.jar --no-jdk
jdx outline com.example.YourMod --jars ./mods/YourMod.jar --no-jdk
jdx body &lt;span class="s1"&gt;'com.example.YourMod#onInitialize()'&lt;/span&gt; --jars ./mods/YourMod.jar --no-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Replace the package and member with whatever &lt;code&gt;search&lt;/code&gt; and &lt;code&gt;outline&lt;/code&gt; actually printed for that jar. If there is no sources jar, &lt;code&gt;body&lt;/code&gt; decompiles with Vineflower and labels the result &lt;code&gt;⚠ reconstructed&lt;/code&gt;, so you know it is not original source. The &lt;a href="https://mohammadmd1383.github.io/jdx/docs/reading-code/" rel="noopener noreferrer"&gt;reading code&lt;/a&gt; guide covers &lt;code&gt;show&lt;/code&gt;, &lt;code&gt;members&lt;/code&gt;, &lt;code&gt;outline&lt;/code&gt; and &lt;code&gt;body&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;jdx parses bytecode with ASM. It never loads or executes the classes it inspects, which is the point when the jar is someone else's mod.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. If you also want Minecraft names, pass the remapped game jar
&lt;/h2&gt;

&lt;p&gt;jdx does &lt;strong&gt;not&lt;/strong&gt; remap. Names come out in whatever namespace the jar already uses. An obfuscated or Intermediary-only jar will answer in those names.&lt;/p&gt;

&lt;p&gt;If you want Mojmap or Yarn names for the game API, pass the remapped jar your toolchain already produced, for example Loom's &lt;code&gt;minecraft-common.jar&lt;/code&gt;, with &lt;code&gt;--jars&lt;/code&gt;. Auto-discovery can find Maven-style dependency jars from the Gradle or Maven caches; it will not find that remapped game jar for you.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx members net.minecraft.world.item.ItemStack \
  --jars &lt;span class="s2"&gt;"$HOME/.gradle/caches/fabric-loom/&amp;lt;ver&amp;gt;/minecraft-common.jar"&lt;/span&gt; \
  --jars ./mods/YourMod.jar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Classpath options are in the &lt;a href="https://mohammadmd1383.github.io/jdx/docs/classpath/" rel="noopener noreferrer"&gt;classpath guide&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  That's it
&lt;/h2&gt;

&lt;p&gt;v1.7.0, Apache-2.0, Java 21+. Docs: &lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;https://mohammadmd1383.github.io/jdx/&lt;/a&gt; · source: &lt;a href="https://github.com/MohammadMD1383/jdx" rel="noopener noreferrer"&gt;https://github.com/MohammadMD1383/jdx&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>minecraft</category>
      <category>kotlin</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Give your AI coding agent an IDE for Java and Kotlin jars (with jdx)</title>
      <dc:creator>Mohammad Mostafa Dastjerdi</dc:creator>
      <pubDate>Sun, 15 Nov 2026 16:44:17 +0000</pubDate>
      <link>https://dev.to/mohammadmd1383/give-your-ai-coding-agent-an-ide-for-java-and-kotlin-jars-with-jdx-39h</link>
      <guid>https://dev.to/mohammadmd1383/give-your-ai-coding-agent-an-ide-for-java-and-kotlin-jars-with-jdx-39h</guid>
      <description>&lt;p&gt;AI coding agents are good at writing JVM code. Reading it is another story.&lt;/p&gt;

&lt;p&gt;Ask an agent what a method in one of your dependencies does and watch the transcript: it unzips the jar, runs &lt;code&gt;javap&lt;/code&gt;, greps the output, and then reads an entire source file into its context window. &lt;code&gt;javap&lt;/code&gt; gives it erased signatures and raw opcodes, so it fills the gaps by guessing.&lt;/p&gt;

&lt;p&gt;In this tutorial we'll give the agent the answers an IDE gives a human, using &lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;jdx&lt;/a&gt;, an open-source CLI and MCP server I built for exactly this. Every output below comes from the &lt;a href="https://mohammadmd1383.github.io/jdx/docs/quickstart/" rel="noopener noreferrer"&gt;jdx quickstart&lt;/a&gt;, which is generated by actually running the commands.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A Java 21+ runtime (Linux, macOS or Windows)&lt;/li&gt;
&lt;li&gt;An MCP-capable agent if you want the integration step (Claude Code, Cursor, Codex CLI, GitHub Copilot CLI, OpenCode, Cline, Kilo Code, Antigravity, or anything else that speaks MCP)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  1. Install
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -fsSL https://raw.githubusercontent.com/MohammadMD1383/jdx/main/install-release.sh &lt;span class="o"&gt;|&lt;/span&gt; bash
jdx version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It installs per user (no root) into &lt;code&gt;~/.local/share/jdx&lt;/code&gt; and links &lt;code&gt;~/.local/bin/jdx&lt;/code&gt;. On Windows, use the PowerShell installer from the &lt;a href="https://mohammadmd1383.github.io/jdx/docs/installation/" rel="noopener noreferrer"&gt;installation guide&lt;/a&gt;. &lt;code&gt;jdx doctor&lt;/code&gt; checks your environment if anything looks off.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Releases are unsigned, so macOS Gatekeeper and Windows SmartScreen will warn on first run. The installation guide shows how to clear it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  2. Ask the JDK something, with zero setup
&lt;/h2&gt;

&lt;p&gt;The running JDK is always on the classpath:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx members java.util.HashMap --limit 5
members of java.util.HashMap
constructors declared on java.util.HashMap:
  constructor public HashMap&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;
  constructor public HashMap&lt;span class="o"&gt;(&lt;/span&gt;int initialCapacity&lt;span class="o"&gt;)&lt;/span&gt;
  constructor public HashMap&lt;span class="o"&gt;(&lt;/span&gt;int initialCapacity, float loadFactor&lt;span class="o"&gt;)&lt;/span&gt;
  constructor public HashMap&lt;span class="o"&gt;(&lt;/span&gt;java.util.Map&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;? extends K, ? extends V&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; m&lt;span class="o"&gt;)&lt;/span&gt;
methods declared on java.util.HashMap:
  method public V compute&lt;span class="o"&gt;(&lt;/span&gt;K key, java.util.function.BiFunction&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;? super K, ? super V, ? extends V&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; remappingFunction&lt;span class="o"&gt;)&lt;/span&gt;
+ 7 from java.lang.Object &lt;span class="o"&gt;(&lt;/span&gt;--from java.lang.Object to expand&lt;span class="o"&gt;)&lt;/span&gt;
5 of 53 members shown &lt;span class="o"&gt;(&lt;/span&gt;--limit 53 to see more&lt;span class="o"&gt;)&lt;/span&gt;
source: java.base &lt;span class="o"&gt;(&lt;/span&gt;jrt&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two things matter here for an agent. The output is &lt;strong&gt;bounded&lt;/strong&gt;, and the footer says exactly what was cut and how to get the rest. And the &lt;code&gt;source:&lt;/code&gt; line says where the answer came from.&lt;/p&gt;

&lt;p&gt;Now read one method, and only that method:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx body &lt;span class="s1"&gt;'java.util.HashMap#get(java.lang.Object)'&lt;/span&gt;
java.util.HashMap#get&lt;span class="o"&gt;(&lt;/span&gt;java.lang.Object&lt;span class="o"&gt;)&lt;/span&gt;
  source: src.zip · java.base/java/util/HashMap.java:562-565
    public V get&lt;span class="o"&gt;(&lt;/span&gt;Object key&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        Node&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;K,V&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; e&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="nb"&gt;return&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;e &lt;span class="o"&gt;=&lt;/span&gt; getNode&lt;span class="o"&gt;(&lt;/span&gt;key&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; null ? null : e.value&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
next: jdx show java.util.HashMap
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Quote references in your shell: &lt;code&gt;#&lt;/code&gt;, &lt;code&gt;(&lt;/code&gt; and &lt;code&gt;$&lt;/code&gt; are shell syntax.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Ask about a library by its Maven coordinate
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;--coord&lt;/code&gt; resolves a library from your local Gradle and Maven caches. &lt;code&gt;--fetch&lt;/code&gt; allows downloading it (and its &lt;code&gt;-sources.jar&lt;/code&gt;) from Maven Central once:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx body &lt;span class="s1"&gt;'com.google.gson.Gson#toJson(Object)'&lt;/span&gt; --coord com.google.code.gson:gson:2.14.0
com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;java.lang.Object&lt;span class="o"&gt;)&lt;/span&gt;
  source: gson-2.14.0-sources.jar · com/google/gson/Gson.java:542-547
  public String toJson&lt;span class="o"&gt;(&lt;/span&gt;Object src&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;src &lt;span class="o"&gt;==&lt;/span&gt; null&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="nb"&gt;return&lt;/span&gt; toJson&lt;span class="o"&gt;(&lt;/span&gt;JsonNull.INSTANCE&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="nb"&gt;return&lt;/span&gt; toJson&lt;span class="o"&gt;(&lt;/span&gt;src, src.getClass&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
  &lt;span class="o"&gt;}&lt;/span&gt;
next: jdx show com.google.gson.Gson
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Gson is a multi-release jar, so on JDK 21 jdx also prints a &lt;code&gt;warning MULTI_RELEASE_VARIANT&lt;/code&gt; line; I've trimmed it from the outputs in this article.)&lt;/p&gt;

&lt;p&gt;If there is no sources jar, jdx decompiles the method with Vineflower and marks the output &lt;code&gt;⚠ reconstructed&lt;/code&gt;, so the agent knows it's reading a reconstruction. (&lt;code&gt;--engine javap&lt;/code&gt; gives raw bytecode instead.)&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Let it refuse to guess
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;toJson&lt;/code&gt; has eight overloads. jdx won't pick one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx body &lt;span class="s1"&gt;'com.google.gson.Gson#toJson'&lt;/span&gt; --coord com.google.code.gson:gson:2.14.0
ambiguous: 8 candidates &lt;span class="k"&gt;for&lt;/span&gt; com.google.gson.Gson#toJson
  com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;com.google.gson.JsonElement&lt;span class="o"&gt;)&lt;/span&gt;
  com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;com.google.gson.JsonElement, com.google.gson.stream.JsonWriter&lt;span class="o"&gt;)&lt;/span&gt;
  com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;com.google.gson.JsonElement, java.lang.Appendable&lt;span class="o"&gt;)&lt;/span&gt;
  com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;java.lang.Object&lt;span class="o"&gt;)&lt;/span&gt;
  com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;java.lang.Object, java.lang.Appendable&lt;span class="o"&gt;)&lt;/span&gt;
  com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;java.lang.Object, java.lang.reflect.Type&lt;span class="o"&gt;)&lt;/span&gt;
  com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;java.lang.Object, java.lang.reflect.Type, com.google.gson.stream.JsonWriter&lt;span class="o"&gt;)&lt;/span&gt;
  com.google.gson.Gson#toJson&lt;span class="o"&gt;(&lt;/span&gt;java.lang.Object, java.lang.reflect.Type, java.lang.Appendable&lt;span class="o"&gt;)&lt;/span&gt;
hint: re-run with one of the refs above
&lt;span class="o"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;exit&lt;/span&gt; 2&lt;span class="o"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Exit code 2 means "ambiguous", and every candidate is a paste-ready reference. An agent can branch on the exit code without parsing prose, and the next call is a copy-paste, not a reconstruction. Other outcomes (not found, no index, bad usage) have their own exit codes, and every command has &lt;code&gt;--json&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Navigate: hierarchy and callers
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx hierarchy com.google.gson.JsonElement --coord com.google.code.gson:gson:2.14.0
hierarchy of &lt;span class="s1"&gt;'com.google.gson.JsonElement'&lt;/span&gt;
  supertypes
    extends java.lang.Object  java.base
  subtypes &lt;span class="k"&gt;in&lt;/span&gt; workspace &lt;span class="o"&gt;(&lt;/span&gt;4&lt;span class="o"&gt;)&lt;/span&gt;
    class com.google.gson.JsonArray  gson-2.14.0.jar
    class com.google.gson.JsonNull  gson-2.14.0.jar
    class com.google.gson.JsonObject  gson-2.14.0.jar
    class com.google.gson.JsonPrimitive  gson-2.14.0.jar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx callers &lt;span class="s1"&gt;'com.google.gson.JsonParser#parseReader(com.google.gson.stream.JsonReader)'&lt;/span&gt; --coord com.google.code.gson:gson:2.14.0
callers of &lt;span class="s1"&gt;'com.google.gson.JsonParser#parseReader(com.google.gson.stream.JsonReader)'&lt;/span&gt;
  call com.google.gson.JsonParser#parse&lt;span class="o"&gt;(&lt;/span&gt;com.google.gson.stream.JsonReader&lt;span class="o"&gt;)&lt;/span&gt;  gson-2.14.0.jar
  call com.google.gson.JsonParser#parseReader&lt;span class="o"&gt;(&lt;/span&gt;java.io.Reader&lt;span class="o"&gt;)&lt;/span&gt;  gson-2.14.0.jar
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;--depth N&lt;/code&gt; follows the call graph transitively (cycle-safe). &lt;code&gt;jdx usages&lt;/code&gt; and &lt;code&gt;jdx implementors&lt;/code&gt; work across every jar on the classpath, not just one. More in &lt;a href="https://mohammadmd1383.github.io/jdx/docs/navigating-code/" rel="noopener noreferrer"&gt;Usages, hierarchy &amp;amp; calls&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Ask what a dependency upgrade breaks
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;$ jdx diff com.google.code.gson:gson:2.11.0 com.google.code.gson:gson:2.14.0 --fetch
api diff com.google.code.gson:gson:2.11.0 -&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; com.google.code.gson:gson:2.14.0 &lt;span class="o"&gt;(&lt;/span&gt;public surface&lt;span class="o"&gt;)&lt;/span&gt;
info  TYPE_ADDED  com.google.gson.internal.GsonTypes
...
info  MEMBER_ADDED  com.google.gson.stream.JsonReader#setNestingLimit&lt;span class="o"&gt;(&lt;/span&gt;int&lt;span class="o"&gt;)&lt;/span&gt;
info  FIELD_CONSTANT_VALUE_CHANGED  com.google.gson.internal.GsonBuildConfig#VERSION: &lt;span class="s2"&gt;"2.11.0"&lt;/span&gt; -&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="s2"&gt;"2.14.0"&lt;/span&gt;
0 breaking · 0 suspicious · 17 informational · 2 types added · 0 types removed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every finding names a rule (&lt;code&gt;MEMBER_REMOVED&lt;/code&gt;, &lt;code&gt;RETURN_TYPE_CHANGED&lt;/code&gt;, &lt;code&gt;KOTLIN_NULLABILITY_CHANGED&lt;/code&gt;, …) at &lt;code&gt;breaking&lt;/code&gt;, &lt;code&gt;suspicious&lt;/code&gt; or &lt;code&gt;info&lt;/code&gt;. Add &lt;code&gt;--fail-on breaking&lt;/code&gt; and it becomes a CI gate. See &lt;a href="https://mohammadmd1383.github.io/jdx/docs/api-diff/" rel="noopener noreferrer"&gt;API diff for upgrades&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Name your classpath once
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx ws create gson --coord com.google.code.gson:gson:2.14.0
jdx -w gson usages com.google.gson.TypeAdapter
jdx ws use gson        &lt;span class="c"&gt;# make it the default&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Inside a Gradle or Maven project you often need nothing: jdx discovers the project's sources and dependency jars from the local caches, without running the build.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Hand it to your agent
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jdx setup --agent claude-code --scope project   &lt;span class="c"&gt;# then restart Claude Code&lt;/span&gt;
&lt;span class="c"&gt;# or: cursor, codex, copilot, opencode, cline, kilo, antigravity, windsurf, aider&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Any other MCP client takes one line of config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"jdx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nl"&gt;"command"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="s2"&gt;"jdx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nl"&gt;"args"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"mcp"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The MCP server exposes each query as a typed tool (&lt;code&gt;jdx_members&lt;/code&gt;, &lt;code&gt;jdx_body&lt;/code&gt;, &lt;code&gt;jdx_usages&lt;/code&gt;, &lt;code&gt;jdx_callers&lt;/code&gt;, &lt;code&gt;jdx_diff&lt;/code&gt;, …) and keeps the index warm, so queries take about 20 ms instead of about 250 ms for a cold CLI call. If you'd rather use the CLI from your agent, &lt;code&gt;jdx help --agent&lt;/code&gt; prints a compact block to paste into &lt;code&gt;CLAUDE.md&lt;/code&gt; or &lt;code&gt;AGENTS.md&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Per-agent setup pages: &lt;a href="https://mohammadmd1383.github.io/jdx/integrations/claude-code/" rel="noopener noreferrer"&gt;Claude Code&lt;/a&gt;, &lt;a href="https://mohammadmd1383.github.io/jdx/integrations/cursor/" rel="noopener noreferrer"&gt;Cursor&lt;/a&gt;, &lt;a href="https://mohammadmd1383.github.io/jdx/integrations/codex/" rel="noopener noreferrer"&gt;Codex CLI&lt;/a&gt;, &lt;a href="https://mohammadmd1383.github.io/jdx/integrations/" rel="noopener noreferrer"&gt;all integrations&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  New in v1.7.0: the questions IDEs don't answer
&lt;/h2&gt;

&lt;p&gt;Agents also ask things an IDE never made easy. v1.7.0 adds commands for them (see the &lt;a href="https://mohammadmd1383.github.io/jdx/docs/reference/" rel="noopener noreferrer"&gt;command reference&lt;/a&gt; for every flag):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;jdx literals&lt;/code&gt; — search string constants (&lt;code&gt;LDC&lt;/code&gt; loads and &lt;code&gt;ConstantValue&lt;/code&gt; fields) and &lt;code&gt;.properties&lt;/code&gt; keys/values across the workspace: "where does this log message / resource key come from?"&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;jdx services&lt;/code&gt; — &lt;code&gt;META-INF/services&lt;/code&gt; SPI providers: "who provides &lt;code&gt;com.foo.Spi&lt;/code&gt;?"&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;jdx modules&lt;/code&gt; — JPMS &lt;code&gt;module-info&lt;/code&gt; (requires / exports / opens / uses / provides).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;jdx manifest&lt;/code&gt; and &lt;code&gt;jdx resources&lt;/code&gt; — &lt;code&gt;MANIFEST.MF&lt;/code&gt; attributes and non-class resources (&lt;code&gt;--cat&lt;/code&gt; prints a text resource).&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;jdx annotated&lt;/code&gt; — classes and members carrying an annotation, with recipes such as &lt;code&gt;deprecated&lt;/code&gt;, &lt;code&gt;forRemoval&lt;/code&gt;, &lt;code&gt;test&lt;/code&gt; and &lt;code&gt;bean&lt;/code&gt;; &lt;code&gt;jdx usages --where&lt;/code&gt; filters on annotation values.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;callers&lt;/code&gt; is now override-aware by default (&lt;code&gt;--exact&lt;/code&gt; for invoke-owner matching), bytecode usages carry &lt;code&gt;file:line&lt;/code&gt;, and &lt;code&gt;usages --context&lt;/code&gt; shows inline snippets.&lt;/li&gt;
&lt;li&gt;Kotlin nullability is rendered from &lt;code&gt;@Metadata&lt;/code&gt;, and there's a PowerShell installer for Windows.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Does it actually save context?
&lt;/h2&gt;

&lt;p&gt;On one task from the README, "list Gson's API, then show only &lt;code&gt;toJson(Object)&lt;/code&gt;" on gson-2.14.0:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Approach&lt;/th&gt;
&lt;th&gt;Calls&lt;/th&gt;
&lt;th&gt;Output in context&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;unzip&lt;/code&gt; + &lt;code&gt;javap&lt;/code&gt; + &lt;code&gt;grep&lt;/code&gt; + &lt;code&gt;sed&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;~17.5 KB (~4.4k tokens), and &lt;code&gt;head -200&lt;/code&gt; missed the method entirely&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;jdx members&lt;/code&gt; + &lt;code&gt;jdx body&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;~4.6 KB (~1.2k tokens)&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The method body alone is 267 bytes, against 60,590 for &lt;code&gt;javap -c&lt;/code&gt; and 58,251 for the full &lt;code&gt;Gson.java&lt;/code&gt;. That's one task, not a benchmark suite, but you can rerun it yourself with &lt;code&gt;sh docs/bench-compare.sh&lt;/code&gt; from the repo.&lt;/p&gt;

&lt;h2&gt;
  
  
  A note on safety
&lt;/h2&gt;

&lt;p&gt;jdx parses bytecode with ASM and never loads the classes it inspects, so no static initialiser or other code from those jars runs. It only touches the network when you pass &lt;code&gt;--fetch&lt;/code&gt;, run &lt;code&gt;jdx upgrade&lt;/code&gt;, or run &lt;code&gt;jdx kotlin install&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Kotlin
&lt;/h2&gt;

&lt;p&gt;Kotlin binaries are read through &lt;code&gt;@Metadata&lt;/code&gt;, so the agent sees nullability, &lt;code&gt;suspend&lt;/code&gt; functions, properties, default arguments and &lt;code&gt;@JvmName&lt;/code&gt; mappings instead of the JVM projection. Reading Kotlin sources needs a one-time &lt;code&gt;jdx kotlin install&lt;/code&gt;. Details in &lt;a href="https://mohammadmd1383.github.io/jdx/docs/reading-code/#kotlin" rel="noopener noreferrer"&gt;Reading code&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;jdx is free and open source (Apache-2.0). Start with the &lt;a href="https://mohammadmd1383.github.io/jdx/docs/quickstart/" rel="noopener noreferrer"&gt;quickstart&lt;/a&gt;, browse the &lt;a href="https://mohammadmd1383.github.io/jdx/" rel="noopener noreferrer"&gt;docs&lt;/a&gt;, and if it gives your agent a wrong answer, please &lt;a href="https://github.com/MohammadMD1383/jdx/issues" rel="noopener noreferrer"&gt;open an issue&lt;/a&gt; with the command and what you expected.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Source: &lt;a href="https://github.com/MohammadMD1383/jdx" rel="noopener noreferrer"&gt;github.com/MohammadMD1383/jdx&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>kotlin</category>
      <category>ai</category>
      <category>mcp</category>
    </item>
  </channel>
</rss>
