read build time from META-INF/MANIFEST.MF
Posted: Wed Nov 02, 2022 8:36 pm
hello team , the below method code to read build time from META-INF/MANIFEST.MF works fine in eclipse
where as the same jar deployed to oxygen/plugins folder and then when i try this to from a oxygen plugin its not returning any value?
where as the same jar deployed to oxygen/plugins folder and then when i try this to from a oxygen plugin its not returning any value?
Code: Select all
public static String getMyOxyegnPluginBuidTime() {
String buidTime = null;
try(InputStream manifestStream = MyPluginDetails.class.getClassLoader().getResourceAsStream("META-INF/MANIFEST.MF"))
{
Properties prop = new Properties();
try {
prop.load(manifestStream);
buidTime=(prop.getProperty("Build-Time"));
} catch (IOException ex) {
ex.printStackTrace();
}
} catch (IOException e) {
e.printStackTrace();
}
return buidTime;
}