Tbpgr Blog

Employee Experience Engineer tbpgr(てぃーびー) のブログ

Fantom | FantomをUbuntu1204にインストールしてHello World

概要

FantomをUbuntu1204にインストールしてHello World

詳細

FantomをUbuntu1204にインストールしてHello Worldします

手順
# JDKのインストール
apt-get update
sudo apt-get install openjdk-7-jre-headless

# インストール用ZIPを取得
wget http://fan.googlecode.com/files/fantom-1.0.65.zip
# インストール用ZIPを解凍
unzip fantom-1.0.65.zip

# セットアップ
PATH=$PATH:/home/vagrant/fantom-1.0.65/bin
bash /home/vagrant/fantom-1.0.65/adm/unixsetup

# テスト用クラスの編集
cat <<EOS>hoge.fan
#! /usr/bin/env fan
class Script {
  static Void main() {
     echo("hello world!")
  }
}
EOS

# 実行権限を付与して実行
chmod +x hoge.fan
./hoge.fan
hello world!