Build Instructions


1.  Introduction

This text describes general build instructions for compiling jwx!. Currently this text only describes build procedure on Linux platform. Build instructions for other platforms will be available soon.

Also read INTERNALS, if you want to build jwx! from the latest SVN sources.

2.  Platforms Supported by jwx!

jwx! will support only these platforms:
  • GTK (Unices)
  • MSW (Including 98/Me)
  • MAC (Mac OS X)
wxWidgets ports to these platforms are named wxGTK, wxMAC and wxMSW respectively, and provides several platform specific features. jwx! will never expose such unportable features to comply with `Write once, run anywhere` promise of Java.

Currently, I am working on the GTK port on my Debian system. I need your help for the MSW and MAC ports. Let me know if jwx! works on these platforms.

3. Releases

You should interpret jwx! version numbers as follows:

 0.0.x - Initial Alpha
 0.x.x - Initial Beta

You should not expect backward compatibility of these initial releases.

Once, jwx! becomes relatively stable and provides most GUI classes of wxWidgets framework, jwx! will follow same version scheme as wxWidgets library.

4.  Linux Installation

In order to build jwx! on Linux, you need followings:
  • jdk >= 1.4
  • ant >= 1.6
  • GCC >= 3.4
  • wxWidgets 2.6.3
Download jwx-0.0.2
Download wxWidgets-2.6.3

Build wxWidgets with GTK. I did this...
> cd /path/to/wxWidgets-2.6.3
> mkdir linux-build
> cd linux-build

> ../configure \
    --prefix=/opt/wx/2.6 \
    --enable-shared \
    --enable-postscript \
    --enable-display \
    --with-gtk \
    --with-opengl \
    --enable-rpath

> make
If you want UNICODE support, do that with --enable-unicode.

Now build jwx! as follows:
> export JAVA_HOME=/opt/jdk-1.5.0
> export ANT_HOME=/opt/ant-1.6
> export PATH=$PATH:$JAVA_HOME/bin:$ANT_HOME/bin:/opt/wx/2.6/bin

> cd /path/to/jwx/sources
> ant
This will build libjwx-core-0.0.2.so and Java sources. To create jar file run:
> ant dist
This will create jwx-core-0.0.2.jar in ../dist

To run the minimal sample application, do this:
> cd ../samples/minimal
> ant
Thats all. Explore the minimal sample code to see what is going on...

5.  Windows Installation

In order to build jwx! on Win32, you need followings:
  • jdk >= 1.4
  • ant >= 1.6
  • MinGW (GCC >= 3.4)
  • wxWidgets 2.6.3
I haven't did this yet, but followings might work:

Download jwx-0.0.2
Download wxWidgets-2.6.3

See wxWidgets build instructions for building wxWidgets as a shared library on Win32 platform using MinGW GCC.

Now build jwx! as follows:

edit build.properties found in sources subdirectory as...

make.exe=mingw32-make
make.file=makefile.mingw
jni.platform=win32

edit config.mingw appropriately

Do the followings:
> set JAVA_HOME=c:\jdk1.5.0
> set ANT_HOME=c:\ant-1.6
> set WXWIN=c:\path\to\wxWidgets-2.6.3
> set PATH=%JAVA_HOME%\bin;%ANT_HOME%\bin;c:\mingw\bin

> cd \path\to\jwx\sources
> ant
this will build jwx-core-0.0.2.dll and jwx! Java sources. To create jar file do this:
> ant dist
this will create jwx-core-0.0.2.jar in ../dist

To test the minimal sample application, do this:
> cd ../samples/minimal
> ant
Let me know if above procedure works, and of course also try other compilers like vc, bcc55 or watcom.

6.  Mac Installation

Thanks to `Anders F Björklund <afb@users.sourceforge.net>`, the maintainer of `wxd`, for providing Mac OS X build instructions.

In order to build jwx! on Mac OS X, you need followings:
  • jdk >= 1.4
  • ant >= 1.6
  • GCC >= 3.4
  • wxWidgets 2.6.3
  • JarBundler (http://sourceforge.net/projects/jarbundler/)
Build wxWidgets with Mac and optionally with Unicode support.
(--with-mac --with-opengl --enable-unicode)

Now build jwx! as follows:

edit build.properties found in sources subdirectory as...

jni.platform=macosx

Do the followings:
> export JAVA_HOME=/Library/Java/Home
> cd jwx/sources

> ant
This will build libjwx-core-0.0.2.jnilib and Java sources.

To create jar file do:
> ant dist
this will create jwx-core-0.0.2.jar in ../dist

To test the minimal sample application, do this:
> cd ../samples/minimal
> ant app



Thank you for trying jwx!.

- Amit G Mendapara <mr_amit@users.sourceforge.net>