From: Andy Clement Date: Mon, 12 Mar 2018 15:37:38 +0000 (-0700) Subject: Add checking for env variable ASPECTJ_OPTS in addition to sys prop X-Git-Tag: V1_9_0~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f8d82161e3b5c5ddcc6ec16540c3e1ab637bd04c;p=aspectj.git Add checking for env variable ASPECTJ_OPTS in addition to sys prop --- diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java index 4c7873df0..1bbd3327b 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/ajc/ConfigParser.java @@ -45,7 +45,15 @@ public class ConfigParser { for (int i = 0; i < argsArray.length; i++) { args.add(new Arg(argsArray[i], location)); } - String aspectjOptions = System.getProperty("ASPECTJ_OPTS"); + String aspectjOptions = null; + try { + aspectjOptions = System.getenv("ASPECTJ_OPTS"); + if (aspectjOptions == null) { + aspectjOptions = System.getProperty("ASPECTJ_OPTS"); + } + } catch (Throwable t) { + aspectjOptions = null; + } if (aspectjOptions != null) { StringTokenizer st = new StringTokenizer(aspectjOptions); while (st.hasMoreElements()) {