Packaging and Deploying Java Projects in JBuilder



Similar documents
Packaging and Deploying Java Projects in Forte

Supplement I.B: Installing and Configuring JDK 1.6

Supplement I.B: Installing and Configuring JDK 1.6

Primavera P6 Professional Windows 8 Installation Instructions. Primavera P6. Installation Instructions. For Windows 8 Users

For Introduction to Java Programming, 5E By Y. Daniel Liang

Java. How to install the Java Runtime Environment (JRE)

Oracle Java (8u31) Installation

Entrust Managed Services PKI Administrator Guide

Remote Vision(Java RDP Client) User Manual

Download and Installation Instructions. Android SDK and Android Development Tools (ADT) Microsoft Windows

ADT Plugin for Eclipse

Java Language Tools COPYRIGHTED MATERIAL. Part 1. In this part...

Backing Up and Restoring the Database

Code Estimation Tools Directions for a Services Engagement

Symantec Client Firewall Policy Migration Guide

Deploying a Logi Info Application on WAS

Entrust Managed Services PKI Administrator s Quick Start Guide

Eclipse installation, configuration and operation

Building Java Servlets with Oracle JDeveloper

PingFederate. Identity Menu Builder. User Guide. Version 1.0

Serving tn5250j in Web Documents from the HTTP Server for iseries

Crystal Reports for Eclipse

Deploying Java Runtime Environment using SyAM Management Utilities

GUIDELINES. Electronic Reporting for Ozone-Depleting Substances. Part 3: Submitting ODS Data to EPA via CDX: Initial Setup and Submission

GridWorld Installation Guide

HOW TO CONFIGURE PASS-THRU PROXY FOR ORACLE APPLICATIONS

Microsoft FrontPage 2003

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

Creating Reports with Microsoft Dynamics AX SQL Reporting Services

INSTALLING MALTED 3.0 IN LINUX MALTED: INSTALLING THE SYSTEM IN LINUX. Installing Malted 3.0 in LINUX

Installing (1.8.7) 9/2/ Installing jgrasp

StreamServe Persuasion SP5 Control Center

Using Impatica for Power Point

T320 E-business technologies: foundations and practice

Implementing a SAS 9.3 Enterprise BI Server Deployment TS-811. in Microsoft Windows Operating Environments

Supplement I.C. Creating, Compiling and Running Java Programs from the Command Window

Accessing the Online Meeting Room (Blackboard Collaborate)

Converting PowerPoint Presentations to HTML

NetBeans IDE Field Guide

Configuring.NET based Applications in Internet Information Server to use Virtual Clocks from Time Machine

Configuring Devices for Use with Cisco Configuration Professional (CCP) 2.5

Installing Ruby on Windows XP

Java Client Side Application Basics: Decompiling, Recompiling and Signing

IBM WebSphere Application Server V8.5 lab Basic Liberty profile administration using the job manager

Producing Standards Based Content with ToolBook

Enterprise Manager. Version 6.2. Installation Guide

USING STUFFIT DELUXE THE STUFFIT START PAGE CREATING ARCHIVES (COMPRESSED FILES)

Installing Primavera P6 Professional R8.2

SECURE MOBILE ACCESS MODULE USER GUIDE EFT 2013

What is a Mail Merge?

JAVA WEB START OVERVIEW

NetWrix File Server Change Reporter. Quick Start Guide

WA2262 Applied Data Science and Big Data Analytics Boot Camp for Business Analysts. Classroom Setup Guide. Web Age Solutions Inc.

Tutorial Build a simple IBM Rational Publishing Engine (RPE) template for IBM Rational DOORS

ComTrader Technical Requirements

3. Installation and Configuration. 3.1 Java Development Kit (JDK)

1 Building, Deploying and Testing DPES application

Oracle WebLogic Server

An Overview of Oracle Forms Server Architecture. An Oracle Technical White Paper April 2000

Table of Contents. Welcome Login Password Assistance Self Registration Secure Mail Compose Drafts...

Deploying Intellicus Portal on IBM WebSphere

Getting Started with Android Development

Practice Fusion API Client Installation Guide for Windows

Using SQL Reporting Services with Amicus

Building Applications with JBuilder

Tutorial: Android Object API Application Development. SAP Mobile Platform 2.3 SP02

A Java Crib Sheet. First: Find the Command Line

Supplement IV.E: Tutorial for Tomcat. For Introduction to Java Programming By Y. Daniel Liang

Implementing and Supporting Windows Intune

Creating and Issuing the Workstation Authentication Certificate Template on the Certification Authority

Installation of IR under Windows Server 2008

Introducing the BIG-IP and SharePoint Portal Server 2003 configuration

Fahim Uddin 1. Java SDK

Hudson configuration manual

NETWRIX CHANGE NOTIFIER

Building graphic-rich and better performing native applications. Pro. Android C++ with the NDK. Onur Cinar

Application Servers - BEA WebLogic. Installing the Application Server

User s Guide For Department of Facility Services

Introduction to Java Applets (Deitel chapter 3)

SSL VPN. Virtual Appliance Installation Guide. Virtual Private Networks

Using SQL Reporting Services with Amicus

GE Intelligent Platforms. Activating Licenses Online Using a Local License Server

clone deve restituire un Object. Quindi quando si chiama la clone tipicamente serve un cast.

EMC Documentum My Documentum for Microsoft SharePoint

SQL Server 2005: Report Builder

L01: Using the WebSphere Application Server Liberty Profile for lightweight, rapid development. Lab Exercise

Omgeo Central Trade Manager SM

GX/GP Firmware Upgrade Procedure

Deploying the BIG-IP System with Oracle E-Business Suite 11i

