Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "JRuby/SWTSnippets"

Line 3: Line 3:
 
From the above link: "Snippets are minimal stand-alone programs that demonstrate specific techniques or functionality. Often a small example is the easiest way to understand how to use a particular feature."
 
From the above link: "Snippets are minimal stand-alone programs that demonstrate specific techniques or functionality. Often a small example is the easiest way to understand how to use a particular feature."
  
For help setting up and running JRuby with SWT, see [[JRuby/SWTSetup]].
+
For help setting up and running JRuby with SWT, see [[JRuby/SWTSetup]]. To run one of the snippets, copy/paste the code to a file with the same name as the page, then run it with jruby.  For example:
 +
<pre>jruby Snippet1.rb</pre>
  
 
* [[JRuby/SWTSnippets/Snippet1.rb|"Hello World"]]
 
* [[JRuby/SWTSnippets/Snippet1.rb|"Hello World"]]

Revision as of 07:56, 28 July 2009

The SWT Snippets ported to JRuby.

From the above link: "Snippets are minimal stand-alone programs that demonstrate specific techniques or functionality. Often a small example is the easiest way to understand how to use a particular feature."

For help setting up and running JRuby with SWT, see JRuby/SWTSetup. To run one of the snippets, copy/paste the code to a file with the same name as the page, then run it with jruby. For example:

jruby Snippet1.rb

Copyright © Eclipse Foundation, Inc. All Rights Reserved.