rapc

Description

Defines RAPC Ant task. 

RAPC Ant task utilizes BlackBerry rapc.exe compiler for building BlackBerry applications. Workspaces to be built shall be defined as nested "workspace" elements. Each nested workspace element describes a set of projects to be built. 

Parameters

AttributeDescriptionRequired
jdehomeRIM JDE home directory, e.g. "C:/Program Files/Research In Motion/BlackBerry JDE 4.0.2". Yes
javahomeJDK home directory, e.g. "C:/jdk1.4.0". javahome attribute shall be used if a workspace has to be compiled with another version of Java than is used on computer by default. For example, BlackBerry JDE up to 4.1 doesn't work with JDK 1.5 correctly (some source code can't be compiled). To solve this problem point javahome to directory with older JDK which is compatible with JDE (e.g. if JDK 1.4 is installed into directory "C:/jdk1.4.0" set attribute: javahome="C:/jdk1.4.0"). No; defaults to JDK which is used on this computer ("path" environment variable includes path to "bin" directory of this JDK)
nonunicodefixIf "true" - the fix of wrong system setting for non-Unicode application will be applied. That allows to compile BlackBerry projects which use string resources (.rrc, .rrh files) on operating systems where regional settings (selected language for non-Unicode programs) don't allow JDE to work correctly. E.g. if Ukrainian language is selected as a default language for non-Unicode programs it is not possible to compile projects containing .rrh file(s). Note: 1) JDE starting from version 4.1.0 doesn't suffer from that problem, because the way how textual resources are compiled has been changed; 2) Solution may not work on Windows prior to Windows XP. 

Usually setting this option to "true" allows you to compile BlackBerry projects which otherwise can't be compiled with error message saying something like that: 
Error loading class com.etaras.rapc.example1.HelloWorld?
Error!: Error: preverifier failed: C:\Program Files
	\Research In Motion\BlackBerry JDE 4.0.2\bin
	\preverify.exe -d C:\DOCUME~1\user\LOCAL ...

Details: if this option is either set to "true" or absent, and RAPC ant task detects that BlackBerry project can't be compiled in an ordinary way, it will create and execute "preverify.exe" in temporary folder, which fix the problem. preverify.exe which is created in temporary folder is only a wrapper around "real" preverify.exe which is used by rapc.exe compiler. The wrapper allows to skip preverifying of files with "wrong" names e.i. containing Unicode characters which can't be converted to 8-bit characters without losing of information (usually those characters are shown as '?' in console, that is why class name which mentioned in above error message contains character '?'). 

No; defaults to true

Nested elements

This node can nest following elements:
  • workspace. This elements is required
  • Examples

    Example 1

    This example demonstartes how to build existing workspace HelloWorld.jdw. 

    <project name="Hello world" default="build" basedir=".">
    
    	<taskdef name="rapc" classname="com.etaras.anttask.rapc.RAPC" 
    		classpath="anttask-rapc-1.8.jar"/>
    
    	<target name="build" description="Composes JDW">
    		<rapc jdehome="C:/Program Files/Research In Motion/BlackBerry JDE 4.0.2"
    			  javahome="C:/jdk1.4.0">
    			<workspace src="HelloWorld.jdw" />
    		</rapc>
    	</target>
    
    </project>

    Copyright © 2005-2006 eTaras.com. All rights Reserved.