Deploying EMC Documentum WDK Applications with IBM WebSEAL as a Reverse Proxy

Deploying the BIG-IP LTM system and Microsoft Windows Server 2003 Terminal Services

Introduction to TightVNC. Installation. TightVNC for Windows: Installation and Getting Started. TightVNC Version 2.6 Copyright 2012 GlavSoft LLC.

Launcher Installation Instructions Code No. LIT Software Release 1.5 Issued June 2016

ABS2020 Moving Airfreight Forward

APIS CARM NG Quick Start Guide for MS Windows

Installing and Configuring DB2 10, WebSphere Application Server v8 & Maximo Asset Management

POINT OF SALES SYSTEM (POSS) USER MANUAL

How to Install Eclipse. Windows

TIBCO Spotfire Automation Services 6.5. User s Manual

Getting Started using the SQuirreL SQL Client

Transcription:

Packaging and Deploying Java Projects in JBuilder NOTE: This supplemental material may be used at the end of Chapter 12, Applets and Advanced Graphics. Archive builder wizard is available in JBuilder Professional and JBuilder Enterprise. Your project may consist of many classes and supporting files, such as image files and audio files. All of these files have to be provided to the end-users if your programs are to run on their side. For convenience, Java supports an archive file that can group all the project files in a compressed file. The Java archive file format (JAR) is based on the popular ZIP file format. JAR can be used as a general archiving tool, but transporting Java applications, applets, and their requisite components (.class files, images, and sounds) in a single file was the primary motivation for its development. This single file can be deployed on an end-user s machine as an application. It also can be downloaded to a browser in a single HTTP transaction, rather than opening a new connection for each piece. This greatly simplifies application deployment and improves the speed with which an applet can be loaded onto a Web page and begin functioning. The JAR format also supports compression, which reduces the size of the file and improves download time still further. Additionally, individual entries in a JAR file can be digitally signed by the applet author to authenticate their origin. You can create an archive file using the JDK jar command or using the JBuilder Archive Builder Wizard. The following command creates an archive file named chapter12.jar for classes TicTacToe.class and TicTacToe$Cell.class: jar -cf chapter12.jar chapter12/tictactoe.class chapter12/tictactoe$cell.class The -c option is for creating a new archive file, and the -f option specifies the archive file s name. Using the Archive Builder to Package Projects With the jar command, you have to manually identify the dependent files. JBuilder provides the Archive Builder that gathers all the classes on which your program depends into one JAR archive that includes image and audio files. NOTE: Archive builder is a feature in JBuilder Professional and Enterprise.

Let us use the TicTacToe class in Example 12.7, "The TicTacToe Game," to demonstrate packaging projects. Here are the steps to follow in generating the archive file: 1. Open the chapter12.jpr project. Choose Wizard, Archive Builder to start Archive Builder, as shown in Figure 1. Figure 1 You can use the Archive Builder Wizard to create an archive file for the project. 2. Since TicTacToe can run as an application, choose Application as Archive type. Click Next to display Archive Builder Step 2 of 6, as shown in Figure 2. Check Compress the contents of the archive. Click the ellipses to display a File dialog to enter a new file name chapter12.jar in the File field.

Figure 2 You specify an archive file in Step 2 of Archive Builder. Figure 3 You specify the parts of the project to archive in Step 3 of Archive Builder. 3. Click Next to display Step 3 of 6 of Archive Builder, as shown in Figure 3. Check Include required classes and known resources. Click Add Class to display the Select a Class dialog box to select chapter12.tictactoe. Click

Next continually to skip Step 4, and 5. In Step 6 of 6 of Archive Builder, as shown in Figure 4, check Use the class specified below. Click the ellipses to display the Select Main Class for Archive dialog box to select chapter12.tictactoe. Figure 4 You specify the main method for the archive file in Step 6 of Archive Builder. 4. Click Finish to close the Archive Builder. Rebuild the project to create the archive file. NOTE: You can view the contents of a.jar file using WinZip, a popular compression utility for Windows, as shown in Figure 5. Figure 5 You can view the files contained in the archive file using the WinZip utility. The Manifest File

As shown in Figure 5, a manifest file was created with the path name meta-inf\. The manifest is a special file that contains information about the files packaged in a JAR file. For instance, the manifest file in Figure 5 contains the following information: Manifest-Version: 1.0 Main-Class: chapter12.tictactoe The Main-Class line specifies that the jar file contains a Java application whose main class is chapter12.tictactoe. Running Archived Projects The Archive Builder packages all the class files and dependent resource files into an archive file that can be distributed to the end-user. If the project is a Java application, the user should have a Java Runtime Environment already installed. If it is not installed, the user can download Java Runtime Environment (JRE) from JavaSoft at www.javasoft.com/ and install it. NOTE: The Java Runtime Environment is the minimum standard Java platform for running Java programs. It contains the Java interpreter, Java core classes, and supporting files. The JRE does not contain any of the development tools (such as Applet Viewer or javac) or classes that pertain only to a development environment. The JRE is a subset of JDK. Running Archived Files from Java Applications To run TicTacToe as an application, simply type the following command: java -jar chapter12.jar Running Archived Files from Java Applets To run TicTacToe file to include an ARCHIVE attribute. The ARCHIVE attribute specifies the archive file that contains the applet. For example, the HTML file for running the TicTacToe can be modified as follows: <APPLET CODE = "chapter12.tictactoe.class" ARCHIVE = "chapter12.jar" WIDTH = 400 HEIGHT = 300 HSPACE = 0 VSPACE = 0 ALIGN = Middle > </APPLET>

NOTE: If your Java source code is changed, you need to update the.jar file. To update the.jar file, right click the project file in the project pane to display the context menu, and choose Rebuild.