Netbeans Notes ( )

Similar documents
Javadocing in Netbeans (rev )

Embedding Graphics in JavaDocs (netbeans IDE)

How to Install (then Test) the NetBeans Bundle

MEAP Edition Manning Early Access Program Get Programming with Java Version 1

Running Java Programs

Getting Started with Java. Atul Prakash

Setting up your Computer

Getting Started with Eclipse/Java

Standard Edition (SE) application development Enterprise Edition (EE) enterprise development Micro Edition (ME) Internet of Things (IoT) development

Page 1 of 7. public class EmployeeAryAppletEx extends JApplet

Web API Lab. The next two deliverables you shall write yourself.

Eclipse Tutorial How To Write Java Program In Eclipse Step By Step Eclipse Tutorial For Beginners Java

SIS offline. Getting Started

Using Eclipse for Java. Using Eclipse for Java 1 / 1

For live Java EE training, please see training courses at

Standard Edition (SE) application development Enterprise Edition (EE) enterprise development Micro Edition (ME) Internet of Things (IoT) development

3. NetBeans IDE 6.0. Java. Fall 2009 Instructor: Dr. Masoud Yaghini

Manual Java 6 Update 45 For Windows 7 32 Bit

Setup and Getting Startedt Customized Java EE Training:

Chapter Two Bonus Lesson: JavaDoc

Programming Principles 1 (CSC131) & 2 (CSC132) Software usage guide

JDK-WildFly-NetBeans Setup Local

2 Getting Started. Getting Started (v1.8.6) 3/5/2007

Monroe Township High School AP Computer Science A Summer Packet

CS 170 Java Tools. Step 1: Got Java?

3. Hello World! for IDEA. Java. Summer 2008 Instructor: Dr. Masoud Yaghini

Lecture (01) Getting started. Dr. Ahmed ElShafee

MEDIA COMPUTATION DRJAVA. Lecture 11.3 November 7, 2008

Working with Macros. Creating a Macro

A Linux Virtual Machine for CS-2011 Projects

Sample Spark Web-App. Overview. Prerequisites

Manual Update Java 7 25 Mac Windows Xp

Setting Up A WordPress Blog

Download and Installation Instructions. Java JDK Software for Windows

Installation Instructions

RTMS - Software Setup

Manual Java Update Windows 7 64 Bit Probleme

Installation Instructions

Overview: Requirements:

Setting Up the Development Environment

Software Development Kit

Developing Ajax Web Apps with GWT. Session I

Purpose. Why use Java? Installing the Software. Java

Slide 1 CS 170 Java Programming 1 Duration: 00:00:49 Advance mode: Auto

Starting the KVM Console

Database Concepts. Online Appendix I Getting Started with Web Servers, PHP, and the NetBeans IDE. 7th Edition. David M. Kroenke David J.

Installing and configuring an Android device emulator. EntwicklerCamp 2012

Java Client Certification for OmegaPS 10g

Manual Update Java 7 25 Mac 32 Bit Offline

AP Computer Science National Day School

Design Importer User Guide

Getting Started (1.8.7) 9/2/2009

Getting started with Apache Struts 2, with Netbeans 6.1

Mend for Eclipse quick start guide local analysis

SpeechClass Instructor Quick Start for A Speaker s Guidebook, Fourth Edition

