{"id":43728,"date":"2015-09-18T21:52:44","date_gmt":"2015-09-18T18:52:44","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=43728"},"modified":"2023-12-06T14:22:59","modified_gmt":"2023-12-06T12:22:59","slug":"dynamic-languages-support","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html","title":{"rendered":"Dynamic languages support"},"content":{"rendered":"<p><em>This article is part of our Academy Course titled <a href=\"http:\/\/www.javacodegeeks.com\/2015\/09\/advanced-java.html\">Advanced Java<\/a>.<\/p>\n<p>This course is designed to help you make the most effective use of Java. It discusses advanced topics, including object creation, concurrency, serialization, reflection and many more. It will guide you through your journey to Java mastery! Check it out <a href=\"http:\/\/www.javacodegeeks.com\/2015\/09\/advanced-java.html\">here<\/a>!<\/em><\/p>\n<div class=\"toc\">\n<h4>Table Of Contents<\/h4>\n<dl>\n<dt><a href=\"#one\">1. Introduction<\/a><\/dt>\n<dt><a href=\"#two\">2. Dynamic Languages Support<\/a><\/dt>\n<dt><a href=\"#three\">3. Scripting API<\/a><\/dt>\n<dt><a href=\"#four\">4. JavaScript on JVM<\/a><\/dt>\n<dt><a href=\"#five\">5. Groovy on JVM<\/a><\/dt>\n<dt><a href=\"#six\">6. Ruby on JVM <\/a><\/dt>\n<dt><a href=\"#seven\">7. Python on JVM<\/a><\/dt>\n<dt><a href=\"#eight\">8. Using Scripting API<\/a><\/dt>\n<dt><a href=\"#nine\">9. What\u2019s next<\/a><\/dt>\n<dt><a href=\"#ten\">10. Download Code<\/a><\/dt>\n<\/dl>\n<\/div>\n<h2><a name=\"one\"><\/a>1. Introduction<\/h2>\n<p>In this part of the tutorial our attention will be fully concentrated on the scripting and dynamic languages support in Java. Since Java 7, the JVM has a direct support of modern dynamic (also often called scripting) languages and the Java 8 release delivered even more enhancements into this space. <\/p>\n<p>One of the strength of the dynamic languages is that the behavior of the program is defined at runtime, rather than at compile time. Among those languages, <strong>Ruby<\/strong> (<a href=\"https:\/\/www.ruby-lang.org\/en\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.ruby-lang.org\/en\/<\/a>), <strong>Python<\/strong> (<a href=\"https:\/\/www.python.org\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.python.org\/<\/a>) and <strong>JavaScript<\/strong> (<a href=\"http:\/\/en.wikipedia.org\/wiki\/JavaScript\" target=\"_blank\" rel=\"noopener\">http:\/\/en.wikipedia.org\/wiki\/JavaScript<\/a>) have gained a lot of popularity and are the most widely used ones at the moment. We are going to take a look on how Java scripting API opens a way to integrate those languages into existing Java applications.<\/p>\n<h2><a name=\"two\"><\/a>2. Dynamic Languages Support<\/h2>\n<p>As we already know very well, Java is a statically typed language. This means that all typed information for class, its members, method parameters and return values is available at compile time. Using all this details, the Java compiler emits strongly typed byte code which can then be efficiently interpreted by the JVM at runtime. <\/p>\n<p>However, dynamic languages perform type checking at runtime, rather than compile time. The challenge of dealing with dynamically languages is how to implement a runtime system that can choose the most appropriate implementation of a method to call after the program has been compiled. <\/p>\n<p>For a long time, the JVM had had no special support for dynamically typed languages. But Java 7 release introduced the new <strong>invokedynamic<\/strong> instruction that enabled the runtime system (JVM) to customize the linkage between a call site (the place where method is being called) and a method implementation. It really opened a door for effective dynamic languages support and implementations on JVM platform.<\/p>\n<h2><a name=\"three\"><\/a>3. Scripting API<\/h2>\n<p>As part of the Java 6 release back in 2006, the new scripting API has been introduced under the <code>javax.script<\/code> package. This extensible API was designed to plug in mostly any scripting language (which provides the script engine implementation) and run it on JVM platform. <\/p>\n<p>Under the hood, the Java scripting API is really small and quite simple. The initial step to begin working with scripting API is to create new instance of the <code>ScriptEngineManager<\/code> class. ScriptEngineManager provides the capability to discover and retrieve available scripting engines by their names from the running application classpath.<\/p>\n<p>Each scripting engine is represented using a respective <code>ScriptEngine<\/code> implementation and essentially provides the ability to execute the scripts using <code>eval()<\/code> functions family (which has multiple overloaded versions). Quite a number of popular scripting (dynamic) languages already provide support of the Java scripting API and in the next sections of this tutorial we will see how nice this API works in practice by playing with <strong>JavaScript<\/strong>, <strong>Groovy<\/strong>, <strong>Ruby\/JRuby<\/strong> and <strong>Python\/Jython<\/strong>.<\/p>\n<h2><a name=\"four\"><\/a>4. JavaScript on JVM<\/h2>\n<p>It is not by accident that we are going to start our journey with the JavaScript language as it was the one of the first scripting languages supported by the Java standard library scripting API. And also because, by and large, it is the single programming language every web browser understands. <\/p>\n<p>In its simplest form, the <code>eval()<\/code> function executes the script, passed to it as a plain Java string. The script has no state shared with the evaluator (or caller) and is self-contained piece of code. However, in typical real-world applications it is quite rare and more often than not some variables or properties are required to be provided to the script in order to perform some meaningful calculations or actions. With that being said, let us take a look on a quick example evaluating real JavaScript function call using simple variable bindings:<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<pre class=\"brush:java\">\nfinal ScriptEngineManager factory = new ScriptEngineManager();\nfinal ScriptEngine engine = factory.getEngineByName( \"JavaScript\" );\n        \nfinal Bindings bindings = engine.createBindings();\nbindings.put( \"str\", \"Calling JavaScript\" );\nbindings.put( \"engine\", engine );\n        \nengine.eval( \"print(str + ' from ' + engine.getClass().getSimpleName() )\", bindings );\n<\/pre>\n<p>Once executed, the following output will be printed on the console:<\/p>\n<pre class=\"brush:bash\">Calling JavaScript from RhinoScriptEngine<\/pre>\n<p>For quite a while, <strong>Rhino<\/strong> used to be the single JavaScript scripting engine, available on JVM. But the Java 8 release brought a brand-new implementation of JavaScript scripting engine called <strong>Nashorn <\/strong>(<a href=\"http:\/\/www.oracle.com\/technetwork\/articles\/java\/jf14-nashorn-2126515.html\" target=\"_blank\" rel=\"noopener\">http:\/\/www.oracle.com\/technetwork\/articles\/java\/jf14-nashorn-2126515.html<\/a>).<\/p>\n<p>From the API standpoint, there are not too many differences however the internal implementation differs significantly, promising much better performance. Here is the same example rewritten to use <strong>Nashorn<\/strong> JavaScript engine:<\/p>\n<pre class=\"brush:java\">final ScriptEngineManager factory = new ScriptEngineManager();\nfinal ScriptEngine engine = factory.getEngineByName( \"Nashorn\" );\n        \nfinal Bindings bindings = engine.createBindings();\nbindings.put( \"engine\", engine );\n        \nengine.eval( \"print(str + ' from ' + engine.getClass().getSimpleName() )\", bindings );\n<\/pre>\n<p>The following output will be printed on the console (please notice a different script engine implementation this time):<\/p>\n<pre class=\"brush:bash\">Calling JavaScript from NashornScriptEngine<\/pre>\n<p>Nonetheless, the examples of JavaScript code snippets we have looked at are quite trivial. You could actually evaluate whole JavaScript files using overloaded eval() function call and implement quite sophisticated algorithms, purely in JavaScript. In the next sections we are going to see such examples while exploring other scripting languages.<\/p>\n<h2><a name=\"five\"><\/a>5. Groovy on JVM<\/h2>\n<p><strong>Groovy<\/strong> (<a href=\"http:\/\/groovy.codehaus.org\" target=\"_blank\" rel=\"noopener\">http:\/\/groovy.codehaus.org<\/a>) is one of the most successful dynamic languages for the JVM platform. It is often used side by side with Java, however it also provides the Java scripting API engine implementation and could be used in a similar way as a JavaScript one. <\/p>\n<p>Let us make this <strong>Groovy<\/strong> example a bit more meaningful and interesting by developing a small standalone script which prints out on the console some details about every book from the collection shared with it by calling Java application.<\/p>\n<p>The Book class is quite simple and has only two properties, author and title:<\/p>\n<pre class=\"brush:java\">public class Book {\n    private final String author;\n    private final String title;\n    \n    public Book(final String author, final String title) {\n        this.author = author;\n        this.title = title;\n    }\n\n    public String getAuthor() {\n        return author;\n    }\n\n    public String getTitle() {\n        return title;\n    }\n}<\/pre>\n<p>The <strong>Groovy<\/strong> script (named just <strong>script.groovy<\/strong>) uses some nifty language features like closures and string interpolation to output the book properties to the console:<\/p>\n<pre class=\"brush:java\">books.each { \n    println \"Book '$it.title' is written by $it.author\"\n}\n\nprintln \"Executed by ${engine.getClass().simpleName}\"\nprintln \"Free memory (bytes): \" + Runtime.getRuntime().freeMemory()<\/pre>\n<p>Now let us execute this <strong>Groovy<\/strong> script using Java scripting API and predefined collection of books (surely, all about <strong>Groovy<\/strong>):<\/p>\n<pre class=\"brush:java\">final ScriptEngineManager factory = new ScriptEngineManager();\nfinal ScriptEngine engine = factory.getEngineByName( \"Groovy\" );\n\t    \nfinal Collection&lt; Book &gt; books = Arrays.asList(\n\tnew Book( \"Venkat Subramaniam\", \"Programming Groovy 2\" ),\n\tnew Book( \"Ken Kousen\", \"Making Java Groovy\" )\n    );\n\t            \nfinal Bindings bindings = engine.createBindings();\nbindings.put( \"books\", books );\nbindings.put( \"engine\", engine );\n        \ntry( final Reader reader = new InputStreamReader( \n        Book.class.getResourceAsStream(\"\/script.groovy\" ) ) ) {\n    engine.eval( reader, bindings );        \n}\n<\/pre>\n<p>Please notice that the <strong>Groovy<\/strong> scripting engine has a full access to Java standard library and does not require any addition bindings. To confirm that, the last line from the <strong>Groovy<\/strong> script above accesses current runtime environment by calling the <code>Runtime.getRuntime()<\/code> static method and prints out the amount of free heap available to running JVM (in bytes). The following sample output is going to appear on the console:<\/p>\n<pre class=\"brush:bash\">Book 'Programming Groovy 2' is written by Venkat Subramaniam\nBook 'Making Java Groovy' is written by Ken Kousen\nExecuted by GroovyScriptEngineImpl\nFree memory (bytes): 153427528<\/pre>\n<p>It has been 10 years since <strong>Groovy<\/strong> was introduced. It quickly became very popular because of the innovative language features, similar to Java syntax and great interoperability with existing Java code. It may look like introduction of lambdas and Stream API in Java 8 has made <strong>Groovy<\/strong> a bit less appealing choice, however it is still widely used by Java developers.<br \/>\n[ulp id=&#8217;w6F4W4SAMiyTapBF&#8217;]<br \/>\n&nbsp;<\/p>\n<h2><a name=\"six\"><\/a>6. Ruby on JVM<\/h2>\n<p>Couple of years ago <strong>Ruby<\/strong> (<a href=\"https:\/\/www.ruby-lang.org\/en\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.ruby-lang.org\/en\/<\/a>) was the most popular dynamic language used for web application development. Even though its popularity has somewhat shaded away nowadays, <strong>Ruby<\/strong> and its ecosystem brought a lot of innovations into modern web applications development, inspiring the creation and evolution of many other programming languages and frameworks. <\/p>\n<p><strong>JRuby <\/strong>(<a href=\"http:\/\/jruby.org\/\" target=\"_blank\" rel=\"noopener\">http:\/\/jruby.org\/<\/a>) is an implementation of the <strong>Ruby<\/strong> programming language for JVM platform. Similarly to <strong>Groovy<\/strong>, it also provides great interoperability with existing Java code preserving the beauty of the <strong>Ruby<\/strong> language syntax.<\/p>\n<p>Let us rewrite the <strong>Groovy<\/strong> script from the <a href=\"#five\">Groovy on JVM<\/a> section in <strong>Ruby<\/strong> language (with name <strong>script.jruby<\/strong>) and evaluate it using the Java scripting API.<\/p>\n<pre class=\"brush:java\">$books.each do |it| \n    java.lang.System.out.println( \"Book '\" + it.title + \"' is written by \" + it.author )\nend\n\njava.lang.System.out.println( \"Executed by \" + $engine.getClass().simpleName )\njava.lang.System.out.println( \"Free memory (bytes): \" +   \n        java.lang.Runtime.getRuntime().freeMemory().to_s )<\/pre>\n<p>The script evaluation codes stays mostly the same, except different scripting engine and the sample books collection, which is now all about <strong>Ruby<\/strong>.<\/p>\n<pre class=\"brush:java\">final ScriptEngineManager factory = new ScriptEngineManager();\nfinal ScriptEngine engine = factory.getEngineByName( \"jruby\" );\n\t    \nfinal Collection&lt; Book &gt; books = Arrays.asList(\n\tnew Book( \"Sandi Metz\", \"Practical Object-Oriented Design in Ruby\" ),\n\tnew Book( \"Paolo Perrotta\", \"Metaprogramming Ruby 2\" )\n    );\n\t            \nfinal Bindings bindings = engine.createBindings();\nbindings.put( \"books\", books );\nbindings.put( \"engine\", engine );\n        \ntry( final Reader reader = new InputStreamReader( \n        Book.class.getResourceAsStream(\"\/script.jruby\" ) ) ) {\n    engine.eval( reader, bindings );        \n}<\/pre>\n<p>The following sample output is going to appear on the console:<\/p>\n<pre class=\"brush:bash\">Book 'Practical Object-Oriented Design in Ruby' is written by Sandi Metz\nBook 'Metaprogramming Ruby 2' is written by Paolo Perrotta\nExecuted by JRubyEngine\nFree memory (bytes): 142717584<\/pre>\n<p>As we can figure out from the <strong>JRuby<\/strong> code snippet above, using the classes from standard Java library is a bit verbose and have to be prefixed by package name (there are some tricks to get rid of that but we are not going in such specific details).<\/p>\n<h2><a name=\"seven\"><\/a>7. Python on JVM<\/h2>\n<p>Our last but not least example is going to showcase the <strong>Python<\/strong> (<a href=\"https:\/\/www.python.org\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.python.org\/<\/a>) language implementation on JVM platform, which is called <strong>Jython <\/strong>(<a href=\"http:\/\/www.jython.org\/\" target=\"_blank\" rel=\"noopener\">http:\/\/www.jython.org\/<\/a>). <\/p>\n<p>The <strong>Python<\/strong> language has gained a lot of traction recently and its popularity is growing every day. It is widely used by the scientific community and has a large set of libraries and frameworks, ranging from web development to natural language processing. <\/p>\n<p>Following the same path as with <strong>Ruby<\/strong>, we are going to rewrite the example script from <a href=\"#five\">Groovy on JVM<\/a> section using <strong>Python<\/strong> language (with name <strong>script.py<\/strong>) and evaluate it using the Java scripting API.<\/p>\n<pre class=\"brush:java\">from java.lang import Runtime\n\nfor it in books: \n    print \"Book '%s' is written by %s\" % (it.title, it.author)\n\nprint \"Executed by \" + engine.getClass().simpleName\nprint \"Free memory (bytes): \" + str( Runtime.getRuntime().freeMemory() )<\/pre>\n<p>Let us instantiate the <strong>Jython<\/strong> scripting engine and execute the <strong>Python<\/strong> script above using already familiar Java scripting API.<\/p>\n<pre class=\"brush:java\">final ScriptEngineManager factory = new ScriptEngineManager();\nfinal ScriptEngine engine = factory.getEngineByName( \"jython\" );\n\t    \nfinal Collection&lt; Book &gt; books = Arrays.asList(\n        new Book( \"Mark Lutz\", \"Learning Python\" ),\n        new Book( \"Jamie Chan\", \"Learn Python in One Day and Learn It Well\" )\n    );\n\t            \nfinal Bindings bindings = engine.createBindings();\nbindings.put( \"books\", books );\nbindings.put( \"engine\", engine );\n        \ntry( final Reader reader = new InputStreamReader( \n        Book.class.getResourceAsStream(\"\/script.py\" ) ) ) {\n    engine.eval( reader, bindings );        \n}\n<\/pre>\n<p>The following sample output will be printed out on the console:<\/p>\n<pre class=\"brush:bash\">Book 'Learning Python' is written by Mark Lutz\nBook 'Learn Python in One Day and Learn It Well' is written by Jamie Chan\nExecuted by PyScriptEngine\nFree memory (bytes): 132743352<\/pre>\n<p>The power of <strong>Python<\/strong> as a programming language is in its simplicity and steep learning curve. With an army of <strong>Python<\/strong> developers out there, the ability to integrate the <strong>Python<\/strong> scripting language into your Java applications as some kind of extensibility mechanism may sound like an interesting idea.<\/p>\n<h2><a name=\"eight\"><\/a>8. Using Scripting API<\/h2>\n<p>The Java <strong>scripting API<\/strong> is a great way to enrich your Java applications with extensible scripting support, just pick your language. It is also the simplest way to plug in <strong>domain-specific languages<\/strong> (DSLs) and allows the business experts to express their intentions in the most convenient manner.<\/p>\n<p>The latest changes in the JVM itself (see please <a href=\"#two\">Dynamic Languages Support<\/a> section) made it much friendlier runtime platform for different dynamic (scripting) languages implementations. No doubts, more and more scripting language engines will be available in the future, opening the door to seamless integration with new and existing Java applications.<\/p>\n<h2><a name=\"nine\"><\/a>9. What\u2019s next<\/h2>\n<p>Beginning from this part we are really starting the discussions about advanced concepts of Java as a language and JVM as excellent runtime execution platform. In the next part of the tutorial we are going to look at the Java Compiler API and the Java Compiler Tree API to learn how to manipulate Java sources at runtime.<\/p>\n<h2><a name=\"ten\"><\/a>9. Download Code<\/h2>\n<p>This was a lesson of <strong>Dynamic Language Support<\/strong>, part 12 of <strong>Advanced Java course<\/strong>. You may download the source code here: <strong><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2015\/09\/advanced-java-part-12.zip\">advanced-java-part-12<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article is part of our Academy Course titled Advanced Java. This course is designed to help you make the most effective use of Java. It discusses advanced topics, including object creation, concurrency, serialization, reflection and many more. It will guide you through your journey to Java mastery! Check it out here! Table Of Contents &hellip;<\/p>\n","protected":false},"author":141,"featured_media":148,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[343,88,580,557,65],"class_list":["post-43728","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-core-java","tag-annotations","tag-concurrency","tag-generics","tag-reflection","tag-serialization"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Dynamic languages support - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"This article is part of our Academy Course titled Advanced Java. This course is designed to help you make the most effective use of Java. It discusses\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dynamic languages support - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"This article is part of our Academy Course titled Advanced Java. This course is designed to help you make the most effective use of Java. It discusses\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2015-09-18T18:52:44+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-06T12:22:59+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Andrey Redko\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andrey Redko\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html\"},\"author\":{\"name\":\"Andrey Redko\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/771a6504862edc45322776832cbce413\"},\"headline\":\"Dynamic languages support\",\"datePublished\":\"2015-09-18T18:52:44+00:00\",\"dateModified\":\"2023-12-06T12:22:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html\"},\"wordCount\":1697,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"keywords\":[\"Annotations\",\"Concurrency\",\"Generics\",\"Reflection\",\"Serialization\"],\"articleSection\":[\"Core Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html\",\"name\":\"Dynamic languages support - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"datePublished\":\"2015-09-18T18:52:44+00:00\",\"dateModified\":\"2023-12-06T12:22:59+00:00\",\"description\":\"This article is part of our Academy Course titled Advanced Java. This course is designed to help you make the most effective use of Java. It discusses\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/java-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2015\\\/09\\\/dynamic-languages-support.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Core Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/core-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Dynamic languages support\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/771a6504862edc45322776832cbce413\",\"name\":\"Andrey Redko\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g\",\"caption\":\"Andrey Redko\"},\"description\":\"Andriy is a well-grounded software developer with more then 12 years of practical experience using Java\\\/EE, C#\\\/.NET, C++, Groovy, Ruby, functional programming (Scala), databases (MySQL, PostgreSQL, Oracle) and NoSQL solutions (MongoDB, Redis).\",\"sameAs\":[\"http:\\\/\\\/aredko.blogspot.com\\\/\",\"http:\\\/\\\/ca.linkedin.com\\\/in\\\/aredko\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/andrey-redko\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Dynamic languages support - Java Code Geeks","description":"This article is part of our Academy Course titled Advanced Java. This course is designed to help you make the most effective use of Java. It discusses","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html","og_locale":"en_US","og_type":"article","og_title":"Dynamic languages support - Java Code Geeks","og_description":"This article is part of our Academy Course titled Advanced Java. This course is designed to help you make the most effective use of Java. It discusses","og_url":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2015-09-18T18:52:44+00:00","article_modified_time":"2023-12-06T12:22:59+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","type":"image\/jpeg"}],"author":"Andrey Redko","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Andrey Redko","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html"},"author":{"name":"Andrey Redko","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/771a6504862edc45322776832cbce413"},"headline":"Dynamic languages support","datePublished":"2015-09-18T18:52:44+00:00","dateModified":"2023-12-06T12:22:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html"},"wordCount":1697,"commentCount":0,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","keywords":["Annotations","Concurrency","Generics","Reflection","Serialization"],"articleSection":["Core Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html","url":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html","name":"Dynamic languages support - Java Code Geeks","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","datePublished":"2015-09-18T18:52:44+00:00","dateModified":"2023-12-06T12:22:59+00:00","description":"This article is part of our Academy Course titled Advanced Java. This course is designed to help you make the most effective use of Java. It discusses","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/java-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2015\/09\/dynamic-languages-support.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Core Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/core-java"},{"@type":"ListItem","position":4,"name":"Dynamic languages support"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/771a6504862edc45322776832cbce413","name":"Andrey Redko","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/16419ce8394173028eddaeb992859862bab50cfcf74589fa9bb9a3dd8bb27518?s=96&d=mm&r=g","caption":"Andrey Redko"},"description":"Andriy is a well-grounded software developer with more then 12 years of practical experience using Java\/EE, C#\/.NET, C++, Groovy, Ruby, functional programming (Scala), databases (MySQL, PostgreSQL, Oracle) and NoSQL solutions (MongoDB, Redis).","sameAs":["http:\/\/aredko.blogspot.com\/","http:\/\/ca.linkedin.com\/in\/aredko"],"url":"https:\/\/www.javacodegeeks.com\/author\/andrey-redko"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/43728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/141"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=43728"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/43728\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/148"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=43728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=43728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=43728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}