Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 35 Next »

This article is being pulled from the Getting Started and Manual Eclipse Java Tomcat Setup documents from www.tinframework.homeip.net.

The BonsaiFramework uses a portable development environment that is composed of the following components,

  • Eclipse
  • Java
  • Tomcat

To get quickly started download the package that matches your operating system.

Package

Operating Systems

Win.32bit_Eclipse.x.x-JRE.1.6_18_32-bit-Tomcat.6.0.26_x86_32-bit.zip

Windows XP - Windows 7

Win.64bit_Eclipse.x.x-JRE.1.6_18_64-bit-Tomcat.6.0.26_x86_32-bit.zip

Windows 64-bit XP - Windows 7

Linux_Eclipse.x.x-JRE.1.6_18_32-bit-Tomcat.6.0.26.zip

Ubuntu 8.x - Current

Win.64bit_Eclipse.x.x-JRE.1.6_18_64-bit-Tomcat.6.0.26_x86_32-bit

Ubuntu 64-bit 8.x - Current

Let's try and do Eclipse using Java 64 but then have Tomcat 32-bit use Java 32-bit.

Unzip the package and launch Eclipse.

Following the portability principle of the Bonsai Framework there is not installer and the software is not isolated from the operating system.

The remainder of this document provides details about how to build/adjust the portable environment yourself. These same instructions should also work for the SpringSource Tool Suite.

Eclipse Setup

Download Eclipse IDE for Java EE Developers.

Select Location

Select a drive and directory your computer where you will be keeping everything. The Bonsai Framework uses,

  • Windows = C:\apps\
  • Linux or Unix = /home/[your home directory]/apps for example, /home/tpham/apps/

Setup Package Java

Download Oracle's JRE (Java Runtime Environment) and follow the manual Java setup instructions.

Move the Java folder into your eclipse directory. For example,

  • Windows = C:\apps\eclipse\jre1.6.0_18
  • Linux or Unix = /home/tpham/apps/eclipse/jre1.6.0_18

Modify eclipse.ini

Modify the eclipse.ini to point to your JRE with by adding -vm and a reference to Java.

Two key thing to keep in mind,

  1. You can not mix 32-bit and 64-bit. For example, running Eclipse 32-bit and Java 64-bit will not work.
  2. Placement of the -vm option is very important. The -vm option must occur before the -vmargs option

Here is an example of what the eclipse.ini would look like for Windows,

-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
jre1.6.0_18\bin\javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

Here is an example of eclipse.ini for Unix or Linux,

-startuplugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar--launcher.library-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.1.2.R36x_v20101019_1345
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
jre1.6.0_18/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m

Setup Tomcat

Similar to Eclipse, Tomcat also is also packaged without an installer. For windows we download the x86 .zip and for Linux or Unix download the .tar.gz file. Following the Bonsai Framework standards, decompress to the following folder,

  • C:\apps\eclipse\apache-tomcat-6.0.24
  • /home/tpham/apps/eclipse/apache-tomcat-6.0.24

Launch Eclipse

...

Configure Eclipse to Use Tomcat

...

Configure Eclipse Editor for UTF-8

On a Linux environment the Text file encoding will already default to UTF-8 so you can skip this step.

On the Windows environment, the default encoding is not UTF-8. As such modification need to be made ensure special characters work properly.

Enable UTF-8 for Java Files

All our property files must be UTF-8 with no BOM (Byte Order Marking). For Eclipse to properly edit the UTF-8 property files,

  • Window, Preferences
  • General, Content Types, Text,
    • Java Properties File
      • Change Default encoding from ISO-8859-1 to UTF-8
      • Click Update
    • JSP
      • Change Default encoding from ISO-8859-1 to UTF-8
      • Click Update
  • General, Workspace *
    • Text file encoding, Other
    • Change Cp1252(this may differ depending on your OS)  to UTF-8
    • Click Apply

Enable UTF-8 for Web Files

This changes what format and automatic encoding tags used when you use Eclipse wizards to create web file.

  • Window, Preferences, Web
  • Encoding, change the following to ISO 10646/Unicode(UTF-8),
    • CSS Files
    • HTML Files
    • JSP Files 

This article http://www.eclipsezone.com/eclipse/forums/t93442.rhtml shows how to do it with a file in Windows. I am a bit suspicious if this covers everything though... need to confirm.

Initial Project Setup

At this point there are two methods of setting up the Project, manual or automatic.

  • No labels