How
can I improve
Application Developer/Eclipse startup time,
reduce swapping and eliminate unnecessary garbage collection?
Begin
by specifying the starting amount of memory (-vmargs -Xms###M) in your
Application Developer/Eclipse startup command line (e.g., the target
field within a Windows shortcut). If this is not specified, Eclipse's
starting amount of memory is quite small (only 64 MB - see
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/java.html and
scroll down until you find the -Xms option description), and can really
slow down your startup and initial usage time.
What happens with a small starting memory like 64 MB is that
the java virtual machine (and thus Eclipse)...
tries to use currently allocated memory (initially 64MB)
garbage collects several times
finally determines that it really needs more memory
allocates more memory incrementally
repeats this process until it reaches a steady state
If
you know you are going to use at least 128 MB or more, then try
specifying -Xms128M or larger as the starting memory. It should improve
your startup time and initial usage prior to swapping.
If you
are certain that you are going to swap, then at least try to reduce the
amount of time spent garbage collecting. For example, if Application
Developer/Eclipse has to live within 256 MB, then it may be spending
much of its time garbage collecting which appears like swapping
(application freezes or slows to a crawl for a while). You might try
specifying -Xmx384M as your maximum memory usage to reduce the amount
of garbage collecting. Even if you have many large applications running
simultaneously, you likely use one program for a while, then switch to
another, then after a while switch back. The key here is that using a
program for a while and ignoring the others, plus a larger maximum
memory for java (like 384 MB) lets Application Developer/Eclipse take
advantage of more physical memory and garbage collect less while the
other programs are swapped out. Obviously there's a trade off of
maximum memory for a program versus the physical memory available...
you'll have to find that "sweet spot" somewhere between 256MB and 1GB
for your machine.
What Operating Systems
does RCP
Packager support? RCP Packager and the installers it generates (or any bits you want),
currently run on Windows and Linux.
See the Eclipse forum threads below for more information on how to build your application for multiple platforms.
Can
RCP
Packager
generate installers for applications that are not
generated with RCP Developer? How?
RCP Packager can install *any* bits that you
want, be it an RCP application, Eclipse plugins, SWT
application, a Swing application, even a native Windows application.
(1) Follow parts 1 and 2 of the Generating
an Installer
portion of the tutorial to generate a new installer
application.
(2) Export your SWT code to the install-image directory in the format
that you would like it installed. The actual install-image directory
(e.g. C:\Documents and Settings\some-user-name\build\RCP\install-image)
can be found in the build-installer.xml Ant
script located in the new
installer project you generated in step (1) above.
property name="build.root"
location="C:\Documents
and Settings\some-user-name\build\RCP"
(3) Run the build-installer.xml Ant script as described in part 3 of
the Generating an Installer portion of
the
tutorial to generate the new installer containing your
application.
(4) Launch the installer generated by step (3) above located in the
product directory (e.g. C:\Documents and
Settings\some-user-name\build\RCP\product\my-installer.exe.
I'm getting errors trying to generate an installer, what should I do?
If RCP Packager fails to work properly (indicated by
throwing a random exception), it is more likely an installation
problem. Try the following:
Clean your Eclipse "configuration" directory (found in your eclipse home directory). If you are installing into Eclipse 3.1 or later, delete the "org.eclipse.*"
subdirectories in the "configuration" directory (they are recreated
at startup). Make sure that you do not delete the config.ini file.
Check that only one version of RCP Packager (one
set of *com.instantiations.packager.* plugins and features) is installed. If you have an
older version also installed (indicated by an earlier version
number), delete those plugins and features and repeat step number
one above. Make sure that you don't have RCP Packager installed
both locally within your Eclipse /plugins directory and
remotely through a .link file (check your Eclipse /links
directory).
Check your project for classpath problems and your
code for compilation problems.
Try refreshing and rebuilding your project using the
Project > Clean command.
If the problem persists, check your Eclipse ".log"
file (found in your <workspace>/.metadata directory) for any
recorded exceptions.
If Eclipse locks up repeatedly, you might try
running Eclipse with the -debug command line option. You can
then press Ctrl+Break in the console to look at the thread
dump which may show where the system is locking up. Send that thread
dump to us.
If
you're still having problems after checking all of the above,
send an email to support.
Please describe what you were doing when the exception occured. Also
please provide the Eclipse .log file, a test case and/or sreenshots as
appropriate.
First things first, make sure it's not an installation/configuration problem by following the suggestions in this FAQ entry.
If that doesn't help, try the following:
Make
sure you're running the latest version of RCP Developer. You can
download the latest version from the Instantiations website.
If this is *not* the first time you are trying to export the product, make sure the destination directory you specify in the Export RCP Product wizard corresponds with the root directory defined in the build.root property of the <user name>.properties file under the build-settings folder of your project.
Example: Destination Directory: C:\Documents and
Settings\James Q Coder\build\RCP\install-image
build.root directory:
C:\Documents and Settings\James Q Coder\build\RCP\
If
you want to change the destination directory, you can delete the
<user name>.properties file and it will be re-created with the
new destination directory.
If you are using a RCP Developer version prior to 2.5 and hava Java 1.5 specific constructs, please follow this workaround.
If none of these help, please email support with your log file and a test case if possible.
First off you have to get your files into the install image that the
installer is using. In the build-installer.xml file (this file was
generated by RCPDeveloper and is in the installer project) you have to
add the files to the install.jar file. This is done in the ant
target called build_installer. Find the section with comments
<!-- Assemble the installer JAR -->. Add a zipfileset that
collects the files needed to run your RCP to the <zip
...</zip> Ant task. (use the zipfileset because you can specify
where in the zip file your files go).
You will then have to create an operation to move the files from the
unzipped location to the correct location for the RCP to run. This
class will have to be a subclass of InstallOperation. In this class you
will override the run method to move the files from the unzip
location to the run time location. You may be able to use or extend the
class CopyFileOperation to do this instead of writing your own task.
Next you will have to get your operation in the list of operations to
be executed during the install. To do this find the
createInstallOperations method in the Java code created for your
installer (this file should be the only Java code in the src directory
under your installer project). At the end of the method will be a list
of step.add() method calls. At the end of this list add a new step.add()
with your class as the parameter.
After your code is built and the installer is run, it will execute your class to move the files to the proper location.