COMP 110/401 APPENDIX: INSTALLING AND USING ECLIPSE. Instructor: Prasun Dewan (FB 150,

AP Computer Science Summer Assignment (updated 5/29/2018) DUE : Sept. 4, 2018

OpenESB SE Enterprise Edition V3.0 Installation guide

Downloading Java Development Kit (JDK), the Offline Client, and Utilizing the Offline Audit Tool

SAM4S Receipt Printer JPOS Driver. Mac OS X Installation Manual

NetBeans Primer v8.0

Laboratory 1: Eclipse and Karel the Robot

Summer Assignment for AP Computer Science. Room 302

Netbeans Platform For Beginners

Java Client Certification for OmegaPS 10g

Authoring World Wide Web Pages with Dreamweaver

Students Guide to Desire2Learn

The Computer System. Hardware = Physical Computer. Software = Computer Programs. People = End Users & Programmers. people

Web-CAT Guidelines. 1. Logging into Web-CAT

GETTING STARTED WITH JAVA

CSE 101 Introduction to Computers Development / Tutorial / Lab Environment Setup

Department of Computer Science. Software Usage Guide. CSC132 Programming Principles 2. By Andreas Grondoudis

Installing an IDE ELECTRICAL ENGINEERING AND COMPUTER SCIENCE DEPARTMENT. A practical guide to installing NetBeans for Java and C/C++

Web API Lab folder 07_webApi : webapi.jsp your testapijs.html testapijq.html that works functionally the same as the page testapidomjs.

I / PM Express Imaging and Process Management Web Express. User Guide EWU s Web based Document Imaging solution

Manually Java 7 Update 21 Offline Installer 64 Bit Windows

Code Check TM Software Requirements Specification

FIT 100 LAB Activity 3: Constructing HTML Documents

Hello World. Lesson 1. Create your first Android. Android Developer Fundamentals. Android Developer Fundamentals

CSCI 201 Lab 1 Environment Setup

Eng. Mohammed S. Abdualal

FrontPage Student IT Essentials. October 2005 This leaflet is available in other formats on request. Saving your work

Imagery International website manual

Supplement H.1: JBuilder X Tutorial. For Introduction to Java Programming, 5E By Y. Daniel Liang

Uninstall Java Manually Mac Os X 10.6 Update 6 Developer Package

Reading How the Web Works

Supplement II.B(1): JBuilder X Tutorial. For Introduction to Java Programming By Y. Daniel Liang

CIS 99 How to Purchase, Register and Navigate Myitlab

Eng. Mohammed Alokshiya

GETTING STARTED WITH JAVA

Introduction To NetBeans 5.5

TEMPO INSTALLATION I O A. Platform Independent Notes 1. Installing Tempo 3. Installing Tools for the Plugins 5. v0.2.

This will be a paragraph about me. It might include my hobbies, where I grew up, etc.

CS1110 Lab 1 (Jan 27-28, 2015)

Introduction to Java. Lecture 1 COP 3252 Summer May 16, 2017

Embedding and linking to media

NetBeans Platform in 5.0:

Choose OS and click on it

Eclipse Environment Setup

Fundamentals: Expressions and Assignment

Transcription:

Netbeans 6.9.1 Notes (2011-02-08) [Note: Netbeans is a Sun-Oracle IDE (integrated development environment) open source product almost 10 years old by now (2011). These are all free downloads. The latest release is 6.9.1 which is pretty solid. This is the version I recommend because it works well for Java and other languages (C, C++, Ruby, Python). There is a newer Beta version, but not the right plugins are available for this version yet and it requires Java 7.0 early access. So, stick with 6.9.1. (There is a whole lot more to NB then my notes suggest, so an instructor will need to elaborate as they learn more). These notes cover the following configuration for the Java/NB suite. 1. Setting up Java, and Java class file documentation, 2. Setting up Netbeans, 3. Installing XML and UML plugins to NB 4. Netbeans productivity hints. 1. Editing the template Java class file(s) to edit in boiler plate code, such as automatic file name, user name, date, and Javadoc @ tags 2. Set up code macros so that typing a mnemonic will be expanded to desired code. That is, I have set mine up so that typing the 4 characters sout and hitting space bar results in System.out.println( ); with the cursor between the quote marks. (Students are really annoyed if I don t show them this option early on)!! 5. Extending NB with additional Plugins beyond XML and UML The basic NB framework can be augmented with plugins. Among the hundred and sixty or so available, I use the XML plugin and the UML plugin, plus a few others. The XML plugin allows XML editing, DTD/XML-Schema editing, and document validation, as well as XSLT editing and transformations. I have used these features in both XML (IT 408) and Java classes (IT 307, IT 407, CST 100, 200) for several years now and they work. The UML plugin allows diagrammatic round-trip engineering. Very cool, and very essential for modern software development. (For a Windows box, there are Mac version available too) Copy from instructor supplied flash drive to your hard drive:, (don t install from the flash drive!) Or, you can download all of this software from the java.sun.com site as well as mozilla.org. The java.sun.com, netbeans.org, mozilla.org sites have these downloads 1. jdk1.6 update 23(or later) -- This is the SE (standard edition) desktop software distribution. jdk means Java Development Kit. JRE means Java Runtime Environment which allows Java code to run but no development tools. 2. jdk 1.6 docs ( jdk-6u23-docs.zip this is a zip file that can remain zipped. Download from the same java.sun.com site). This contains all the Java class file Javadocs I will show you how to include this in your netbeans distribution later in these notes) C:\acbooks\QPack2008\NetbeansNotes.fm 3/7/11 rob.r 1

3. Netbeans 6.9.1 (get the most comprehensive version as it includes the application server glassfish). If you download yourself, be sure to get this most comprehensive version. Don t get the combination distributions, do them as I indicate here. 4. Firefox browser distribution from Mozilla.org O.K, next---: 1) First, install jdk 1.6, update 2x since Netbeans requires a Java distribution (not the JRE, but rather the JDK), take the defaults, this should place the distribution within the Program Files folder (some windows OS require it be installed elsewhere, check on this). 2) Next, install Netbeans 6.9.1, you can customize this product to take less memory and time since we won t be using Ruby, Groovy, C++, JavaFX, or Java ME If you want to add UML and / or XML-Schema capabilities, see the plugin installation instructions below: Setting up the UML and XML Modules in Netbeans 6.9.1 (2011-02-08) Follow the instructions below and the module will be automatically be downloaded for you as a consequence of the plugin update process. Steps to install the UML module ( assuming you have installed NB 6.9.1 ) Go to Tools>Plugins>Settings> add dialog In the add dialog box, give this site a name like UMLModule and type in the following URL http://ea.ddns.com.br:8090/netbeans6.8/uml/catalog.xml click OK, and NB should immediately start to search and then download plugins from this site. Now check Available Plugins( ), you should see one more plugin in the available plugins. Scroll down to find and install the uml plugin. Activating Your Module You might need to make your uml module active, so you should check it s setting as shown below: (Notice the Show Details box is checked so you can see the individual statuses as below). Check C:\acbooks\QPack2008\NetbeansNotes.fm 3/7/11 rob.r 2

