html5-img
1 / 152

It Takes Two to Tango – Java and Eclipse

JMP207. It Takes Two to Tango – Java and Eclipse. John Kidd – Kiddcorp, L.P. Paul T. Calhoun – NetNotes Solutions Unlimited, Inc. Your Presenters – This Is Us!. John Kidd President Kiddcorp, L.P.

bena
Download Presentation

It Takes Two to Tango – Java and Eclipse

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. JMP207 It Takes Two to Tango – Java and Eclipse John Kidd – Kiddcorp, L.P. Paul T. Calhoun – NetNotes Solutions Unlimited, Inc

  2. Your Presenters – This Is Us! John KiddPresidentKiddcorp, L.P. John Kidd is a recognized strategist, as well as a frequent speaker and author in the area of Java and J2EE technologies. John has more than 16 years experience in leading teams to deliver line of business applications for companies such as Belo, IBM/Lotus, Texas Instruments, and Advanced PCS. John has been an early adopter in delivering key technologies and delivery methods. He is a frequent speaker on IT strategies and a consultant for organizations developing open source strategies.

  3. Your Presenters – This Is Us! Paul T. CalhounChief Technology OfficerNetNotes Solutions Unlimited Paul Calhoun, ND 6,7 and 8 PCLI and PCLP,is a highly rated speaker who provides customer-focused knowledge transfer and consulting to Fortune 100 and 500 companies, as well as many SMBs. Paul currently builds Domino, Web, Java, and XML applications for his customers using Domino, Portlet Factory and WebSphere. He co-authored the IBM Redbook “XML Powered by Domino,” and has developed several online XML and Java programming courses. He has written articles for both “The View” and “The Sphere” technical publications.

  4. The Great Book Give Away • Compliments of O’Reilly Publishing • Please thank them by buying their books !!!! • If you want to participate in the book drawings • Place your Business card (or first and last name) in the container being passed around • We WILL NOT harvest contact information for ANY marketing purposes • We will draw the names during the Session

  5. Agenda • Roadmap • Eclipse, The Tool • Java language Fundamentals • Developing Java code In Eclipse • Develop and Deploy Lotus Domino Java code using the Eclipse development platform • Wrap Up

  6. Roadmap • I’ve said it before, so I’ll say it again !! • Learning Java™ is a lot like eating an Elephant !! • It’s a big job and there’s no clear place where to start !!

  7. Roadmap J2EE, XML Servlets, JSPs & JSFs Start Here! J2SE

  8. Roadmap • Start with J2SE (Java 2 STANDARD Edition) • This covers core Java functionality • Syntax • Data Types • Constructs • Core Classes • java.lang • java.io • java.net • etc. • Allow 3-6 Months http://java.sun.com/javase/index.jsp

  9. Roadmap • Learn XML (not part of Sun Certification) • XML Syntax • DTD/XML Schema • XSL • XSLT • XSL:FO • Finally jump on the J2EE bandwagon (In this order) • Servlets • JSPs • JSFs • Allow another 3-6 months • Then the rest of the J2EE specification • Allow another 3-6 months

  10. Roadmap • Start small • Java Agents in Domino • Graduate to Servlets • Agent Code transitioned to Servlets running on Domino • Incorporate an external Servlet/JSP engine • Apache w/Tomcat add-in (DSAPI Filters available) • JBOSS (DSAPI Filters available) • WebSphere Application Server (DSAPI Filters available) • Write JSP/JSF applications that access Domino data • Using Domino Custom JSP tags (Available since ND 6)

  11. Roadblocks • Road Blocks on your Journey to Learning Java • “Linear” thinking instead of thinking in “Objects” • Starting to learn Java with J2EE applications (Servlets, JSPs) • Trying to start with the Java Enterprise Technologies • Try to learn Java in conjunction with a HUGE Mission critical project • Not applying what you learn EVERYDAY !!

  12. Agenda • Roadmap • Eclipse, The Tool • Java language Fundamentals • Developing Java code In Eclipse • Develop and Deploy Lotus Domino Java code using the Eclipse development platform • Wrap Up

  13. Eclipse, The Tool • Installing Eclipse • Updating Eclipse • Configuring Eclipse • Navigating Eclipse • Creating Projects

  14. Ok, let’s get this out of the way We Don’t Hate LotusScript !!!!!!!!!!! We Don’t Hate LotusScript !!!!!!!!!!! We Don’t Hate LotusScript !!!!!!!!!!! We Don’t Hate LotusScript !!!!!!!!!!! We Don’t Hate LotusScript !!!!!!!!!!! We Don’t Hate LotusScript !!!!!!!!!!! We Don’t Hate LotusScript !!!!!!!!!!! We Don’t Hate LotusScript !!!!!!!!!!!

  15. Very Wise Saying If the only tool you have is a hammer, you tend to see every problem as a nail Abraham Maslow

  16. Your Domino Development Toolbox Formula Language LotusScript Java JavaScript

  17. Installing Eclipse • Steps to Install Eclipse • Download a Java SDK FIRST • Level 1.4.2 or higher • Java 5 is recommended • Install Java SDK • Download Eclipse 3.3.x (Europa Build) • http://www.eclipse.org/downloads/ • Supported Platforms • Windows • Linux • Solaris 8 • AIX • HP-UX • Max OS X

  18. Tip Installing Eclipse • You must have at least one Java SDK installed on your machine BEFORE installing the Eclipse workbench • Must be version 1.4.2 or above (J2SE 5 or 6) • Java 5 is the recommended !! • If supporting multiple installed SDKs • Install oldest to newest • Installing Java 5 or 6 will allow you to write code that conforms to older JRE http://java.sun.com/javase/downloads/index.jsp

  19. Installing Eclipse • Download Eclipse 3.3.x • This is the Europa build • It will be .zip file • Unzip the contents to a directory on the hard drive • That’s it. You just installed Eclipse !!! • Start Eclipse • Eclipse.exe (Windows) • ./Eclipse (Linux) • First time Eclipse starts it will search for an installed SDK and add it to the workbench configuration • Only the currently configured JRE will be added to the workbench configuration • Others can be added (See configuration slides)

  20. Installing Eclipse • Eclipse start up screen

  21. Installing Eclipse • The Eclipse Workbench with the default Java Perspective

  22. Updating Eclipse • The first task to complete after the Eclipse workbench is started is to check for software updates • From the “Help” menu choose “Software Updates > Find and Install…”

  23. Updating Eclipse • In the Feature Updates Dialog box there are two options • Search for updates of the currently installed features • Allows you to update all currently installed feature functionality • Search for new features to install • Allows you to add additional functionality to the Eclipse Workbench • Like the Web Tools Plug-in

  24. Updating Eclipse • Search for updates to the currently installed features FIRST • This will ensure that you have the most up to date “Core” install • If you have just downloaded Eclipse, there may be not updates to install • After the installed feature update is complete, then search for new features to install • This will allow you to add additional functionality to your installation of Eclipse Best Practice !

  25. Updating Eclipse • If “Search for new features to install” is selected you will see the following dialog box

  26. Updating Eclipse • The Europa Discovery Site is a combination of Eclipse projects in one installation site • Check the values for the functionality you want to install and click the Next button • If there are errors after you make your selections, click the “Select Required” button to resolve any dependency issues

  27. Tip Updating Eclipse • When first starting out I recommend including the following • Graphical Editors and Frameworks • Java Development • Web and JEE Development • You will need to run Software update • After every newly installed feature • At least once a Quarter • Preferably once a month Best Practice !

  28. Tip Configuring Eclipse • Configuration changes that affect the entire workbench are done via the “Preferences” dialog box • From the “Window” menu choose “Preferences”

  29. Configuring Eclipse • Expand the preferences in the column on the left to access the preferences for that category

  30. Configuring Eclipse • Common preference changes • Change Font for editors and dialogs • General > Appearance > Colors and Fonts • Expand “Basic” select “Text Font” • Prompt for workspace on startup • General > Startup and Shutdown • Default Web Browser to use • General > Web Browser • Enable HTTP Proxy Connection • General > Network Connections

  31. Configuring Eclipse • Common preference changes (Cont) • Configure additional JREs • Java > Installed JREs • Click the Add button and navigate to install directory • You can add the Domino 6.x, 7.x and 8.x JVM to the Installed JREs in Eclipse to use on Domino only projects

  32. Tip Configuring Eclipse • Common preference changes (Cont) • Some changes are specific to the current workspace (Like the JVM’s we just added) • Preferences can be exported from one workspace and then imported into another • Once you have configured your preferences the way you want them • Export the Preferences • File > Export… • Expand General and choose “Preferences”

  33. Configuring Eclipse • Common preference changes (Cont) • You can choose to export all or just the specific changes • Provide a file name that has an .epf extension • This is just an XML file

  34. Configuring Eclipse • Common preference changes (Cont) • Preferences can be imported into a new workspace from the import menu • File > Import… • Expand General and choose “Preferences”

  35. Configuring Eclipse • Common preference changes (Cont) • Choose the .epf file to be imported • You can import all of the preferences or choose a sub-set

  36. Configuring Eclipse • Common preference changes (Cont) • In order to test Web Applications (Servlets, JSP’s) you will need an installed Web Application Server • Add Runtime Test Server • Server > Installed Runtimes • Click “Add” and browse to installation of runtime test server • IBM WebSphere Application Server • Apache w/Tomcat add-in • JBOSS • Oracle

  37. Navigating Eclipse • Eclipse is made up of • Perspectives • Allows developer to focus on particular development type • Java • J2EE • Debug • Plug-in • Resource • Views • Displays functionality with-in a perspective • Package Explorer • Problems • Editors • Allows for development of a particular code type • Java • HTML, CSS, JavaScript, XML, etc.

  38. Navigating Eclipse • Switch between perspectives using the Perspective bar in the upper right hand corner of the workbench • Views in Perspectives can be dragged/dropped to any area of the perspective • Additional views can be added via the menu • “Window > Show View”

  39. Tip Navigating Eclipse • Views can be removed from a perspective by click on the “X” in the upper right corner of a view • Any View (Including Editor Windows) can be Maximized/Restored by double clicking on the tab that displays the view/editor title • If you totally FUBAR a perspective you can always restore the view to the original layout via the menu • “Window > Reset Perspective”

  40. Navigating Eclipse • The default Java Perspective Perspective Bar Editor Views

  41. Creating Projects • The type of Project that can be created in Eclipse is based upon the features that have been added • “Out of the Box” Eclipse can only create the following project types • Java • Plug-in • Resource • CVS (Concurrent Versioning System – Code Sharing) • With Additional Features from the Eudora or other Eclipse/Third Party add ins • Web • Static Web Project • Dynamic Web Project • J2EE • Enterprise Application Project • Application Client Project

  42. Creating Projects • All projects are created via the New Project Wizard • File > New Project

  43. Eclipse Workbench - Demonstration

  44. Agenda • Roadmap • Eclipse, The Tool • Java language Fundamentals • Developing Java code In Eclipse • Develop and Deploy Lotus Domino Java code using the Eclipse development platform • Wrap Up

  45. Java History • Originally was called the “Oak” • Was intended to be used in consumer electronics • Platform independence was one of the requirements • Based on C++, with influences from other OO languages (Smalltalk, Eiffel …) • Started gaining popularity in 1995 • Renamed to “Java” • Was a good fit for the Internet applications

  46. Portability • Java is a platform independent language • Java code can run on any platform • Promotes the idea of writing the code on one platform and running it on any other • Java source code is stored in .java files • Compiler compiles code into .class files • The compiled code is the bytecode that can run on any platform • Bytecode is what makes Java platform independent • Bytecode is not machine code • Java Virtual Machine (JVM) • Platform specific - Processes bytecode at runtime by translating bytecode into machine code

  47. Memory Management • Automatic garbage collection is built into the language • No explicit memory management is required • Occurs whenever memory is required • Can be forced programmatically • Garbage collector frees memory from objects that areno longer in use

  48. Distributed Systems • Java provides low level networking • TCP/IP support, HTTP, and sockets • Java also provides higher level networking • Remote Method Invocation (RMI) is Java’s distributed protocol • Used for communication between objects that reside in different Virtual Machines • Commonly used in J2EE (Java 2 Enterprise Edition) Application Server • CORBA could also be used with Java

  49. Identifiers • Used for naming classes, interfaces, methods, variables, fields, and parameters • Can contain letters, digits, underscores, or dollar-signs • There are some rules that apply: • First character in the identifier cannot be a digit • Can be a letter, underscore, or dollar sign • Literals true, false, and null cannot be used • Reserved words cannot be used • And it is Case Sensitive!

More Related