0

I'm trying to create a 'skeleton' framework of sorts for a basic java app.

One thing I'm looking to add is a version page/display that list the current framework/libs attached.

For example:

Skeleton version: 1.0.0 Spring: 2.5.6 Hibernate: Malbolge

The purpose of the Skeleton project was to make it very easy for a new developer to quickly start a robust app.
I figured the worst case scenario is that I could search through every framework jars manifest and use that... but that's no fun...

Anyone have a different suggestion? This would be a no brainer if the project was going to use Maven... I could just parse the pom.xml or something to that extent...

I guess a more defined question is:

Given a folder of libs; is there a way to dynamically gather the jars/frameworks version # without touching the manifest?

Vehemon
  • 41
  • 1
  • 4

2 Answers2

0

Using System.getProperties() gives you a listing of JVM properties including the different version ids of the JRE, JVM and specification. Not sure if this will give Spring etc versions.

Dave Newton
  • 158,873
  • 26
  • 254
  • 302
Salil
  • 536
  • 1
  • 6
  • 15
0

You can get the Spring version using the SpringVersion class.

I had a code snippet in a previous question:

Need Spring version# - only have spring.jar file

Community
  • 1
  • 1
duffymo
  • 305,152
  • 44
  • 369
  • 561