There are various strategies to achieve the desired goal. I will not return to those that have already been mentioned, but instead outlined a few more.
1) Information can be placed in the manifest of the archive. It can be found using the methods of the java.lang.Package class .
String title = pckg.getImplementationTitle();
String vendor = pckg.getImplementationVendor();
String version = pckg.getImplementationVersion();
.
Package[] package = Package.getPackages();
, , .
- Ant - . , - .
2) JNLP.
<resources>
..
<property name="jnlp.href" value="${href}" />
..
</resources>
BTW - ${href} , href JNLP.
BasicService.getCodeBase() .
URL- JNLP, ..
URL urlToJnlp = new URL(
basicService.getCodeBase(),
System.getProperty("jnlp.href") );
JNLP XML- J2SE. ( XML- J2SE, , - , JaNeLA.)
, , .