You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Peter Hull <pe...@gmail.com> on 2026/08/12 12:29:00 UTC
Getting the version of NetBeans from the files
Given an unpacked binary distribution of NB, is it possible to find
out what version it is without running it? e.g is there a file that
contains the version number?
Pete
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Getting the version of NetBeans from the files
Posted by Peter Hull <pe...@gmail.com>.
On Wed, 12 Aug 2026 at 13:56, Neil C Smith <ne...@apache.org> wrote:
> It's funny you should ask that as I've been thinking about similar
> recently. What's your use case?
Just a very mundane reason; I had a few old versions unpacked from
zips and wanted to check which was which so I could do some spring
cleaning.
Pete
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Getting the version of NetBeans from the files
Posted by Neil C Smith <ne...@apache.org>.
On Wed, 12 Aug 2026 at 13:54, Neil C Smith <ne...@apache.org> wrote:
> One option I can think of is to parse the manifest of one of the
> modules. The implementation version of most modules is
> VERSION-GITHASH.
ie. something like this -
String base = "/usr/lib/apache-netbeans";
String bootJar = base + "/platform/lib/boot.jar";
JarFile jar = new JarFile(bootJar);
Manifest manifest = jar.getManifest();
String implVersion = manifest.getMainAttributes()
.getValue("OpenIDE-Module-Implementation-Version");
String platformVersion = implVersion.split("-", 2)[0];
System.out.println("NetBeans platform version : " + platformVersion);
Best wishes,
Neil
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: Getting the version of NetBeans from the files
Posted by Neil C Smith <ne...@apache.org>.
Hi,
On Wed, 12 Aug 2026 at 13:29, Peter Hull <pe...@gmail.com> wrote:
> Given an unpacked binary distribution of NB, is it possible to find
> out what version it is without running it? e.g is there a file that
> contains the version number?
It's funny you should ask that as I've been thinking about similar
recently. What's your use case? At some point, NBPackage should be
updated to understand recent launcher changes. That will probably
require adding something to recognise the underlying platform version.
It will have to work with platform applications too, although I'm not
sure there's really an easier answer just for the IDE. Certainly the
VERSION files we have in various places are not useful for this.
One option I can think of is to parse the manifest of one of the
modules. The implementation version of most modules is
VERSION-GITHASH. Using platform/lib/boot.jar might be the best one to
use to cover all cases? Anything easier?!
For the IDE alone, the version is written into the userdir locations
in etc/netbeans.conf
Best wishes,
Neil
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists