特殊:Badtitle/NS100:EclipseWebTools:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/EclipseWebTools}} | {{From|https://help.ubuntu.com/community/EclipseWebTools}} | ||
{{Languages|UbuntuHelp:EclipseWebTools}} | {{Languages|UbuntuHelp:EclipseWebTools}} | ||
== Eclipse Web Tools == | == Eclipse Web Tools == | ||
'''How to install Eclipse in Ubuntu'''. | '''How to install Eclipse in Ubuntu'''. | ||
Including Web tools, Apache Tomcat, Sun's JDK and icons | Including Web tools, Apache Tomcat, Sun's JDK and icons | ||
=== Convenient way for Ubuntu 6.10 === | === Convenient way for Ubuntu 6.10 === | ||
In Edgy (Ubuntu 6.10) most of the packages are now available through apt-get (or your preferred package manager like Synaptic or Adept) from the universe and multiverse repositories. Install the packages '''eclipse, sun-java5-jre and tomcat5.5'''. | In Edgy (Ubuntu 6.10) most of the packages are now available through apt-get (or your preferred package manager like Synaptic or Adept) from the universe and multiverse repositories. Install the packages '''eclipse, sun-java5-jre and tomcat5.5'''. | ||
Use the "'''update-java-alternatives'''" command to make sure that Sun's Java is the default. | Use the "'''update-java-alternatives'''" command to make sure that Sun's Java is the default. | ||
Once you have Eclipse up and running the WTP can be installed using Eclipse's own "Software Updates" mechanism: Go to "Help -> Software Updates -> Find and Install", select the "Callisto Discovery Site" and later the "Web and J2EE development" plugin group. Click "Select required" to automatically select all the dependencies. | Once you have Eclipse up and running the WTP can be installed using Eclipse's own "Software Updates" mechanism: Go to "Help -> Software Updates -> Find and Install", select the "Callisto Discovery Site" and later the "Web and J2EE development" plugin group. Click "Select required" to automatically select all the dependencies. | ||
You might want to install to "/usr/local/lib/eclipse" to make the plugins available for other users. | You might want to install to "/usr/local/lib/eclipse" to make the plugins available for other users. | ||
See below for details on Tomcat setup and Eclipse / Tomcat integration. | See below for details on Tomcat setup and Eclipse / Tomcat integration. | ||
=== Method for older Ubuntu versions === | === Method for older Ubuntu versions === | ||
This is based on a howto by IvarAbrahamsen and information gathered from many references. As the old university excuse goes: "Copy from one source is plagiarism, copy from two or more is research". | This is based on a howto by IvarAbrahamsen and information gathered from many references. As the old university excuse goes: "Copy from one source is plagiarism, copy from two or more is research". | ||
Ubuntu does come with many eclipse packages in the universal repositories. Unfortunately (or not) these all rely on the GCJ compiler, and not the genuine Sun one. Many still prefer Sun's java and this howto show how to use it. | Ubuntu does come with many eclipse packages in the universal repositories. Unfortunately (or not) these all rely on the GCJ compiler, and not the genuine Sun one. Many still prefer Sun's java and this howto show how to use it. | ||
Before Dapper, Ubuntu 6.06, Sun's licenses were not not compatible with Ubuntu's repositories and therefore had to be separately downloaded. From Dapper there are packages in the multiverse repository. This howto creates a .deb package from a download. | Before Dapper, Ubuntu 6.06, Sun's licenses were not not compatible with Ubuntu's repositories and therefore had to be separately downloaded. From Dapper there are packages in the multiverse repository. This howto creates a .deb package from a download. | ||
=== Download software === | === Download software === | ||
==== Sun JDK ==== | ==== Sun JDK ==== | ||
If you chose not to use the ''sun-java5'' package in multiverse, then download the latest JDK from Sun., which currenly is Tiger, 1.5. Choose the latest jdk update, and then choose the self extracting non rpm file, eg. jdk-1_5_0_06-linux-i586.bin | If you chose not to use the ''sun-java5'' package in multiverse, then download the latest JDK from Sun., which currenly is Tiger, 1.5. Choose the latest jdk update, and then choose the self extracting non rpm file, eg. jdk-1_5_0_06-linux-i586.bin | ||
http://java.sun.com/j2se/1.5.0/download.jsp | http://java.sun.com/j2se/1.5.0/download.jsp | ||
==== Eclipse Web Tools ==== | ==== Eclipse Web Tools ==== | ||
Download the latest release of web tools from eclipse. | Download the latest release of web tools from eclipse. | ||
I use the full package of release 1.0. E.g. wtp-all-in-one-sdk-1.0.2-linux-gtk.tar.gz. | I use the full package of release 1.0. E.g. wtp-all-in-one-sdk-1.0.2-linux-gtk.tar.gz. | ||
(Ps. its about 170Mb so might take awhile depending of bandwidth.) | (Ps. its about 170Mb so might take awhile depending of bandwidth.) | ||
http://download.eclipse.org/webtools/downloads/ | http://download.eclipse.org/webtools/downloads/ | ||
==== Apache Tomcat ==== | ==== Apache Tomcat ==== | ||
Fetch the latest apache tomcat binary. | Fetch the latest apache tomcat binary. | ||
Choose the core tar.gz file. | Choose the core tar.gz file. | ||
http://tomcat.apache.org/download-55.cgi | http://tomcat.apache.org/download-55.cgi | ||
=== Install packages === | === Install packages === | ||
See InstallingSoftware. | See InstallingSoftware. | ||
==== Sun's Java JDK ==== | ==== Sun's Java JDK ==== | ||
Either install from the repository or download and create your own packages. For Breezy users (and earlier), download is the only option. | Either install from the repository or download and create your own packages. For Breezy users (and earlier), download is the only option. | ||
===== Install from Repository ===== | ===== Install from Repository ===== | ||
Install the <code><nowiki>sun-java5</nowiki></code> package from <code><nowiki>multiverse</nowiki></code>. | Install the <code><nowiki>sun-java5</nowiki></code> package from <code><nowiki>multiverse</nowiki></code>. | ||
===== Download ===== | ===== Download ===== | ||
Install <code><nowiki>fakeroot</nowiki></code> and <code><nowiki>java-package</nowiki></code> from <code><nowiki>universe</nowiki></code> to be able to repackage the jdk as a <code><nowiki>.deb</nowiki></code>. | Install <code><nowiki>fakeroot</nowiki></code> and <code><nowiki>java-package</nowiki></code> from <code><nowiki>universe</nowiki></code> to be able to repackage the jdk as a <code><nowiki>.deb</nowiki></code>. | ||
Once that is done we create the <code><nowiki>.deb</nowiki></code> jdk package. | Once that is done we create the <code><nowiki>.deb</nowiki></code> jdk package. | ||
<pre><nowiki> | <pre><nowiki> | ||
fakeroot make-jpkg jdk-1_5_xxxx-linux-i586.bin | fakeroot make-jpkg jdk-1_5_xxxx-linux-i586.bin | ||
</nowiki></pre> | </nowiki></pre> | ||
Some interaction is required, and there will be the odd permission error etc, but should be fine. | Some interaction is required, and there will be the odd permission error etc, but should be fine. | ||
Then we install this new package | Then we install this new package | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo dpkg -i sun-j2sdk1.5xxxx+updatexxx_i386.deb | sudo dpkg -i sun-j2sdk1.5xxxx+updatexxx_i386.deb | ||
</nowiki></pre> | </nowiki></pre> | ||
Make Sun's Java your java... | Make Sun's Java your java... | ||
<pre><nowiki> | <pre><nowiki> | ||
sudo update-alternatives --config java | sudo update-alternatives --config java | ||
</nowiki></pre> | </nowiki></pre> | ||
Choose the Sun JDK | Choose the Sun JDK | ||
==== Apache Tomcat ==== | ==== Apache Tomcat ==== | ||
Untar download and copy to /opt | Untar download and copy to /opt | ||
<pre><nowiki> | <pre><nowiki> | ||
第95行: | 第60行: | ||
sudo ln -s apache-tomcat-5.5.15 tomcat | sudo ln -s apache-tomcat-5.5.15 tomcat | ||
</nowiki></pre> | </nowiki></pre> | ||
Edit tomcat users | Edit tomcat users | ||
<pre><nowiki> | <pre><nowiki> | ||
sudoedit /opt/tomcat/conf/tomcat-users.xml | sudoedit /opt/tomcat/conf/tomcat-users.xml | ||
</nowiki></pre> | </nowiki></pre> | ||
And add an admin and your own? | And add an admin and your own? | ||
<pre><nowiki> | <pre><nowiki> | ||
第106行: | 第69行: | ||
<user name="yourname" password="blah" roles="manager,admin" /> | <user name="yourname" password="blah" roles="manager,admin" /> | ||
</nowiki></pre> | </nowiki></pre> | ||
==== Eclipse ==== | ==== Eclipse ==== | ||
Extract the eclipse download and move to opt. | Extract the eclipse download and move to opt. | ||
<pre><nowiki> | <pre><nowiki> | ||
第116行: | 第77行: | ||
sudo chmod +x `sudo find eclipse -type d` | sudo chmod +x `sudo find eclipse -type d` | ||
</nowiki></pre> | </nowiki></pre> | ||
Then create an eclipse executable in your path | Then create an eclipse executable in your path | ||
<pre><nowiki> | <pre><nowiki> | ||
第123行: | 第83行: | ||
sudoedit /usr/bin/eclipse | sudoedit /usr/bin/eclipse | ||
</nowiki></pre> | </nowiki></pre> | ||
With this contents | With this contents | ||
<pre><nowiki> | <pre><nowiki> | ||
第129行: | 第88行: | ||
#export MOZILLA_FIVE_HOME="/usr/lib/mozilla/" | #export MOZILLA_FIVE_HOME="/usr/lib/mozilla/" | ||
export ECLIPSE_HOME="/opt/eclipse" | export ECLIPSE_HOME="/opt/eclipse" | ||
$ECLIPSE_HOME/eclipse $* | $ECLIPSE_HOME/eclipse $* | ||
</nowiki></pre> | </nowiki></pre> | ||
第136行: | 第94行: | ||
sudoedit /usr/share/applications/eclipse.desktop | sudoedit /usr/share/applications/eclipse.desktop | ||
</nowiki></pre> | </nowiki></pre> | ||
With this contents | With this contents | ||
<pre><nowiki> | <pre><nowiki> | ||
第150行: | 第107行: | ||
StartupNotify=true | StartupNotify=true | ||
</nowiki></pre> | </nowiki></pre> | ||
In dapper you have to give a bit of a kick to pick up the new folder in the menu. | In dapper you have to give a bit of a kick to pick up the new folder in the menu. | ||
Open ''Applications/Accessories/Alacarte Menu Editor'', | Open ''Applications/Accessories/Alacarte Menu Editor'', | ||
Go to ''Programming'' and click on Eclipse to hide then again to make it visible. | Go to ''Programming'' and click on Eclipse to hide then again to make it visible. | ||
This should make the folder show up in the menu. | This should make the folder show up in the menu. | ||
=== Finished === | === Finished === | ||
You now have a working eclipse. But run this command first to initialise the set up. | You now have a working eclipse. But run this command first to initialise the set up. | ||
<pre><nowiki> | <pre><nowiki> | ||
/opt/eclipse/eclipse -clean | /opt/eclipse/eclipse -clean | ||
</nowiki></pre> | </nowiki></pre> | ||
Then from here on you can run from the menu item applications/programming/eclipse | Then from here on you can run from the menu item applications/programming/eclipse | ||
=== Add Projects === | === Add Projects === | ||
Follow this tutorial to create web projects and to add tomcat as the server for this project, [http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html] | Follow this tutorial to create web projects and to add tomcat as the server for this project, [http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html] | ||
The Tomcat publishing is bothersome if your project structure is not a particular standard. IvarAbrahamsen have started a document on how to set up your projects. [http://flurdy.com/docs/eclipse/project.html] | The Tomcat publishing is bothersome if your project structure is not a particular standard. IvarAbrahamsen have started a document on how to set up your projects. [http://flurdy.com/docs/eclipse/project.html] | ||
=== References === | === References === | ||
* Ivar Abrahamsen's original howto http://flurdy.com/docs/eclipse/install.html | |||
* Java http://java.sun.com | |||
* Eclipse http://www.eclipse.org | |||
* Web Tools http://www.eclipse.org/webtools | |||
* Eclipse Callisto http://www.eclipse.org/callisto/java.php | |||
* Ubuntu Eclipse http://wiki.ubuntu.com/EclipseIDE | |||
* Apache Tomcat http://tomcat.apache.org | |||
* [http://blogs.sun.com/roller/page/coldrick?entry=java_development_on_ubuntu_part Coldrick blog] | |||
* [http://www.eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html Web Tools Tutorial] | |||
* [http://www.docuverse.com/blog/donpark/EntryViewPage.aspx?guid=f171bafc-abce-4d2e-a18b-3aba4ad32c52 Don Parks Daily Habit] | |||
* How to create generic projects in Eclipse http://flurdy.com/docs/eclipse/project.html | |||
---- | ---- | ||
[[category:CategoryDocumentation]] | [[category:CategoryDocumentation]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2007年11月30日 (五) 16:56的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/EclipseWebTools }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/af | • {{#if: UbuntuHelp:EclipseWebTools|Afrikaans| [[::EclipseWebTools/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/ar | • {{#if: UbuntuHelp:EclipseWebTools|العربية| [[::EclipseWebTools/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/az | • {{#if: UbuntuHelp:EclipseWebTools|azərbaycanca| [[::EclipseWebTools/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/bcc | • {{#if: UbuntuHelp:EclipseWebTools|جهلسری بلوچی| [[::EclipseWebTools/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/bg | • {{#if: UbuntuHelp:EclipseWebTools|български| [[::EclipseWebTools/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/br | • {{#if: UbuntuHelp:EclipseWebTools|brezhoneg| [[::EclipseWebTools/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/ca | • {{#if: UbuntuHelp:EclipseWebTools|català| [[::EclipseWebTools/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/cs | • {{#if: UbuntuHelp:EclipseWebTools|čeština| [[::EclipseWebTools/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/de | • {{#if: UbuntuHelp:EclipseWebTools|Deutsch| [[::EclipseWebTools/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/el | • {{#if: UbuntuHelp:EclipseWebTools|Ελληνικά| [[::EclipseWebTools/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/es | • {{#if: UbuntuHelp:EclipseWebTools|español| [[::EclipseWebTools/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/fa | • {{#if: UbuntuHelp:EclipseWebTools|فارسی| [[::EclipseWebTools/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/fi | • {{#if: UbuntuHelp:EclipseWebTools|suomi| [[::EclipseWebTools/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/fr | • {{#if: UbuntuHelp:EclipseWebTools|français| [[::EclipseWebTools/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/gu | • {{#if: UbuntuHelp:EclipseWebTools|ગુજરાતી| [[::EclipseWebTools/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/he | • {{#if: UbuntuHelp:EclipseWebTools|עברית| [[::EclipseWebTools/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/hu | • {{#if: UbuntuHelp:EclipseWebTools|magyar| [[::EclipseWebTools/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/id | • {{#if: UbuntuHelp:EclipseWebTools|Bahasa Indonesia| [[::EclipseWebTools/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/it | • {{#if: UbuntuHelp:EclipseWebTools|italiano| [[::EclipseWebTools/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/ja | • {{#if: UbuntuHelp:EclipseWebTools|日本語| [[::EclipseWebTools/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/ko | • {{#if: UbuntuHelp:EclipseWebTools|한국어| [[::EclipseWebTools/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/ksh | • {{#if: UbuntuHelp:EclipseWebTools|Ripoarisch| [[::EclipseWebTools/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/mr | • {{#if: UbuntuHelp:EclipseWebTools|मराठी| [[::EclipseWebTools/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/ms | • {{#if: UbuntuHelp:EclipseWebTools|Bahasa Melayu| [[::EclipseWebTools/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/nl | • {{#if: UbuntuHelp:EclipseWebTools|Nederlands| [[::EclipseWebTools/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/no | • {{#if: UbuntuHelp:EclipseWebTools|norsk| [[::EclipseWebTools/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/oc | • {{#if: UbuntuHelp:EclipseWebTools|occitan| [[::EclipseWebTools/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/pl | • {{#if: UbuntuHelp:EclipseWebTools|polski| [[::EclipseWebTools/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/pt | • {{#if: UbuntuHelp:EclipseWebTools|português| [[::EclipseWebTools/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/ro | • {{#if: UbuntuHelp:EclipseWebTools|română| [[::EclipseWebTools/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/ru | • {{#if: UbuntuHelp:EclipseWebTools|русский| [[::EclipseWebTools/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/si | • {{#if: UbuntuHelp:EclipseWebTools|සිංහල| [[::EclipseWebTools/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/sq | • {{#if: UbuntuHelp:EclipseWebTools|shqip| [[::EclipseWebTools/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/sr | • {{#if: UbuntuHelp:EclipseWebTools|српски / srpski| [[::EclipseWebTools/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/sv | • {{#if: UbuntuHelp:EclipseWebTools|svenska| [[::EclipseWebTools/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/th | • {{#if: UbuntuHelp:EclipseWebTools|ไทย| [[::EclipseWebTools/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/tr | • {{#if: UbuntuHelp:EclipseWebTools|Türkçe| [[::EclipseWebTools/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/vi | • {{#if: UbuntuHelp:EclipseWebTools|Tiếng Việt| [[::EclipseWebTools/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/yue | • {{#if: UbuntuHelp:EclipseWebTools|粵語| [[::EclipseWebTools/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/zh | • {{#if: UbuntuHelp:EclipseWebTools|中文| [[::EclipseWebTools/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/zh-hans | • {{#if: UbuntuHelp:EclipseWebTools|中文(简体)| [[::EclipseWebTools/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:EclipseWebTools | UbuntuHelp:EclipseWebTools | {{#if: | :}}EclipseWebTools}}/zh-hant | • {{#if: UbuntuHelp:EclipseWebTools|中文(繁體)| [[::EclipseWebTools/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:EclipseWebTools|:EclipseWebTools|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :EclipseWebTools/zh | | {{#ifexist: EclipseWebTools/zh | | {{#ifeq: {{#titleparts:EclipseWebTools|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:EclipseWebTools|1|-1|}} | zh | | }}
Eclipse Web Tools
How to install Eclipse in Ubuntu. Including Web tools, Apache Tomcat, Sun's JDK and icons
Convenient way for Ubuntu 6.10
In Edgy (Ubuntu 6.10) most of the packages are now available through apt-get (or your preferred package manager like Synaptic or Adept) from the universe and multiverse repositories. Install the packages eclipse, sun-java5-jre and tomcat5.5. Use the "update-java-alternatives" command to make sure that Sun's Java is the default. Once you have Eclipse up and running the WTP can be installed using Eclipse's own "Software Updates" mechanism: Go to "Help -> Software Updates -> Find and Install", select the "Callisto Discovery Site" and later the "Web and J2EE development" plugin group. Click "Select required" to automatically select all the dependencies. You might want to install to "/usr/local/lib/eclipse" to make the plugins available for other users. See below for details on Tomcat setup and Eclipse / Tomcat integration.
Method for older Ubuntu versions
This is based on a howto by IvarAbrahamsen and information gathered from many references. As the old university excuse goes: "Copy from one source is plagiarism, copy from two or more is research". Ubuntu does come with many eclipse packages in the universal repositories. Unfortunately (or not) these all rely on the GCJ compiler, and not the genuine Sun one. Many still prefer Sun's java and this howto show how to use it. Before Dapper, Ubuntu 6.06, Sun's licenses were not not compatible with Ubuntu's repositories and therefore had to be separately downloaded. From Dapper there are packages in the multiverse repository. This howto creates a .deb package from a download.
Download software
Sun JDK
If you chose not to use the sun-java5 package in multiverse, then download the latest JDK from Sun., which currenly is Tiger, 1.5. Choose the latest jdk update, and then choose the self extracting non rpm file, eg. jdk-1_5_0_06-linux-i586.bin http://java.sun.com/j2se/1.5.0/download.jsp
Eclipse Web Tools
Download the latest release of web tools from eclipse. I use the full package of release 1.0. E.g. wtp-all-in-one-sdk-1.0.2-linux-gtk.tar.gz. (Ps. its about 170Mb so might take awhile depending of bandwidth.) http://download.eclipse.org/webtools/downloads/
Apache Tomcat
Fetch the latest apache tomcat binary. Choose the core tar.gz file. http://tomcat.apache.org/download-55.cgi
Install packages
See InstallingSoftware.
Sun's Java JDK
Either install from the repository or download and create your own packages. For Breezy users (and earlier), download is the only option.
Install from Repository
Install the sun-java5
package from multiverse
.
Download
Install fakeroot
and java-package
from universe
to be able to repackage the jdk as a .deb
.
Once that is done we create the .deb
jdk package.
fakeroot make-jpkg jdk-1_5_xxxx-linux-i586.bin
Some interaction is required, and there will be the odd permission error etc, but should be fine. Then we install this new package
sudo dpkg -i sun-j2sdk1.5xxxx+updatexxx_i386.deb
Make Sun's Java your java...
sudo update-alternatives --config java
Choose the Sun JDK
Apache Tomcat
Untar download and copy to /opt
tar xzf apache-tomcat-5.5.15.tar.gz sudo mv apache-tomcat-5.5.15 /opt/ cd /opt sudo chown -R root:root apache-tomcat-5.5.15 sudo chmod -R +r apache-tomcat-5.5.15 sudo chmod +x `sudo find apache-tomcat-5.5.15 -type d` sudo ln -s apache-tomcat-5.5.15 tomcat
Edit tomcat users
sudoedit /opt/tomcat/conf/tomcat-users.xml
And add an admin and your own?
<user name="admin" password="admin" roles="manager,admin" /> <user name="yourname" password="blah" roles="manager,admin" />
Eclipse
Extract the eclipse download and move to opt.
tar xzf wtp-all-in-one-sdk-1.0-linux-gtk.tar.gz sudo mv eclipse /opt/eclipse cd /opt sudo chown -R root:root eclipse sudo chmod -R +r eclipse sudo chmod +x `sudo find eclipse -type d`
Then create an eclipse executable in your path
sudo touch /usr/bin/eclipse sudo chmod 755 /usr/bin/eclipse sudoedit /usr/bin/eclipse
With this contents
#!/bin/sh #export MOZILLA_FIVE_HOME="/usr/lib/mozilla/" export ECLIPSE_HOME="/opt/eclipse" $ECLIPSE_HOME/eclipse $*
Then create a gnome menu item
sudoedit /usr/share/applications/eclipse.desktop
With this contents
[Desktop Entry] Encoding=UTF-8 Name=Eclipse Comment=Eclipse IDE Exec=eclipse Icon=/opt/eclipse/icon.xpm Terminal=false Type=Application Categories=GNOME;Application;Development; StartupNotify=true
In dapper you have to give a bit of a kick to pick up the new folder in the menu. Open Applications/Accessories/Alacarte Menu Editor, Go to Programming and click on Eclipse to hide then again to make it visible. This should make the folder show up in the menu.
Finished
You now have a working eclipse. But run this command first to initialise the set up.
/opt/eclipse/eclipse -clean
Then from here on you can run from the menu item applications/programming/eclipse
Add Projects
Follow this tutorial to create web projects and to add tomcat as the server for this project, [1] The Tomcat publishing is bothersome if your project structure is not a particular standard. IvarAbrahamsen have started a document on how to set up your projects. [2]
References
- Ivar Abrahamsen's original howto http://flurdy.com/docs/eclipse/install.html
- Java http://java.sun.com
- Eclipse http://www.eclipse.org
- Web Tools http://www.eclipse.org/webtools
- Eclipse Callisto http://www.eclipse.org/callisto/java.php
- Ubuntu Eclipse http://wiki.ubuntu.com/EclipseIDE
- Apache Tomcat http://tomcat.apache.org
- Coldrick blog
- Web Tools Tutorial
- Don Parks Daily Habit
- How to create generic projects in Eclipse http://flurdy.com/docs/eclipse/project.html