From 1f9e3a61b4acd38081778275324802a79c01eb3e Mon Sep 17 00:00:00 2001 From: kitfox Date: Wed, 18 Apr 2007 18:22:08 +0000 Subject: Updating web git-svn-id: https://svn.java.net/svn/svgsalamander~svn/trunk/svg-core@27 7dc7fa77-23fb-e6ad-8e2e-c86bd48ed22b --- build.xml | 2 +- manifest.mf | 2 +- .../com/kitfox/salamander/javascript/JSTest.java | 40 ++++++++++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 src/test/java/com/kitfox/salamander/javascript/JSTest.java diff --git a/build.xml b/build.xml index 967d469..467416c 100755 --- a/build.xml +++ b/build.xml @@ -1,7 +1,7 @@ - General 2D and 3D graphics routines + Java 2D graphics pipeline inspired by SVG diff --git a/manifest.mf b/manifest.mf index b25c343..0d75d09 100755 --- a/manifest.mf +++ b/manifest.mf @@ -9,6 +9,6 @@ Specification-Title: SVG Salamander Specification-Version: 1 Specification-Vendor: Kitfox Implementation-Title: svg-salamander-core -Implementation-Version: Version 1, Date April 13 2007 +Implementation-Version: Version 1, Date April 16 2007 Implementation-Vendor: Mark McKay, mark@kitfox.com diff --git a/src/test/java/com/kitfox/salamander/javascript/JSTest.java b/src/test/java/com/kitfox/salamander/javascript/JSTest.java new file mode 100644 index 0000000..4651298 --- /dev/null +++ b/src/test/java/com/kitfox/salamander/javascript/JSTest.java @@ -0,0 +1,40 @@ +/* + * JSTest.java + * + * Created on April 16, 2007, 12:59 AM + * + * To change this template, choose Tools | Template Manager + * and open the template in the editor. + */ + +package com.kitfox.salamander.javascript; + +import javax.script.ScriptEngine; +import javax.script.ScriptEngineManager; +import javax.script.ScriptException; + +/** + * http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/ + * + * @author kitfox + */ +public class JSTest +{ + + /** Creates a new instance of JSTest */ + public JSTest() + { + ScriptEngineManager mgr = new ScriptEngineManager(); + ScriptEngine jsEngine = mgr.getEngineByName("JavaScript"); + try { + jsEngine.eval("print('Hello, world!')"); + } catch (ScriptException ex) { + ex.printStackTrace(); + } + } + + public static void main(String[] args) + { + new JSTest(); + } +} -- cgit v1.2.3-55-g7522