Mercurial Hosting > luan
changeset 1590:bce893009f90
add java compiler check
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 17 Mar 2021 19:50:08 -0600 |
parents | 0c46edec25dd |
children | 85cd316f0cdb |
files | src/luan/Luan.java |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
diff -r 0c46edec25dd -r bce893009f90 src/luan/Luan.java --- a/src/luan/Luan.java Sat Mar 13 21:02:38 2021 -0700 +++ b/src/luan/Luan.java Wed Mar 17 19:50:08 2021 -0600 @@ -11,6 +11,7 @@ import java.util.Arrays; import java.util.Set; import java.util.Collection; +import javax.tools.ToolProvider; import goodjava.logging.Logger; import goodjava.logging.LoggerFactory; import luan.modules.JavaLuan; @@ -259,6 +260,8 @@ // static public static void main(String[] args) throws LuanException { + if( ToolProvider.getSystemJavaCompiler()==null ) + throw new LuanException("java compiler not available"); Luan luan = new Luan(); LuanFunction fn = loadClasspath(luan,"luan/cmd_line.luan"); fn.call(luan,(Object[])args);