Skip to main content

Menjalankan Javascript dari Java

import javax.script.*;
public class ExecuteScript {
public static void main(String[] args) throws Exception {
// create a script engine manager
ScriptEngineManager factory = new ScriptEngineManager();
// create a JavaScript engine
ScriptEngine engine = factory.getEngineByName("JavaScript");
// evaluate JavaScript code from String
engine.eval("print('Welcome to java world')");
}
}

thanks to : http://metoojava.wordpress.com/2010/06/20/execute-javascript-from-java/

Comments

I always have questions about running javascripts.. javascripts itself is very interesting but sometimes I find hard to understand.. Thanks you!

Popular posts from this blog

Langkah mudah membuat aplikasi sendiri di Facebook

konten diperbaharui karena sudah tidak relevan. Getting Started Websites Apps on Facebook Mobile Samples & How-Tos Videos Core Concepts Social Design Social Plugins Open Graph protocol Social Channels Authentication Graph API Advanced Topics Dialogs FQL Internationalization Ads API Credits API Chat API Legacy REST API Legacy FBML Legacy FBJS Legacy Javascript SDK SDKs & Tools Open Graph Beta -----iklan----- ----- lihat juga: >> Belajar Cara Membuat Software >> Contoh Source Code Aplikasi Facebook penasaran banget nih pingin nyobain bikin aplikasi di Facebook.com. perlu kalian tahu, kalo facebook udah menyediakan API yang bisa anda gunakan di aplikasi anda. fitur integrated seperti ini akan memberikan "kesan" seolah - olah kita tidak pernah beranjak dari facebook. projek sebuah aplikasi di facebook sepertinya akan menjadi hal yang menarik. Gath adam sudah membuat artikel tentang cara membuat apl...

Powerful job portal with university web integration

Creating a powerful job portal with university web integration involves combining cutting-edge technology, strategic partnerships, and a user-centric approach to bridge the gap between academia and industry. In this comprehensive explanation, I'll delve into the key components and benefits of such a platform.

Embracing Nostalgia: Exploring Retrogameplanet and the Joy of Playing Retro Games on the Web

In a world dominated by cutting-edge graphics and virtual reality experiences, there's a unique charm in revisiting the past. Retrogameplanet stands as a digital oasis, providing enthusiasts with a portal to relive the magic of classic games from bygone eras. As the name suggests, Retrogameplanet is more than just a website; it's a vibrant community and a haven for those who appreciate the simplicity and nostalgia associated with retro gaming.