1 package org
.argeo
.osgi
.boot
;
3 import java
.lang
.management
.ManagementFactory
;
7 public static void main(String
[] args
) {
8 String mainClass
= System
.getProperty(OsgiBoot
.PROP_ARGEO_OSGI_BOOT_APPCLASS
);
9 if (mainClass
== null) {
10 throw new IllegalArgumentException(
11 "System property " + OsgiBoot
.PROP_ARGEO_OSGI_BOOT_APPCLASS
+ " must be specified");
14 OsgiBuilder osgi
= new OsgiBuilder();
15 String distributionUrl
= System
.getProperty(OsgiBoot
.PROP_ARGEO_OSGI_DISTRIBUTION_URL
);
16 if (distributionUrl
!= null)
17 osgi
.install(distributionUrl
);
18 // osgi.conf("argeo.node.useradmin.uris", "os:///");
19 // osgi.conf("osgi.clean", "true");
20 // osgi.conf("osgi.console", "true");
22 osgi
.main(mainClass
, args
);
24 long jvmUptime
= ManagementFactory
.getRuntimeMXBean().getUptime();
25 String jvmUptimeStr
= (jvmUptime
/ 1000) + "." + (jvmUptime
% 1000) + "s";
26 System
.out
.println("Command " + mainClass
+ " executed in " + jvmUptimeStr
);