the box and an option to activate or deactivate will be presented to you.. XML and XML-Schema Setup To add in XML-Schema editing support you will need to add in another plugin. As in the UML plugin instructions above, you will need to add another URL site to download the plugin. The plugin name is -- XML Schema and WSDL. For NB 6.9, the URL suggested is: http://dlc.sun.com.edgesuite.net/netbeans/updates/6.9/uc/m1/dev/catalog.com.gz Installing the Java API docs so that NB can display Java class documentation Given that you have NB 6.9.1 up and running, you can set up to access the Java api for all Java classes by doing the following: 1. Copy the Java Doc zip file to the Java distribution folder. In my case, the distribution folder is jdk1.6.0_21. Notice that I simply copy jdk-6u23-docs.zip into that top folder, don t unzip it. C:\acbooks\QPack2008\NetbeansNotes.fm 3/7/11 rob.r 3

Now tell NB where to find the Java API docs. Go to: Tools>Java Platforms >javadoc tab In the Java Platforms window, click on the Add Zip/Folder tab and navigate to your jdk-6u23-docs.zip file. C:\acbooks\QPack2008\NetbeansNotes.fm 3/7/11 rob.r 4

From now on, when you are in a Java source code program, and you see a Java class of interest, just right-click on the class name and a browser window will open showing the Javadocs for that class. For example, here is some source code and I right clicked on the Java class System and invoked the Show Javadoc command. And here is a fragment of the Javadoc displayed in the browser window: C:\acbooks\QPack2008\NetbeansNotes.fm 3/7/11 rob.r 5

