Installing and configuring Eclipse

Aus Salespoint

(Unterschied zwischen Versionen)
Wechseln zu: Navigation, Suche
(configure persistence.xml)
 
(Der Versionsvergleich bezieht 26 dazwischenliegende Versionen mit ein.)
Zeile 3: Zeile 3:
==download eclipse==
==download eclipse==
-
1.1 download "Eclipse IDE for Java EE Developers": [http://www.eclipse.org/downloads/ eclipse download website] <br>
+
===Windows===
-
1.2 extract the downloaded content wherever you want to have your programs (e.g. C:\Program Files); now your eclipse is "installed"
+
1. download "Eclipse IDE for Java EE Developers": [http://www.eclipse.org/downloads/ eclipse download website] <br>
 +
2. extract the downloaded content wherever you want to have your programs (e.g. C:\Program Files); now your eclipse is "installed"
 +
 
 +
===Mac OS X and Linux===
 +
* Download [http://eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/indigosr1 Eclipse IDE for Java EE Developers]
 +
* Extract the tarball to a destination of your choice. In the new "eclipse" directory, click "Eclipse" to start Eclipse. No further installation is necessary.
==configure Eclipse==
==configure Eclipse==
-
2.1 start your eclipse <br>
+
1. start your eclipse <br>
-
2.2 define a workspace: a place on your computer where you want to have your self programmed applications
+
2. define a workspace: a place on your computer where you want to have your self programmed applications
==install SVN==
==install SVN==
-
therefor please check out this [http://www.youtube.com/user/swtprak2010#p/u/15/KJ-MvcTditE video].
+
please check out this [http://www.youtube.com/user/swtprak2010#p/u/15/KJ-MvcTditE video].
==setup salepoint 5 project==
==setup salepoint 5 project==
 +
1.download: [http://www.example.com salespoint5.war]
 +
==get EclipseLink==
-
==get EclipsLink==
+
1. right click on your project --> Properties --> Project Facets <br>
 +
2. click "Convert to faceted form..." <br>
 +
3. set checkmarks at "Dynamic Web Module" and "JPA" <br>
 +
4. click "Further configuration required..." <br>
 +
5. select "Platform": "EclipseLink 2.3.x" <br>
 +
6. at "JPA implementation" select "Type": "User Library" and click on the small icon with the disk and the arrow who says “Download Library...” <br>
 +
7. select "EclipseLink 2.3.0” <br>
 +
8. click “Next” <br>
 +
9. accept the license, click “Finish” and wait until download has finished (sometimes it takes quite a while)<br>
-
5.1 right click on your project --> Properties --> JPA <br>
+
==create database connection==
-
5.2 select "Plattform": "EclipseLink 2.3.x" <br>
+
1. right click on your project --> Properties --> JPA <br>
-
5.3 in "JPA implementation" select "Type": "User Library" and click on the small symbol with the disk and the arrow which says “Download Library...” <br>
+
2. "Connection": "add Connection" <br>
-
5.4 select "EclipseLink 2.3.0” <br>
+
3. select "Derby" and enter a Name <br>
-
5.5 click “Next” <br>
+
4. click "Next" <br>
-
5.6 accept license and click “Finish”<br>
+
5. "Driver": click the small wheel which says "New Driver Definition" <br>
-
5.7 wait until download has finished<br>
+
6. select "Derby Embedded JDBC Driver" version 10.2 <br>
 +
7. click tab "JAR List" <br>
 +
8. add derby.jar from lib folder that comes whit the salespoint5.war file <br>
 +
9. click "ok", click "finish" <br>
==configure persistence.xml==
==configure persistence.xml==
 +
1. open your project --> src --> META-INF <br>
 +
2. if the folder does not contains an persistence.xml create a new one: right click on META-INF --> new --> other <br>
 +
type xml --> click "XML file" --> click "next" <br>
 +
name file: "persistence.xml" --> click "finish" <br>
 +
3. open persistence.xml <br>
 +
4. open tab "Source", overwrite existing code with the follow code
 +
<?xml version="1.0" encoding="UTF-8"?>
 +
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     
 +
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
 +
<persistence-unit name="SalespointFramework">
 +
</persistence-unit>
 +
</persistence>
 +
5. save persistence.xml and close it <br>
 +
6. open persistence.xml again <br>
 +
7. open tab "Connection" <br>
 +
8. select "Transaction type": "Resource Local" <br>
 +
9. click "Populate from connection..." below <br>
 +
10. select the connection you have created before and click "OK"
-
==create database connection==
+
==installing a server==
-
 
+
 +
<p> In this tutorial we use Tomcat as an sever, but you can use any server you like to use.</p>
 +
1. [http://tomcat.apache.org/download-70.cgi download Tomcat version 7] <br>
 +
2. extract/install Tomcat wherever you like to <br>
 +
3. open eclipse <br>
 +
4. click: "Windows" --> "Show View" --> "Other..." --> "Server" --> select "Servers" --> click "OK" <br>
 +
5. now somewhere in your Eclipse a Window that is called "Servers" must appear <br>
 +
6. right click in the "Servers" Window: "New"--> "Server" <br>
 +
7. select Apache --> the Tomcat server in the version you downloaded, here it is : "Tomcat v7.0 Server" <br>
 +
8. click next <br>
 +
9. "Tomcat installation directory": choose the folder you installed your tomcat before <br>
 +
10. click finish
==finally==
==finally==
now you should be able to start programming
now you should be able to start programming

Aktuelle Version vom 12:12, 12. Okt. 2011

back to tutorials

Inhaltsverzeichnis

download eclipse

Windows

1. download "Eclipse IDE for Java EE Developers": eclipse download website
2. extract the downloaded content wherever you want to have your programs (e.g. C:\Program Files); now your eclipse is "installed"

Mac OS X and Linux

  • Download Eclipse IDE for Java EE Developers
  • Extract the tarball to a destination of your choice. In the new "eclipse" directory, click "Eclipse" to start Eclipse. No further installation is necessary.

configure Eclipse

1. start your eclipse
2. define a workspace: a place on your computer where you want to have your self programmed applications

install SVN

please check out this video.

setup salepoint 5 project

1.download: salespoint5.war

get EclipseLink

1. right click on your project --> Properties --> Project Facets
2. click "Convert to faceted form..."
3. set checkmarks at "Dynamic Web Module" and "JPA"
4. click "Further configuration required..."
5. select "Platform": "EclipseLink 2.3.x"
6. at "JPA implementation" select "Type": "User Library" and click on the small icon with the disk and the arrow who says “Download Library...”
7. select "EclipseLink 2.3.0”
8. click “Next”
9. accept the license, click “Finish” and wait until download has finished (sometimes it takes quite a while)

create database connection

1. right click on your project --> Properties --> JPA
2. "Connection": "add Connection"
3. select "Derby" and enter a Name
4. click "Next"
5. "Driver": click the small wheel which says "New Driver Definition"
6. select "Derby Embedded JDBC Driver" version 10.2
7. click tab "JAR List"
8. add derby.jar from lib folder that comes whit the salespoint5.war file
9. click "ok", click "finish"

configure persistence.xml

1. open your project --> src --> META-INF
2. if the folder does not contains an persistence.xml create a new one: right click on META-INF --> new --> other
type xml --> click "XML file" --> click "next"
name file: "persistence.xml" --> click "finish"
3. open persistence.xml
4. open tab "Source", overwrite existing code with the follow code

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"      
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="SalespointFramework">
</persistence-unit>
</persistence>

5. save persistence.xml and close it
6. open persistence.xml again
7. open tab "Connection"
8. select "Transaction type": "Resource Local"
9. click "Populate from connection..." below
10. select the connection you have created before and click "OK"

installing a server

In this tutorial we use Tomcat as an sever, but you can use any server you like to use.

1. download Tomcat version 7
2. extract/install Tomcat wherever you like to
3. open eclipse
4. click: "Windows" --> "Show View" --> "Other..." --> "Server" --> select "Servers" --> click "OK"
5. now somewhere in your Eclipse a Window that is called "Servers" must appear
6. right click in the "Servers" Window: "New"--> "Server"
7. select Apache --> the Tomcat server in the version you downloaded, here it is : "Tomcat v7.0 Server"
8. click next
9. "Tomcat installation directory": choose the folder you installed your tomcat before
10. click finish

finally

now you should be able to start programming