This content has been marked as final.
Show 2 replies
-
1. Re: how I know my app is under JBoss or OC4J?
alesj Oct 1, 2009 8:33 AM (in response to skyme)boolean isJBoss = false; try { Class.forName("org.jboss.Version"); isJBoss = true; } catch (Exception ignore) {}
-
2. Re: how I know my app is under JBoss or OC4J?
peterj Oct 1, 2009 10:53 AM (in response to skyme)Another possible option is to check for one of the system properties that JBoss AS sets automatically:
boolean isJboss = System.getProperty("jboss.home.dir") != null;
Of course, this is not quite a foolproof as Ales's solution because anyone can set a system property form the command line.