Mercurial Hosting > luan
changeset 258:4dfa86dbca45
rename "java:" to "classpath:"
git-svn-id: https://luan-java.googlecode.com/svn/trunk@259 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Tue, 28 Oct 2014 20:38:04 +0000 |
parents | c5c60eca33dd |
children | f9b201530b85 |
files | core/src/luan/Luan.java core/src/luan/LuanState.java core/src/luan/init.luan core/src/luan/modules/PackageLuan.java core/src/luan/modules/Utils.java dist/jars/luan-core-trunk.jar dist/jars/luan-logging-trunk.jar dist/jars/luan-lucene-trunk.jar dist/jars/luan-mail-trunk.jar dist/jars/luan-web-trunk.jar web/src/luan/modules/web/Web_server.luan |
diffstat | 11 files changed, 8 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
diff -r c5c60eca33dd -r 4dfa86dbca45 core/src/luan/Luan.java --- a/core/src/luan/Luan.java Tue Oct 28 03:05:37 2014 +0000 +++ b/core/src/luan/Luan.java Tue Oct 28 20:38:04 2014 +0000 @@ -8,7 +8,7 @@ public static void main(String[] args) { LuanState luan = LuanState.newStandard(); try { - LuanFunction standalone = (LuanFunction)BasicLuan.load_file(luan,"java:luan/cmd_line.luan"); + LuanFunction standalone = (LuanFunction)BasicLuan.load_file(luan,"classpath:luan/cmd_line.luan"); luan.call(standalone,args); } catch(LuanException e) { System.err.println(e.getFullMessage());
diff -r c5c60eca33dd -r 4dfa86dbca45 core/src/luan/LuanState.java --- a/core/src/luan/LuanState.java Tue Oct 28 03:05:37 2014 +0000 +++ b/core/src/luan/LuanState.java Tue Oct 28 20:38:04 2014 +0000 @@ -60,7 +60,7 @@ public static LuanState newStandard() { try { LuanState luan = LuanCompiler.newLuanState(); - BasicLuan.do_file(luan,"java:luan/init.luan"); + BasicLuan.do_file(luan,"classpath:luan/init.luan"); return luan; } catch(LuanException e) { throw new RuntimeException(e);
diff -r c5c60eca33dd -r 4dfa86dbca45 core/src/luan/init.luan --- a/core/src/luan/init.luan Tue Oct 28 03:05:37 2014 +0000 +++ b/core/src/luan/init.luan Tue Oct 28 20:38:04 2014 +0000 @@ -38,7 +38,7 @@ local to_string = Package.global(Basic,"to_string") Package.global(Basic,"type") -do_file "java:luan/version.luan" +do_file "classpath:luan/version.luan" function Io.print_to(out,...)
diff -r c5c60eca33dd -r 4dfa86dbca45 core/src/luan/modules/PackageLuan.java --- a/core/src/luan/modules/PackageLuan.java Tue Oct 28 03:05:37 2014 +0000 +++ b/core/src/luan/modules/PackageLuan.java Tue Oct 28 20:38:04 2014 +0000 @@ -22,7 +22,7 @@ LuanTable module = Luan.newTable(); module.put( "loaded", loaded(luan) ); module.put( "preload", Luan.newTable() ); - module.put( "path", "?.luan;java:luan/modules/?.luan" ); + module.put( "path", "?.luan;classpath:luan/modules/?.luan" ); module.put( "jpath", jpath ); try { module.put("require",requireFn);
diff -r c5c60eca33dd -r 4dfa86dbca45 core/src/luan/modules/Utils.java --- a/core/src/luan/modules/Utils.java Tue Oct 28 03:05:37 2014 +0000 +++ b/core/src/luan/modules/Utils.java Tue Oct 28 20:38:04 2014 +0000 @@ -83,8 +83,8 @@ public static URL toUrl(String path) { if( path.indexOf(':') == -1 ) return null; - if( path.startsWith("java:") ) { - path = path.substring(5); + if( path.startsWith("classpath:") ) { + path = path.substring(10); if( path.contains("//") ) return null; URL url;
diff -r c5c60eca33dd -r 4dfa86dbca45 dist/jars/luan-core-trunk.jar Binary file dist/jars/luan-core-trunk.jar has changed
diff -r c5c60eca33dd -r 4dfa86dbca45 dist/jars/luan-logging-trunk.jar Binary file dist/jars/luan-logging-trunk.jar has changed
diff -r c5c60eca33dd -r 4dfa86dbca45 dist/jars/luan-lucene-trunk.jar Binary file dist/jars/luan-lucene-trunk.jar has changed
diff -r c5c60eca33dd -r 4dfa86dbca45 dist/jars/luan-mail-trunk.jar Binary file dist/jars/luan-mail-trunk.jar has changed
diff -r c5c60eca33dd -r 4dfa86dbca45 dist/jars/luan-web-trunk.jar Binary file dist/jars/luan-web-trunk.jar has changed
diff -r c5c60eca33dd -r 4dfa86dbca45 web/src/luan/modules/web/Web_server.luan --- a/web/src/luan/modules/web/Web_server.luan Tue Oct 28 03:05:37 2014 +0000 +++ b/web/src/luan/modules/web/Web_server.luan Tue Oct 28 20:38:04 2014 +0000 @@ -73,10 +73,10 @@ function serve(dir) dir = dir.gsub("/$","") -- remove trailing '/' if any Http.dir = dir - Package.path = dir .. "?.luan;java:luan/modules/?.luan" + Package.path = dir .. "?.luan;classpath:luan/modules/?.luan" authentication_handler.setPassword(private_password) local base = dir - if base.match("^java:") ~= nil then + if base.match("^classpath:") ~= nil then base = dir.."#"..welcome_file.."#"..welcome_file..".luan" end resource_handler.setResourceBase(Io.File(base).to_string())