SyntaxHighlighter

2012-10-17

JavaFX standalone application with external jar

To compile/build a JavaFX standalone application with external jar CORRECTLY.

with the code below, I get runtime exception as the others.

     <target name="-post-jfx-deploy">
        <fx:deploy width="${javafx.run.width}" height="${javafx.run.height}" 
                  nativeBundles="all"
                  outdir="${basedir}/${dist.dir}" outfile="${application.title}">
          <fx:application name="${application.title}" 
                          mainClass="${javafx.main.class}"/>
          <fx:resources>
              <fx:fileset dir="${basedir}/${dist.dir}" includes="*.jar"/>
              <fx:fileset dir="${basedir}/${dist.dir}/lib" includes="*.jar"/>
          </fx:resources>
          <fx:info title="${application.title}" 
                   vendor="${application.vendor}"/>
        </fx:deploy>
     </target>

but I fix it finally.
with the code below, the external jars go to the right location.
     <target name="-post-jfx-deploy">
        <fx:deploy width="${javafx.run.width}" height="${javafx.run.height}" 
                  nativeBundles="all"
                  outdir="${basedir}/${dist.dir}" outfile="${application.title}">
          <fx:application name="${application.title}" 
                          mainClass="${javafx.main.class}"/>
          <fx:resources>
              <fx:fileset dir="${basedir}/${dist.dir}" includes="*.jar"/>
              <fx:fileset dir="${basedir}/${dist.dir}" includes="lib/*.jar"/>
          </fx:resources>
          <fx:info title="${application.title}" 
                   vendor="${application.vendor}"/>
        </fx:deploy>
     </target>

All the thing I done is just set the external jar's dir and includes in to the correct way.
from
<fx:fileset dir="${basedir}/${dist.dir}/lib" includes="*.jar"/>
to
<fx:fileset dir="${basedir}/${dist.dir}" includes="lib/*.jar"/>

2012-10-09

JavaFX 2 MDI プログラム

基本的に、MDIは現時点でJavaFX自体ではできない。

けれど、swingと組み合わせると、何とかできる。

keyword: swing, JDesktopFrame, JInternalFrame, JApplet

具体的にいうと、swingアプリの中に、JFrameの中身をすべてJApplet経由でJavaFXを呼び出す。

swingの奥が深いなぁ

2012-09-19

GlassFish 文字化け

keyword: Java, Java EE, GlassFish, 文字化け

たまたまに遭遇した問題ですが。
Java EEでプログラムをデプロイすると、
プログラム自体は文字化けしないけど
レスポンスされると、内容が文字化けする。

何度もテストして、
結局内容はサーバーのsetResposeのところに問題があるようで。

glassfish-web.xmlの中にglassfish-web-appタグの中に
parameter-encodingを追加することにしたら解決。


<glassfish -web-app="-web-app" error-url="">  …  <parameter-encoding default-charset="UTF-8" /> </glassfish>
さて、引き続きプログラムを組むか…

2012-08-17

Doxygen

ソースコード分析用ソフト
大学の時に一度世話になりましたが、最近になってまた必要になってましたね…

一応リンクを張っておきます。使用方法は後ほど補完します。

http://www.stack.nl/~dimitri/doxygen/

人気の投稿