Setting Up JaxerJaxer in Aptana StudioTo simplify the development process, Aptana Studio includes Jaxer and you don't need to separately install or uninstall Jaxer. These instructions are for installing Jaxer on a machine on which Studio isn't or when a separate instance is desirable and generally speaking do not apply to using Jaxer inside Studio. All the other pages in this guide, except where explicitly noted, apply equally to using Jaxer standalone or in Studio. Download and InstallFirst download Jaxer OS-specific Installation Instructions
Samples and Tools: Bundled applications can be found in Updating to a New Version of JaxerThe standard Studio update process will let you know there's a newer version of Jaxer for Studio available. For the standalone Jaxer Package:
All your data and settings will be preserved as they aren't kept in the overwritten folder. Use Jaxer with an Existing Apache
Jaxer installs its own Apache instance, which should not interfere with an existing Apache install. However, should you prefer to use Jaxer with
an existing Apache instance, Jaxer comes with OS-specific httpd.conf files for Linux, Windows and OS X. You should use the version for your
operating system, including it with and include directive in the main Apache httpd.conf; including the file instead of copying the contents into
the main conf file means changes and updates will be much simpler. These files are located in the Windows: You'll need to edit the supplied conf file to enter path information specific to your installation; all the places requiring change can be found by searching the file for the string ${ and replacing the placeholder starting from the $ character and including the open and close braces and the string in between with the correct values. The specific tokens are:
Mac OS X: On this platform mod_jaxer is compiled as a 32 bit executable. If you are running a 64-bit Apache you need to recompile mod_jaxer to 64 bit mode, then copy the resulting .so file into /Applications/Aptana_Jaxer/jaxer/connectors. Grab the Jaxer Connectors source code first!
Using Jaxer with WAMP or XAMPPMethodology used in developing these instructions: download the WAMP or XAMPP package, install and test that it works, grab the Jaxer update (you don't need the Apache stuff for this) and then wire that into the default WAMP/XAMPP install. These instructions are Windows-specific, the key difference for OS X and Linux are to use the conf file and paths appropriate for your OS.
As the install location chosen is inline with the filesystem layout and different from the regular Jaxer setup, the logs and local_jaxer
folders are not in the standard location as a peer of the Jaxer folder, so we need to make a few changes to the shipped scripts. Edit
# As shipped if not defined JAXER_LOG_OUTPUT set JAXER_LOG_OUTPUT=%~dp0\..\logs\jaxer.log if not defined JAXER_TEMP set JAXER_TEMP=%~dp0\..\tmp if not defined JAXER_CFG set JAXER_CFG=%~dp0\..\local_jaxer\conf\JaxerManager.cfg # WAMP values if not defined JAXER_LOG_OUTPUT set JAXER_LOG_OUTPUT=%~dp0\..\..\logs\jaxer.log if not defined JAXER_TEMP set JAXER_TEMP=%~dp0\..\..\tmp if not defined JAXER_CFG set JAXER_CFG=%~dp0\..\..\local_jaxer\conf\JaxerManager.cfg
The conf and extension folder locations are defined in LOCAL_CONF_DIR: ('LOCAL_CONF_DIR' in Jaxer.Config) ? Jaxer.Config.LOCAL_CONF_DIR : "../../local_jaxer/conf", // It may have been set before this point, if you're in Jaxer Framework dev mode
LOCAL_EXTENSIONS_DIR: ('LOCAL_EXTENSIONS_DIR' in Jaxer.Config) ? Jaxer.Config.LOCAL_EXTENSIONS_DIR : "../../local_jaxer/extensions",
Finally, start Apache, run
At this point WAMP/XMP and Jaxer should be running together. If you want to serve content through the default www folder you'll need to add the Jaxer
processing directives to that entry in the base Preview Jaxer Apps in Studio with an External ServerOnce you've set up Jaxer to work with an external web server such as Apache, WAMP, XAMP or similar, you can configure Aptana Studio to take advantage of it for previews while you develop your applications. This requires a few configuration changes.
After you restart the Apache daemon, requests to http://localhost/studio/<PROJECTNAME> will now served by your server. Set up Jaxer as a Service/ServerFor production or even very heavy development phases you may prefer to have Jaxer running at all times rather than launching it manually, as described in the next section. You should understand that Jaxer must be started separately from Apache, configuring mod_jaxer alone is not sufficient. Running Jaxer as a service on Linux and OS X is no different from how you normally launch Jaxer except that you must set up a mechanism to ensure Jaxer runs when the computer is on. Also on Linux and OS X only, the user as which Jaxer runs must have write permissions on certain folders, especially for log files and folders in which any files the application itself writes are stored. WindowsWe include command line arguments in JaxerManager to install and uninstall Jaxer as a service, as well as start service and stop service commands. You can pass the full set of command line configuration options with the Install argument. JaxerManager -i[nstall] [JaxerManager options] JaxerManager -u[ninstall] JaxerManager -s[tart] JaxerManager -stop OS X
As shown in this image, to configure Lingon you simply enter a name (e.g., com.aptana.jaxer), the full path to the start script supplied with Jaxer (/Applications/Aptana_Jaxer/scripts/start.sh) and check the Run at startup or login option. LinuxThis is one area in which the distros differ greatly. We will post the more popular (among Jaxer developer community) distros but if you have instructions for another one please post it to the Installing and Configuring Jaxer forum and we'll add it here. Ubuntu and Red HatNote: These instructions should work for Ubuntu and other Debian-based distros and Red Hat and its kin, however, the further away you get... Slackware is apparently an example of too far away.
#!/bin/sh
#
# Aptana Jaxer initscript
#
case "$1" in
start)
echo "Starting jaxer..."
/opt/AptanaJaxer/scripts/start.sh
echo "Jaxer started."
;;
stop)
echo "Stopping jaxer..."
/opt/AptanaJaxer/scripts/stop.sh
echo "Jaxer stopped."
;;
force-reload|restart)
/opt/AptanaJaxer/scripts/stop.sh
echo "Jaxer stopped."
/opt/AptanaJaxer/scripts/start.sh
echo "Jaxer successfully restarted."
;;
*)
echo "Usage: /etc/init.d/jaxer {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0
You can now start, stop, or restart Jaxer by running /etc/init.d/jaxer {start|stop|restart}
Using the Service command
To control Jaxer using the Auto-launching Jaxer To set your server so Jaxer runs automatically at startup time, refer to the distro specific instructions in the following list.
Launching Jaxer
Launching starts Jaxer, JaxerManager and the Apache server, displays the Jaxer console, and opens the Jaxer Start Page in your default web browser. On OS X you also get the Jaxer Launcher window. First RunThe first time Jaxer runs several folders are created in Validate Your InstallationClick the Server Diagnostics link in the sidebar to run the diagnostics application. Good install results will look like this: Additional diagnostics
Content Visibility
Content placed inside the Aptana Jaxer/public directory is accessible from the root of the web server. For example, the contents of a folder named
test will be accessible from at Uninstalling JaxerDelete the TroubleshootingPort not availableThis error message occurs when a Jaxer package starts up and attempts bind to a port number already in use by another server or application, most commonly another instance of Apache. The Apache default port is 8081 and the Jaxer defaults are 4327 (used for Apache to talk to Jaxer) and 4328 (CLI port for talking to JaxerManager, also used by Aptana Studio). The three ports can be set in StartServers.bat on Windows and in <Jaxer install dir>/scripts/StartJaxer.sh on Linux and OS X, preferably just after the JAXER_LOG_OUTPUT setting; on OS X the default Apache port can be changed on the Jaxer Launcher preferences dialog. Port settings in StartServers.bat/StartJaxer.sh
set JAXER_APACHE_PORT=80 set JAXER_WEB_PORT=4327 set JAXER_COMMAND_PORT=4328 Linux DependenciesIf you're running a server or headless version of Linux and Jaxer will not start you're most likely missing certain required X/graphical libraries (our standards-based Mozilla core has dependencies although there is no actual rendering on screen); the simplest solution is to install Firefox using your distribution's package manager:
Dependencies not foundThe export LD_LIBRARY_PATH=/opt/AptanaJaxer/jaxer ldd /opt/AptanaJaxer/jaxer/jaxer CentOS 5.1 IssuesOn CentOS 5.1 if you see a stream of "Jaxer creation failed" messages when running start.sh from the command line, then you may need to install the sqlite and firefox-devel packages: yum install sqlite yum install firefox-devel Fedora 8 IssuesOn Fedora 8 if you get an error message about a missing libexpat.so.1 library, then you will need to create a symlink where libexpat.so.1 points to libexpat.so.0. ln -s /lib64/libexpat.so.0 /lib64/libexpat.so.1 Out of MemoryIf the Jaxer server crashes with an "Out of Memory" exception, you may have to increase the memory defaults. A simple way to do this would be to set no maximum limits for the Jaxer process. Run this command before starting Jaxer: ulimit -s unlimited Jaxer is not defined errorIf you see this message, check that your Jaxer server is running. If you're inside Aptana Studio, the Jaxer toolbar button should be showing the green light and if it's not click the toolbar button to restart Jaxer server. For standalone Jaxer, follow the Launch instructions for your operating system. Could not set System.homeFolder
On some system configurations, an error may be logged during startup when Jaxer tries to determine the location of the home folder. This may be caused by an
invalid or erroneous setting for the HOME environment variable. Make sure that the |


