Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
pluggablejs [2016/04/24 17:51]
Toni Corvera created
pluggablejs [2017/05/19 01:31] (current)
Toni Corvera [Hello world and pals] syntax highlighting and sample downloads
Line 48: Line 48:
 ==== Hello world and pals ==== ==== Hello world and pals ====
  
-<file+<​file ​javascript ​helloworld.js>
-// helloworld.js+
 out.println("​Hello World!"​) out.println("​Hello World!"​)
 </​file>​ </​file>​
  
-''​$ java -cp pluggablejs.jar net.outlyer.plugins.Shell helloworld.js''​+  ​$ java -cp pluggablejs.jar net.outlyer.plugins.Shell helloworld.js
   Hello World!   Hello World!
  
 ---- ----
  
-<file+<​file ​javascript ​namedhello.js>
-// namedhello.js+
 out.println("​Hello " + ui.prompt("​What'​s your name?"​)) out.println("​Hello " + ui.prompt("​What'​s your name?"​))
 </​file>​ </​file>​
  
-''​$ java -cp pluggablejs.jar net.outlyer.plugins.Shell namedhello.js''​+  ​$ java -cp pluggablejs.jar net.outlyer.plugins.Shell namedhello.js
   What's your name?: Toni   What's your name?: Toni
   Hello Toni   Hello Toni
Line 69: Line 67:
 ---- ----
  
-<file+<​file ​javascript ​hellobye.js>
-// hellobye.js+
 // Includes usage of callbacks and reference to variables defined later on // Includes usage of callbacks and reference to variables defined later on
 hooks.atexit(function() { hooks.atexit(function() {
Line 79: Line 76:
 </​file>​ </​file>​
  
-''​$ java -cp pluggablejs.jar net.outlyer.plugins.Shell hellobye.js''​+  ​$ java -cp pluggablejs.jar net.outlyer.plugins.Shell hellobye.js
   What's your name?: Toni   What's your name?: Toni
   Hello Toni!   Hello Toni!
Line 86: Line 83:
 ---- ----
  
-<file+<​file ​javascript ​plainjava.js>
-// plainjava.js+
 java.lang.System.out.println("​Hello world without wrapping"​);​ java.lang.System.out.println("​Hello world without wrapping"​);​
 </​file>​ </​file>​
-''​$ java -cp pluggablejs.jar net.outlyer.plugins.Shell plainjava.js''​+  ​$ java -cp pluggablejs.jar net.outlyer.plugins.Shell plainjava.js
   Hello world without wrapping   Hello world without wrapping
  
Line 100: Line 96:
  
 ---- ----
-<​html><​address style="​font-size:​small;​text-align:​right;">&​copy;​ 2008 Toni Corvera &​lt;​outlyer at gmail dot com&​gt;</​address></​html>​+<​html><​address style="​font-size:​small;​text-align:​right;​font-style:​italic">&​copy;​ 2008 Toni Corvera &​lt;​outlyer at gmail dot com&​gt;</​address></​html>​
  
  
All dates/times in this page are UTC.