Mercurial Hosting > luan
comparison src/luan/Luan.java @ 1590:bce893009f90
add java compiler check
author | Franklin Schmidt <fschmidt@gmail.com> |
---|---|
date | Wed, 17 Mar 2021 19:50:08 -0600 |
parents | 2975c932864d |
children | 46cf5137cb6b |
comparison
equal
deleted
inserted
replaced
1589:0c46edec25dd | 1590:bce893009f90 |
---|---|
9 import java.util.LinkedHashMap; | 9 import java.util.LinkedHashMap; |
10 import java.util.Iterator; | 10 import java.util.Iterator; |
11 import java.util.Arrays; | 11 import java.util.Arrays; |
12 import java.util.Set; | 12 import java.util.Set; |
13 import java.util.Collection; | 13 import java.util.Collection; |
14 import javax.tools.ToolProvider; | |
14 import goodjava.logging.Logger; | 15 import goodjava.logging.Logger; |
15 import goodjava.logging.LoggerFactory; | 16 import goodjava.logging.LoggerFactory; |
16 import luan.modules.JavaLuan; | 17 import luan.modules.JavaLuan; |
17 import luan.modules.PackageLuan; | 18 import luan.modules.PackageLuan; |
18 import luan.modules.IoLuan; | 19 import luan.modules.IoLuan; |
257 | 258 |
258 | 259 |
259 // static | 260 // static |
260 | 261 |
261 public static void main(String[] args) throws LuanException { | 262 public static void main(String[] args) throws LuanException { |
263 if( ToolProvider.getSystemJavaCompiler()==null ) | |
264 throw new LuanException("java compiler not available"); | |
262 Luan luan = new Luan(); | 265 Luan luan = new Luan(); |
263 LuanFunction fn = loadClasspath(luan,"luan/cmd_line.luan"); | 266 LuanFunction fn = loadClasspath(luan,"luan/cmd_line.luan"); |
264 fn.call(luan,(Object[])args); | 267 fn.call(luan,(Object[])args); |
265 } | 268 } |
266 | 269 |