Skip to content

Instantly share code, notes, and snippets.

@ianfairman
ianfairman / test_deps.xml
Created July 18, 2013 10:05
Basic maven test dependencies.
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
@ianfairman
ianfairman / HelloWorld.java
Last active March 22, 2016 14:32
JavaFX Examples
package helloworld;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
// http://docs.oracle.com/javase/8/javafx/get-started-tutorial/hello_world.htm
// https://blogs.oracle.com/randystuph/entry/injecting_jndi_datasources_for_junit
@BeforeClass
public static void setUpClass() throws Exception {
// rcarver - setup the jndi context and the datasource
try {
// Create initial context
System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.naming.java.javaURLContextFactory");
System.setProperty(Context.URL_PKG_PREFIXES,