Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Easy</strong></p> <pre><code>import com.example.*; </code></pre> <p><strong>Possible</strong></p> <pre><code>List&lt;com.example.MyType&gt; = new ArrayList&lt;com.example.MyType&gt;(); </code></pre> <p><strong>A challenge</strong></p> <pre><code>Class&lt;?&gt; clazz = Class.forName("com.example.MyType"); </code></pre> <p><strong>Mission impossible</strong></p> <pre><code>List&lt;String&gt; classes = getClassNamesFromUrl("http://example.com/classes.txt"); for (String className:classes) { doSomethingWith(Class.forName(className)); } </code></pre> <p>I support Jon's advice to look at the byte code (BCEL) but just be aware, that in general it is not possible to read all dependencies from a jar, as they can be dynamic and defined outside the library (see: Mission impossible).</p> <hr> <p>Hard to tell if there's a tool, have a look at those directories on <a href="http://java-source.net/" rel="nofollow noreferrer">java-source.net</a>:</p> <ul> <li><a href="http://java-source.net/open-source/bytecode-libraries" rel="nofollow noreferrer">Open Source ByteCode Libraries in Java</a></li> <li><a href="http://java-source.net/open-source/code-analyzers" rel="nofollow noreferrer">Open Source Code Analyzers in Java</a> (has some applications to work on jars too, like JDepend. JarAnalyzer sounds promising too, but it is quite old, last update in 2005)</li> </ul> <p><strong>Further reading</strong></p> <ul> <li><a href="https://stackoverflow.com/questions/972087/how-can-i-visualize-jar-not-plugin-dependencies">How can I visualize jar (not plugin) dependencies?</a> (especially <a href="https://stackoverflow.com/questions/972087/how-can-i-visualize-jar-not-plugin-dependencies/972193#972193">VonC's answer</a>)</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload