Commit 1114b79e authored by R.W.Majeed's avatar R.W.Majeed
Browse files

Determine version number if running from jar

parent cbca8daf
......@@ -26,11 +26,15 @@ import;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import java.util.function.Consumer;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import de.sekmi.histream.Extension;
import de.sekmi.histream.Observation;
import de.sekmi.histream.ObservationFactory;
......@@ -126,8 +130,19 @@ public class RunConfiguration implements Closeable{
return p;
private static final String readVersion() throws IOException{
InputStream inputStream = RunConfiguration.class.getClassLoader().getResourceAsStream("META-INF/maven/de.sekmi.histream/histream/");
Properties props = new Properties();
return props.getProperty("version","[unknown]");
public static void main(String args[])throws Exception{
System.out.println("HIStream starting");
if( System.console() == null ){
JOptionPane.showMessageDialog(null, "This program should be run with a console", "HIStream "+readVersion(), JOptionPane.WARNING_MESSAGE);
System.out.println("HIStream "+readVersion()+" starting");
long millis = System.currentTimeMillis();
Configuration conf = Configuration.fromFile(new File("src/test/resources/histream.xml"));
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment