2.0 Alpha 3 Release Notes
READ THIS Before You Build and Install
We have a source and binary releases now, and they are only known to work on win32
`Webclient 2.0 Alpha 3 depends on Mozilla 1.7. If you build webclient from source, you must first build Mozilla. For instructions on building Mozilla 1.7 please visit http://www.mozilla.org/build/.
Installing the 2.0 Release
Win32
This section explains how to install and run webclient using the win32 binary distribution.
Un-install any existing webclient installations.
Install JDK 1.4.2 from http://java.sun.com/j2se/1.4.2/download.html. Older JDKs may work but you're on your own for support.
Set the system environment variable JDKHOME to be the location where you installed the JRE. Note!!!, if you installed the JRE into a directory like
C:\Program Files\jdk1.4.2\JRE
, which contains spaces, you must use the funky ~1 convention for long filenames. That is,JDKHOME=C:\PROGRA~1\jdk1.4.2\JRE
-
Install Mozilla 1.7, from http://ftp.mozilla.org/pub/mozilla.org/mozilla/releases/mozilla1.7/mozilla-win32-1.7.zip. It's important to use the zip installer because the other installers put dependent libraries in places where webclient can't find them.
Run the browser installed in the previous step and configure any proxy settings you may need to operate the browser. Exit the browser.
Install Jakarta Apache Ant 1.6.1. If you don't know what ant is, you have no hope of building an application on top of webclient. Go learn about ant at http://ant.apache.org/ and come back when you do. Previous versions of ant had a problem with the javah target under JDK 1.4, so you must use 1.6.1 or later.
Download the binary at http://www.mozilla.org/projects/blackwood/webclient/bin/win32/webclient_2_0_a3_win32.zip. Unpack it into the same directory as your mozilla.exe from mozilla 1.7.
cd to the directory in which you unpacked the zip. Run the command
ant
. This will run the test browser. To get started developing, look at the source code for the test browser at http://lxr.mozilla.org/mozilla/source/java/webclient/test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java.
Building the 2.0 Alpha 3 Release
Build Instructions -- Cross Platform
This section explains the steps one has to perform before building 2.0 Alpha 3 on any platform.
Get the mozilla 1.7 source tarball.
Build Mozilla 1.7 WITH DEBUG ENABLED. For instructions on how to do that, go to http://www.mozilla.org/build/. Let's assume you built it into directory $MOZILLA.
Once Mozilla 1.7 is successfully built, you must run it to create a profile, then you must configure the proxy settings, if you are behind a firewall. If mozilla can't see external web pages, neither can webclient.
Install JDK 1.4.2 from http://java.sun.com/. We have made an effort to not have any Java2 specific usage in the webclient code, but we haven't tested webclient with older JDKs. It's likely that webclient will work with older JDKs, but some small tweaking may have to be done. There is a bug on this. See the Known Bugs section of this document.
Install Jakarta Apache Ant 1.6.1. If you don't know what ant is, you have no hope of building webclient from source. Go learn about ant at http://ant.apache.org/ and come back when you do. Previous versions of ant had a problem with the javah target under JDK 1.4, so you must use 1.6.1 or later.
Install JUnit 3.8.1. If you don't know what junit is, you have no hope of running the webclient unit tests, which one must run as a precondition to checkin. Learn about JUnit from http://www.junit.org/.
-
Obtain the source. You can use a source tarball, or check it out from CVS.
-
Unpack the webclient source, from http://www.mozilla.org/projects/blackwood/webclient/src/webclient-src-2_0_a3.zip into $MOZILLA.
Check out the webclient source from CVS. Follow the instructions at http://www.mozilla.org/catalog/development/compiling/cvs-sourcecode.html then checkout the CVS module called
Webclient
.This will give you the following directory hierarchy
$MOZILLA java/ build.xml config/ dom/ external/ util/ webclient/
-
In addition to the environment variables required for building mozilla, make sure the following environment variables are defined:
- JDKHOME, MOZ_JDKHOME, JAVA_HOME,
- all of the above must be set to the absolute path to your
JDK installation. For example,
C:\jdk1.3
- MOZILLA_FIVE_HOME
- the mozilla bin directory. For example,
D:\Projects\mozilla\dist\win32_d.obj\bin
- ANT_HOME
- the ant install directory. For example,
D:\Files_2k\apache-ant-1.6.1
- BUILD_WEBCLIENT_ONLY
- 1
- MOZ_SRC
- Set to the parent directory of your top level mozilla
directory, for example
D:\Projects\mozilla\MOZILLA_1_6
- XPCOM_DEBUG_BREAK
- warn
- NSPR_LOG_MODULES
- webclient:4,webclientstub:4
- NSPR_LOG_FILE
- logfile.txt
Make it so the native makefiles are generated.
prepend the contents of
$MOZILLA/java/makefiles
to theadd_makefiles
entry in the file$MOZILLA/allmakefiles.sh
.cd to $MOZILLA and re-run
./configure
. When this is done, you should have the following makefiles generated. If you don't, please post to the newsgroup.$MOZILLA java/ dom/jni/Makefile dom/src/Makefile webclient/src_moz/gtk/Makefile webclient/src_moz/Makefile webclient/src_ie/Makefile webclient/src_share/Makefile
create a $MOZILLA/java/build.properties file that contains the following contents:
# if this were unix, you'd have build.unix.classes=true build.win32.classes=true # this is where the .class files will end up build.home=D:\\Projects\\mozilla\\MOZILLA_1_4\\mozilla\\mozilla/dist/classes compile.debug=true junit.jar=D:\\Files_2k\\junit3.8.1\\junit.jar #native.waitForDebugger=true #debug.jvm.args=-Xdebug -Xrunjdwp:transport=dt_shmem,address=jdbconn,server=y,suspend=y
Build Instructions -- Win32
set MOZ_DEBUG=1 in your environment
set PATH so that it contains %JDKHOME%\bin, %JDKHOME%\jre\bin, %MOZ_TOOLS\bin, %MOZILLA_FIVE_HOME% and %MOZILLA_FIVE_HOME%/components.
Follow the instructions in Build Instructions -- Cross Platform
cd $MOZILLA\java
run the command
ant
This will build the mozilla util classes, the javaDOM, and webclient.Make sure mozilla is not running on your machine. cd $MOZILLA\java\webclient
run
ant test
. This will run the automated JUnit tests. If these all run successfully, you're in good shape.Still without mozilla running, run
ant run.test.browser
this will run a simple test browser, taken from the JDIC project.
Uninstalling the 2.0 Alpha 3 Build
Uninstalling if you're using the binary install
Stop any running mozilla or webclient instances
cd $MOZILLA_FIVE_HOME
rm -rf javadev
rm -rf *webclient* *javadom* *blackconnect* components/*javadom* components/*bcorb* components/*bcjava* components/*bcTest* components/*bcxpcom*
Uninstalling if you've built from Source
Cross Platform
Follow the instructions for removing mozilla in the mozilla 1.7 release notes.
cd $MOZILLA
rm -rf ./java
Unix
Do the cross platform uninstall.
cd $MOZILLA/dist/bin
rm libwebclient*.so libjavadomjni.so
Windows
Do the cross platform uninstall.
cd $MOZILLA\dist\WIN32_D.OBJ\bin
del webclient.dll javadomjni.dll
Available and Unavailable Features
New Features for This Release
Request header sniffing. See http://lxr.mozilla.org/mozilla/source/java/webclient/test/manual/src/classes/org/mozilla/webclient/test/TestBrowser.java for an example.
Support for java.awt.MouseListener. See http://lxr.mozilla.org/mozilla/source/java/webclient/test/automated/src/classes/org/mozilla/webclient/MouseListenerTest.java for an example.
Make webclient use its own prefs file. This enables one to run webclient and mozilla at the same time.
Fix focus problem where you couldn't type in text fields.
Support for java.awt.KeyListener. See http://lxr.mozilla.org/mozilla/source/java/webclient/test/automated/src/classes/org/mozilla/webclient/KeyListenerTest.java for an example.
Support for NewWindowListener. This makes it possible to correctly handle cases where the browser requests a new window. See http://lxr.mozilla.org/mozilla/source/java/webclient/test/automated/src/classes/org/mozilla/webclient/WindowCreatorTest.java for an example.
New Features from Previous Releases
This release has very limited features. The following methods are known to work.
BrowserControlFactory.setAppData() BrowserControlFactory.newBrowserControl() BrowserControlFactory.deleteBrowserControl() BrowserControlFactory.appTerminate() Bookmarks.getBookmarks() BrowserControl.queryInterface() for the following interfaces BrowserControl.BOOKMARKS_NAME BrowserControl.HISTORY_NAME BrowserControl.BROWSER_CONTROL_CANVAS_NAME BrowserControl.EVENT_REGISTRATION_NAME BrowserControl.NAVIGATION_NAME BrowserControl.CURRENT_PAGE_NAME BrowserControl.PREFERENCES_NAME BrowserControl.PROFILE_MANAGER_NAME EventRegistration.addDocumentLoadListener() EventRegistration.removeDocumentLoadListener() History.canBack() History.canForward() History.back() History.forward() Navigation.loadURL() Navigation.loadFromStream() Navigation.refresh() Navigation.stop() Navigation.post() Preferences.getPrefs() Preferences.setPref() Preferences.registerPrefChangedCallback() Preferences.unregisterPrefChangedCallback() ProfileManager.createNewProfile() ProfileManager.getProfileCount() ProfileManager.profileExists() ProfileManager.setCurrentProfile() ProfileManager.getProfileList() ProfileManager.renameProfile() ProfileManager.deleteProfile() CurrentPage.getSelection() CurrentPage.selectAll()
Known Issues
Browser and General Issues
Webclient hasn't yet been stress tested, so there are probably lots of issues that will come up with a little use.
Printing
Printing is not yet implemented.
Plugins
You can run plugins inside webclient, but on win32, the Java plugin will not work. You must remove the java plugin. Please see the section on installing the win32 binary in this file.
Bookmarks and History
Both the Bookmarks and History interfaces are incompletely implemented.
Profiles
If webclient is acting funny, it may be due to conflicting mozilla registry file. Follow the steps in the mozilla 1.7 release notes to remove the registry, then re-run mozilla 1.7 to generate a new registry.
Known Bugs
Can't do File->New Window on unix: Bug 156712. This one is a real stumper for me.
The freeze bug has been fixed!
Embedding apps can't setCurrentHistoryIndex. See http://bugzilla.mozilla.org/show_bug.cgi?id=47278
Webclient needs to be displayed to be used. See http://bugzilla.mozilla.org/show_bug.cgi?id=44075
For the complete list, follow this bugzilla link, or go to bugzilla's query page at http://bugzilla.mozilla.org/query.cgi and query for all bugs on the component "Java APIs to WebShell".