Table of Contents |
---|
Introduction
Having a a portable environment to easily share among developers using the zero footprint service approach if possible.
Warning |
---|
This article is being pulled from the Getting Started and Manual Eclipse Java Tomcat Setup documents from www.tinframework.homeip.net. There is a working implementation of this for SiteMesh at the SiteMesh Wiki. |
...
Warning |
---|
Let's try and do Eclipse using Java 64 but then have Tomcat 32-bit use Java 32-bit. |
Eclipse Setup
You want to download the portal (tar.gz for Linux, zip for Windows) version of Eclipse and not the installer.
...
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,
...
- Right click
- Select "Show Package Contents"
- Go into the "Eclipse" folder
Setup Package Java
Download Oracle's JRE (Java Runtime Environment) and follow the manual Java setup instructions.
...
- Windows = C:\apps\eclipse\jre1.6.0_18
- Linux or Unix = /home/tpham/apps/eclipse/opt/jre1.6.0_18
- Mac OS X = same as Linux
Modify eclipse.ini
Modify the eclipse.ini to point to your JRE with by adding -vm and a reference to Java.
...
For Mac OS X the jre line is slightly different and is unique to your own home directory,
Code Block | ||
---|---|---|
| ||
# --------------------------- # Start Bonsai Framework # ----------------------- # Use local version of Java. # Note, these lines must come just before -vmwargs -vm /Users/tin.pham/cmd/apps/eclipse/opt/java/jre1.68.0_18121.jre/Contents/Home/bin/java # ----------------------- # End Bonsai Framework # --------------------------- |
Launch Eclipse
Start Eclipse by running the Eclipse executable included with the release. In our example the directories would be,
- Windows = C:\apps\eclipse\eclipse.exe
- Linux or Unix = /home/tpham/apps/eclipse/eclipse
- Mac OS X = same as Linux
If using Mac OS X you will recieve receive an error due to modification of the eclipse.ini file,
Panel |
---|
“Eclipse.app” is damaged and can’t be opened. You should move it to the Trash. |
To fix this switch, open the There are two ways of fixing this.
Clicking to Add to GateKeeper Rules
By manually adding Eclipse, you can remove yourself in the future.
Open the mac terminal and type the following,,
Code Block | ||
---|---|---|
| ||
cdsu ~/apps spctl --add --label "Eclise" Eclipse.app # Eclipse.app is the Eclipse package. |
Actually, not sure if above fully worked. I tried and it did not seem to take. However, it started working after I I ended up switching to a root enabled account and disabling and enabling spctl. It may be adding below a step to reboot,
Code Block | ||
---|---|---|
| ||
sudo spctl --master-disable- setup.admin # My normal Mac User does not have sudo privileges, yours might. cd ~/apps/ sudo spctl --master-enabledisable |
Then the error message turns to,
Panel |
---|
“Eclipse.app” is an application downloaded from the Internet. Are you sure you want to open it? |
Click "open". Then enabling after it seems okThis will add Eclipse into the GateKeeper Rules and everything should start.
Then enable the protection again,
Code Block | ||
---|---|---|
| ||
sudo spctl --master-enable |
Now Eclipse will start properly.
When time permits, I will do a capture of the all registered rules to see exactly what the new rule fingerprint looks like and document the process here.
Manually Adding Eclipse to GateKeeper Rules
...
Note |
---|
This would be the preferred method but I found it did not quite work right. I noticed a typo so need to try again on a fresh machine. |
Open the mac terminal and type the following,
Code Block | ||
---|---|---|
| ||
su - setup.admin # My normal Mac User does not have sudo privileges, yours might.
spctl --add --label "eclipse" Eclipse.app # Eclipse.app is the Eclipse package. |
...
Look for the entry,
Code Block | ||
---|---|---|
| ||
su - setup.admin # My normal Mac User does not have sudo privileges, yours might. spctl --master-disable sudo list | grep -i "eclipse" |
You can remove the Eclipse by typing,
Code Block | ||
---|---|---|
| ||
su - setup.admin # My normal Mac User does not have sudo privileges, yours might. spctl --master-enable |
Restart the computer.
I need to test on a fresh machine before saying 100%.
remove --label "eclipse" Eclipse.app # Eclipse.app is the Eclipse package. |
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-servers\apache-tomcat-6.0.24
- /home/tpham/apps/eclipse-servers/apache-tomcat-6.0.24
Launch Eclipse
Start Eclipse by running the Eclipse executable included with the release. In our example the directories would be,
- Windows = C:\apps\eclipse\eclipse.exe
- Linux or Unix = /home/tpham/apps/eclipse/eclipse
Configure Eclipse to Use Tomcat
...
Ok this is where we have a problem. Once the Tomcat instance is created there seems to be no way to dynamically specify the various classpath entries... double-click on the server, Overview, Open Launch configuration, Classpath.
...