Learn to create projects File>New Project> java.java application Learn to create projects then type in a name of your choice for the project. Over-type the default package name and Main class. type 'finish' Go to main menu and Run>Run Main Project just to see that it runs, with no output. Code in a System.out.println("Hello World") inside of your main method ( see handout) and run again... 4. Learn to use the javadoc tags. I will expect EVERY program from next week onward to have javadoc comments as a matter of course. The extent of the comments will emerge as we learn more. 5. When you ask for a new file, as when you right click on the package name, New>Java Class> type in a name of your choice > 'finish' what you see is the template for that file type. C:\acbooks\QPack2008\NetbeansNotes.fm 3/7/11 rob.r 6

Learn to create projects 5.5 To edit that template to say what you want it to say next time you create a new Java Class file, do the following: Tools>Templates>java folder> Java Class >Open in Editor ( use the file below as a model of what to edit ) 5.7 To create the doc-files folder that will hold your graphics, right click the package name > New>Other>Other>Folder (You need a Folder and it is usually included in the 'Other' miscellaneous file types) Name it 'docfiles' and copy your graphics into it.. 6. Create productivity macros tools>options> editor> code templates> type in a nickname then type in what the expanded code should look like. decide how it should be invoked ( space, tab, enter,.. ) Editing the Program File Templates The Template - Java Class File ***** An edited Java Class File. ( The Java Main Class file will be almost exactly the same except for how you want to edit the main() method. *********************************** ******Edited Java Class File ******************************************** /* ${package}.${name}, ${user}, ${date} */ <#if package?? && package!= ""> package ${package}; </#if> /**${name} shows... *<p> *<!-- uncomment start/end comment tags for graphics display * <img src="doc-files/yourgraphic.jpg" alt="graphic"/> * <a href="doc-files/yourpdfdoctxtfile.pdf" >myfile link </a> * 'doc-files' must be a sub-folder of your package folder * --> *</p> * @author ${user} * @version 1.0 ${date} * @see "" */ public class ${name} { }//end class ${name} C:\acbooks\QPack2008\NetbeansNotes.fm 3/7/11 rob.r 7

Literate Programming 5. When you ask for a new file, as when you right click on the package name >new>java Class what you see is the template for that file type. 5.5 To edit that template to say what you want it to say: tools>templates>java folder> Java Class >Open in Editor Create productivity macros Tools>Options> Editor> Code Templates> type in a nickname then type in what the expanded code should look like. decide how it should be invoked ( space, tab, enter,.. ) Literate Programming To improve your standing with your clients, it s always helpful to show them something extra, to delight them, to tantalize them with intimations of more to come. Part of this push comes from learning how to provide first rate documentation that is both explanatory and interesting. For our Java programs we have a built-in process to provide such documentation, Javadoc. With Javadoc, you can insert comments into your Java program that will be extracted and hypertext linked to other parts of your package or program as well as including links to other documents and graphics. Productivity Hint -- Undock Windows NB has a nice feature so that you can see multiple windows at once. Here is how I do it (2011-02- 10): 1. open up a project 2. open up all the files I might want (use either edit or open command). They will now be in tabs across the top of your editing pane 3. click on one of the files shown in the pane. 4. go to Windows>Undock Window 5. now you have an undocked window and can move it where you like. 6. If you want to see more than 2 windows, then open up another tabbed window and do the Undoc Window again 7. You should be able keep multiple windows open and by resizing them, some part will always show so that you can bring it to the front of the editing pane. 8. Submission Project Formats When you email projects to me, zip them and name them as follows: InitialsProjectNameDate(yyyymmdd).zip C:\acbooks\QPack2008\NetbeansNotes.fm 3/7/11 rob.r 8

Literate Programming For example, here is a zipped project that starts with my initials, the project name, and the date, in military format- yyyymmdd RRHeronFormula20110209.zip C:\acbooks\QPack2008\NetbeansNotes.fm 3/7/11 rob.r 9