2009年 2月 09日 月曜日
翻訳: OpenSolaris で JavaFX を
The Observatory からの翻訳です。OpenSolaris や Linux 用の NetBeans で使える JavaFX プラグインはなかなか正式リリースとなりませんが、このページで使う方法を紹介してくれています。
JavaFX isn't available for Linux and OpenSolaris yet. As to why, I suggest you read Josh Marinacci's blog: A Word on Linux and Solaris Support.
----------
JavaFX は、Linux や OpenSolaris ではまだ使うことができません。その理由については、Josh Marinacci's のブログ A Word on Linux and Solaris Support. を読んでください。
However, this hasn't stopped the community from documenting how to install JavaFX on Linux. And not surprisingly, those instructions work very well for OpenSolaris.
-----------
しかし、コミュニティでは、JavaFX を Linux にインストールする方法が書き続けられてきました。驚くことに、これらをちょっと変更するだけで、OpenSolais にインストール出来てしまうのです。
With some minor adjustments, here are the exact steps I to took to get the JavaFX SDK running in NetBeans on OpenSolaris.
------------
以下は、私が JavaFX SDK を OpenSolaris の NetNeans 上で使うために行った方法です。
Step 1. Install NetBeans
------------
ステップ1: NetNeans のインストール
The NetBeans IDE makes working with the JavaFX SDK much more enjoyable. You'll need NetBeans 6.5, if you don't already have it installed:
-------------
NetBeans IDE は、JavaFX SDK をもっと楽しいものにしてくれます。もしNetBeans をインストールしていないのなら、NetBeans は、6.5 を install しましょう。
bleonard@opensolaris:~$ pfexec pkg install netbeans
PHASE ITEMS
Indexing Packages 554/554
DOWNLOAD PKGS FILES XFER (MB)
Completed 22/22 5931/5931 204.40/204.40
PHASE ACTIONS
Install Phase 7387/7387
Reading Existing Index 9/9
Indexing Packages 22/22
Step 2. Downoad the NetBeans JavaFX Plugins
--------------
NetBeans JavaFX プラグインのダウンロード
The JavaFX Plugins can be found here: http://updates.netbeans.org/netbeans/updates/6.5/uc/final/stable/modules/javafx/. We'll use wget to download them:
---------------
JavaFX プラグインは、 http://updates.netbeans.org/netbeans/updates/6.5/uc/final/stable/modules/javafx にあります。wget を使ってダウンロードしました。
bleonard@opensolaris:~$ mkdir javafxnbms bleonard@opensolaris:~$ cd javafxnbms
bleonard@opensolaris:~/javafxnbms$ wget -r -l1 -np -nH --cut-dirs=9 -A.nbm http://updates.netbeans.org/netbeans/updates/6.5/uc/final/stable/modules/javafx
--12:02:12-- http://updates.netbeans.org/netbeans/updates/6.5/uc/final/stable/modules/javafx
=> `javafx'
Resolving updates.netbeans.org... 72.5.124.114
...
FINISHED --12:05:10--
Downloaded: 68,475,450 bytes in 25 files
Step 3: Install the JavaFX Plugins
----------------
ステップ 3: JavaFX プラグインのインストール
1. Start NetBeans and select Plugins from the Tools menu.
2. Select the Downloaded tab and click the Add Plugins... button
3. Browse to the javafxnbms directory, select all of the plugins and click OK.
4. Uncheck the JavaFX Weather Sample, JavaFX 1.0 and JavaFX Source Debug plugins. These plugins are leftovers from the Preview SDK and will fail to install. Your Plugins dialog should look as follows (click to zoom):
-----------------
1. NetBeans を起動し、「ツール」メニューから「プラグイン」を選択します。
2. 「ダウンロード」タブを選択し、「プラグインの追加」ボタンをクリックします。
3. javafxnbms ディレクトリをブラウズし、すべてのプラグインを選択して「OK」をクリックします。
4. JavaFX Weather Sample、JavaFX 1.0 および JavaFX Source Debug plugins のチェックを外します。これらのプラグインは、Preview SDK からの物で、インストールに失敗します。プラグインダイアログは以下のようになっているはずです。
5. Install the 18 selected plugins. When the plugin installation finishes, NetBeans will automatically restart. Don't worry about any exceptions you may see, because we haven't installed the SDK yet.
6. Quit NetBeans.
------------------
5. 選択された 18 個のプラグインをインストールします。プラグインのインストールが終了すると、NetBeans は自動的に再起動されます。例外が発生しても気にしないでください。まだ、SDK をインストールしていないのですから。
6. NetBeans を終了します。
Step 4: Install the JavaFX SDK
-------------------
JavaFX SDK をインストール
1. NetBeans plugin files (nbms) are standard zip archive files. One of the plugins downloaded was the SDK for OS X. Assuming you're still in the javafxnbms directory:
-------------------
NetBeans プラグインファイルは、zip アーカイブファイルです。ダウンロードされたプラグインうちの一つに、OS X 用の SDK があります。javafxnbms に移動して以下のアーカイブを解凍してください。
bleonard@opensolaris:~/javafxnbms$ unzip org-netbeans-modules-javafx-sdk-mac.nbm ...
inflating: main/main.properties inflating: main/org/netbeans/javafx/install/Install.class
2. Create a directory under NetBeans for the JDK.
--------------------
2. NetBeans 以下に SDK 用のディレクトリを作成
pfexec mkdir /usr/netbeans/javafx2
3. Copy the contents of the extracted plugin to NetBeans:
---------------------
3. 展開されたプラグインを作成したディレクトリにコピー
pfexec cp -r netbeans/* /usr/netbeans/javafx2/
4. Make the SDK's binaries executable:
----------------------
4. SDK バイナリに実行可能にする:
pfexec chmod +x /usr/netbeans/javafx2/javafx-sdk1.0/bin/*
Step 5: Learn/Play
-----------------------
ステップ 5: 試してみる
Start NetBeans. There are a bunch of JavaFX Sample projects. To create one, select File > New Project and then Samples > JavaFX under the categories. For example, here's the DisplayShelf (click to zoom):
-----------------------
NetBeans を起動します。「ファイル」-> 「新規プロジェクト」 -> 「サンプル」-> JavaFX から���サンプルを起動してみましょう。以下は、DisplayShelf の例です
To get started with learning JavaFX, check out the tutorials.
------------------------
JavaFX のはじめて使うのなら、チュートリアル から始めるのがいいでしょう。
Posted at 03:58午後 2 09, 2009 by kenji in JavaFX の素人 |