1 /*
 2  * Autopsy Forensic Browser
 3  * 
 4  * Copyright 2011 Basis Technology Corp.
 5  * Contact: carrier <at> sleuthkit <dot> org
 6  * 
 7  * Licensed under the Apache License, Version 2.0 (the "License");
 8  * you may not use this file except in compliance with the License.
 9  * You may obtain a copy of the License at
 10  * 
 11  * http://www.apache.org/licenses/LICENSE-2.0
 12  * 
 13  * Unless required by applicable law or agreed to in writing, software
 14  * distributed under the License is distributed on an "AS IS" BASIS,
 15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 16  * See the License for the specific language governing permissions and
 17  * limitations under the License.
 18  */
 19 package org.sleuthkit.autopsy.coreutils;
 20 
 21 import java.io.IOException;
 22 import java.io.InputStream;
 23 import java.util.Properties;
 24 
 29 
 31 
 33  }
 34 
 36 
 38  }
 39 
 41  if (versionProperties != null) {
 42  return;
 43  }
 44 
 45  versionProperties = new Properties();
 46  try {
 47  InputStream inputStream = 
Version.class.getResourceAsStream(
"Version.properties"); 
//NON-NLS 
 48  versionProperties.load(inputStream);
 49  } catch (IOException e) {
 50  versionProperties = null;
 51  }
 52 
 53  }
 54 
 57  if (versionProperties == null) {
 58  return "";
 59  } else {
 60  return versionProperties.getProperty(property);
 61  }
 62  }
 63 
 71  }
 72 
 80  }
 81 
 89  return Type.valueOf(valueProp);
 
 90  }
 91 
 93  return System.getProperty("java.runtime.version");
 94  }
 95 
 97  return System.getProperty("netbeans.buildnumber");
 98  }
 99 
 101  return System.getProperty("netbeans.productversion");
 102  }
 103 }
static Version.Type getBuildType()
static String getVersionProperty(String property)
static Properties versionProperties
static String getNetbeansBuild()
static String getJavaRuntimeVersion()
static String getNetbeansProductVersion()
static String getVersion()
static void loadVersionProperty()