Apache Felix Shell. Apache Felix Shell. Overview. How the Shell Service Works. package org.apache.felix.shell;

Size: px
Start display at page:

Download "Apache Felix Shell. Apache Felix Shell. Overview. How the Shell Service Works. package org.apache.felix.shell;"

Transcription

1 Apache Felix Shell Apache Felix Shell Overview How the Shell Service Works How Commands Work Creating a Command Security and the Shell Service Feedback Overview In order to interact with Felix it is necessary to have some sort of interactive shell that allows you to issue commands to the framework and to obtain information from it. The OSGi specification does not define how an OSGi framework should provide this interactivity. Felix defines a shell service for creating and executing arbitrary commands. The shell service does not define a user interface, only a service API. The benefit of the Felix shell service approach is that it is possible to: have multiple shell user interfaces (e.g., textual and graphical), add custom commands to the shell (i.e., bundles can make commands available via the shell service), and use the shell service from other bundles/services. The remainder of this document describes how the shell service works and how to create custom commands for it. This document does not describe how to use the command shell, nor does it describe the text-based or GUI-based user interfaces that are available for the shell. How the Shell Service Works The Felix shell service is intended to be a simple, but extensible shell service that can have multiple user interface implementations, all of which are independent from the Felix framework. The shell service is currently not intended to be sophisticated, rather it is just a mechanism to execute commands. The shell service maintains a list of command services, each of which have a unique command name. The shell service is defined by the following service interface: package org.apache.felix.shell; public interface ShellService public String[] getcommands(); public String getcommandusage(string name); public String getcommanddescription(string name); public ServiceReference getcommandreference(string name); public void executecommand( String commandline, PrintStream out, PrintStream err) throws Exception; Using the shell service interface, it is possible to access and execute available commands. The shell service methods perform the following functions: getcommands() - returns an array of strings that correspond to the names of the installed shell commands. getcommandusage() - returns the command usage string for a particular command name getcommanddescription() - returns a short description for a particular command name. getcommandreference() - returns the service reference for a particular command name. executecommand() - executes a particular command using the specified command line and print streams.

2 Most of the shell service methods require no explanation except for the executecommand() method. Even though this method is the most complex, it is still fairly simplistic. The assumption of the shell service is that a command line will be typed by the user (or perhaps constructed by a GUI) and passed into it for execution. The shell service interprets the command line in a very simplistic fashion; it takes the leading string of characters terminated by a space character (not including it) and assumes that this leading token is the command name. Consider the following command line: update 3 The shell service interprets this as an update command and will search for a command service with the same name. If a corresponding command service is not found, then it will print an error message to the error print stream. If a corresponding command service is found, then it will pass the entire command line string and the print streams into the executecommand() method of the command service (for a more detailed description of command services, see the next section). Notice that there is no method to add commands to the shell service interface. This is because commands are implemented as OSGi services and the shell service listens for service events and when a command service registers/unregisters it automatically updates its list of commands accordingly. How Commands Work All commands available in the shell service are implemented as OSGi services. The advantage of this approach is two-fold: the shell service can leverage OSGi service events to maintain its list of available commands and the set available commands is dynamically extendable by installed bundles. The command service interface is defined as follows: package org.apache.felix.shell; public interface Command public String getname(); public String getusage(); public String getshortdescription(); public void execute(string line, PrintStream out, PrintStream err); The semantics of the command service methods are: getname() - returns the name of the command; this must not contain whitespace and must be unique. getusage() - returns the usage string of the command; this should be one line and as short as possible (this is used for generating the help command output). getshortdescription() - returns a short description of the command; this should be one line and as short as possible (this is used for generating the help command output). execute() - executes the command's functionality using supplied command line and print streams. Creating a Command The following example creates a simple version of the start command. package test; import java.io.printstream; import java.net.url; import java.net.malformedurlexception; import java.util.stringtokenizer;

3 import org.osgi.framework.*; import org.apache.felix.shell.shellservice; import org.apache.felix.shell.command; public class MyStartCommandImpl implements Command private BundleContext m_context = null; public MyStartCommandImpl(BundleContext context) m_context = context; public String getname() return "mystart"; public String getusage() return "mystart <id> [<id>...]"; public String getshortdescription() return "start bundle(s)."; public void execute(string s, PrintStream out, PrintStream err) StringTokenizer st = new StringTokenizer(s, " "); // Ignore the command name. st.nexttoken(); // There should be at least one bundle id. if (st.counttokens() >= 1) while (st.hasmoretokens()) String id = st.nexttoken().trim(); try long l = Long.valueOf(id).longValue(); Bundle bundle = m_context.getbundle(l); if (bundle!= null) bundle.start(); err.println("bundle ID " + id + " is invalid.");

4 catch (NumberFormatException ex) err.println("unable to parse id '" + id + "'."); catch (BundleException ex) if (ex.getnestedexception()!= null) err.println(ex.getnestedexception().tostring()); err.println(ex.tostring()); catch (Exception ex) err.println(ex.tostring()); err.println("incorrect number of arguments"); A bundle activator class is needed for packaging the command servce; the bundle activator registers the command service in its start() method. Note: You do not need one activator per command, a single activator can register any number of commands. package test; import org.osgi.framework.bundleactivator; import org.osgi.framework.bundlecontext; public class MyStartActivator implements BundleActivator private transient BundleContext m_context = null; public void start(bundlecontext context) m_context = context; // Register the command service. context.registerservice( org.apache.felix.shell.command.class.getname(), new MyStartCommandImpl(m_context), null); public void stop(bundlecontext context) // Services are automatically unregistered so // we don't have to unregister the factory here. To compile these classes you will need to have org.apache.felix.framework-x.y.z.jar and org.apache.felix.shell-x.y.z.jar on your class path. Compile all of the source files using a command like:

5 java -cp org.apache.felix.framework jar:org.apache.felix.shell jar -d c:\classes *.java This command compiles all of the source files and outputs the generated class files into a subdirectory of the c:\classes directory, called test, named after the package of the source files; for the above command to work, the c:\classes directory must exist. Once you have compiled all of the above classes, you need to create a bundle JAR file of the generated package directory. The bundle JAR file needs a manifest, so create a file called manifest.mf with the following contents: Bundle-Name: My Start Command Bundle-Description: A 'start' command for the shell service. Bundle-Activator: test.mystartactivator Bundle-ClassPath:. Import-Package: org.apache.felix.shell,org.osgi.framework To create the bundle JAR file, issue the command: jar cfm mystart.jar manifest.mf -C c:\classes test This command creates a JAR file using the manifest you created and includes all of the classes in the test directory inside of the c:\classes directory. Once the bundle JAR file is created, you are ready to add the command service to the shell service; simply start Felix and install and start the bundle created by the above command. By doing so, the new mystart command is made available via the shell service. Security and the Shell Service The shell service security handling is quite simple, all security is handled by the standard OSGi framework mechanisms. For example, if a bundle should not be able to register a shell service, then it should not be given the corresponding service permission. Security handling may change in future release after some experience is gained through usage. Feedback Subscribe to the Felix users mailing list by sending a message to users-subscribe@felix.apache.org; after subscribing, questions or feedback to users@felix.apache.org.

Apache Felix Framework Launching and Embedding

Apache Felix Framework Launching and Embedding Apache Felix Framework Launching and Embedding Apache Felix Framework Launching and Embedding [This document describes framework launching introduced in Felix Framework 2.0.0 and continuing with the latest

More information

CS5233 Components Models and Engineering

CS5233 Components Models and Engineering Prof. Dr. Th. Letschert CS5233 Components Models and Engineering (Komponententechnologien) Master of Science (Informatik) OSGI Bundles and Services Slides on OSGi are based on OSGi Alliance: OSGi Service

More information

OSGi in Action. Ada Diaconescu

OSGi in Action. Ada Diaconescu OSGi in Action Karl Pauls Clement Escoffier karl.pauls@akquinet.de clement.escoffier@akquinet.de INF 346. Ada Diaconescu ada.diaconescu@telecom-paristech.fr 2 OSGi in Action - Clement Escoffier (clement.escoffier@akquinet.de)

More information

Introduction to OSGi. Marcel Offermans. luminis

Introduction to OSGi. Marcel Offermans. luminis Introduction to OSGi Marcel Offermans luminis Introduction Marcel Offermans marcel.offermans@luminis.nl Luminis Arnhem Apeldoorn Enschede IT solutions from idea to implementation with and for customers:

More information

Introduction IS

Introduction IS Introduction IS 313 4.1.2003 Outline Goals of the course Course organization Java command line Object-oriented programming File I/O Business Application Development Business process analysis Systems analysis

More information

Developing Java Applications with OSGi Capital District Java Developers Network. Michael P. Redlich March 20, 2008

Developing Java Applications with OSGi Capital District Java Developers Network. Michael P. Redlich March 20, 2008 Developing Java Applications with OSGi Capital District Java Developers Network Michael P. Redlich March 20, My Background (1) Degree B.S. in Computer Science Rutgers University (go Scarlet Knights!) Petrochemical

More information

Patterns and Best Practices for dynamic OSGi Applications

Patterns and Best Practices for dynamic OSGi Applications Patterns and Best Practices for dynamic OSGi Applications Kai Tödter, Siemens Corporate Technology Gerd Wütherich, Freelancer Martin Lippert, akquinet it-agile GmbH Agenda» Dynamic OSGi applications» Basics»

More information

Modular Java Applications with Spring, dm Server and OSGi

Modular Java Applications with Spring, dm Server and OSGi Modular Java Applications with Spring, dm Server and OSGi Copyright 2005-2008 SpringSource. Copying, publishing or distributing without express written permission is prohibit Topics in this session Introduction

More information

CS486: Tutorial on SOC, OSGi, and Knopflerfish. Ryan Babbitt (props to Dr. Hen-I Yang, CS415X) Feb. 3, 2011

CS486: Tutorial on SOC, OSGi, and Knopflerfish. Ryan Babbitt (props to Dr. Hen-I Yang, CS415X) Feb. 3, 2011 CS486: Tutorial on SOC, OSGi, and Knopflerfish Ryan Babbitt (rbabbitt@iastate.edu) (props to Dr. Hen-I Yang, CS415X) Feb. 3, 2011 Basic Concepts Service-oriented computing (SOC) Service-oriented architectures

More information

Apache Felix. Richard S. Hall. A Standard Plugin Model for Apache. Atlanta, Georgia U.S.A. November 13th, 2007

Apache Felix. Richard S. Hall. A Standard Plugin Model for Apache. Atlanta, Georgia U.S.A. November 13th, 2007 Apache Felix A Standard Plugin Model for Apache Richard S. Hall Atlanta, Georgia U.S.A. November 13th, 2007 Agenda Why OSGi technology? OSGi technology overview Apache Felix status Example application

More information

OSGi. Building and Managing Pluggable Applications

OSGi. Building and Managing Pluggable Applications OSGi Building and Managing Pluggable Applications What A Mess Billing Service Orders Shipping Accounting Workflow Inventory Application From The View Of... Building monolithic applications is evil nuf

More information

Compiling expressions

Compiling expressions E H U N I V E R S I T Y T O H F R G Compiling expressions E D I N B U Javier Esparza Computer Science School of Informatics The University of Edinburgh The goal 1 Construct a compiler for arithmetic expressions

More information

OSGi. Building LinkedIn's Next Generation Architecture with OSGI

OSGi. Building LinkedIn's Next Generation Architecture with OSGI OSGi Building LinkedIn's Next Generation Architecture with OSGI Yan Pujante Distinguished Software Engineer Member of the Founding Team @ LinkedIn ypujante@linkedin.com http://www.linkedin.com/in/yan Background

More information

Building LinkedIn's Next Generation Architecture with OSGI

Building LinkedIn's Next Generation Architecture with OSGI OSGi Building LinkedIn's Next Generation Architecture with OSGI Yan Pujante Distinguished Software Engineer Member of the Founding Team @ LinkedIn ypujante@linkedin.com http://www.linkedin.com/in/yan Yan

More information

Agenda. Why OSGi. What is OSGi. How OSGi Works. Apache projects related to OSGi Progress Software Corporation. All rights reserved.

Agenda. Why OSGi. What is OSGi. How OSGi Works. Apache projects related to OSGi Progress Software Corporation. All rights reserved. OSGi Overview freeman.fang@gmail.com ffang@apache.org Apache Servicemix Commiter/PMC member Apache Cxf Commiter/PMC member Apache Karaf Commiter/PMC member Apache Felix Commiter Agenda Why OSGi What is

More information

Building Secure OSGi Applications. Karl Pauls Marcel Offermans. luminis

Building Secure OSGi Applications. Karl Pauls Marcel Offermans. luminis Building Secure OSGi Applications Karl Pauls Marcel Offermans luminis Who are we? image 2008 Google Earth luminis Who are we? Karl Pauls Marcel Offermans image 2008 Google Earth luminis Who are we? Arnhem

More information

7. Component Models. Distributed Systems Prof. Dr. Alexander Schill

7. Component Models. Distributed Systems Prof. Dr. Alexander Schill 7. Component Models Distributed Systems http://www.rn.inf.tu-dresden.de Outline Motivation for Component Approach Software Components - Definition Component Platforms EJB (Enterprise JavaBeans) Spring

More information

Using the Bridge Design Pattern for OSGi Service Update

Using the Bridge Design Pattern for OSGi Service Update Using the Bridge Design Pattern for OSGi Service Update Hans Werner Pohl Jens Gerlach {hans,jens@first.fraunhofer.de Fraunhofer Institute for Computer Architecture and Software Technology (FIRST) Berlin

More information

Modularity in Java. With OSGi. Alex Docklands.LJC January Copyright 2016 Alex Blewitt

Modularity in Java. With OSGi. Alex Docklands.LJC January Copyright 2016 Alex Blewitt Modularity in Java With OSGi Alex Blewitt @alblue Docklands.LJC January 2016 Modularity in Java Modularity is Easy? Modularity is Hard! Modularity is Hard! Modularity is Hard! Modularity is Hard! Modularity

More information

Using Apache Felix: OSGi best practices. Marcel Offermans luminis

Using Apache Felix: OSGi best practices. Marcel Offermans luminis Using Apache Felix: OSGi best practices Marcel Offermans luminis 1 About me Marcel Offermans Software architect at luminis Consultancy & product development Over 4 years of experience with OSGi Committer

More information

Chapter 4 Java Language Fundamentals

Chapter 4 Java Language Fundamentals Chapter 4 Java Language Fundamentals Develop code that declares classes, interfaces, and enums, and includes the appropriate use of package and import statements Explain the effect of modifiers Given an

More information

ESB, OSGi, and the Cloud

ESB, OSGi, and the Cloud ESB, OSGi, and the Cloud Making it Rain with ServiceMix 4 Jeff Genender CTO Savoir Technologies Jeff Genender - Who is this Shmoe? Apache CXF JSR 316 - Java EE 6 Rules of Engagement Engage yourself! Agenda

More information

Brekeke PBX Version 2 ARS Plug-in Developer s Guide Brekeke Software, Inc.

Brekeke PBX Version 2 ARS Plug-in Developer s Guide Brekeke Software, Inc. Brekeke PBX Version 2 ARS Plug-in Developer s Guide Brekeke Software, Inc. Version Brekeke PBX Version 2 ARS Plug-in Developer s Guide Revised February 2010 Copyright This document is copyrighted by Brekeke

More information

Distributed OSGi through Apache CXF and Web Services

Distributed OSGi through Apache CXF and Web Services Distributed OSGi through Apache CXF and Web Services Irina Astrova Arne Koschel Institute of Cybernetics Faculty IV, Department for Computer Science Tallinn University of Technology University of Applied

More information

OOP Lab Factory Method, Singleton, and Properties Page 1

OOP Lab Factory Method, Singleton, and Properties Page 1 OOP Lab Factory Method, Singleton, and Properties Page 1 Purpose What to Submit 1. Practice implementing a factory method and singleton class. 2. Enable the Purse application to handle different kinds

More information

Today. Book-keeping. File I/O. Subscribe to sipb-iap-java-students. Inner classes. Debugging tools

Today. Book-keeping. File I/O. Subscribe to sipb-iap-java-students. Inner classes.  Debugging tools Today Book-keeping File I/O Subscribe to sipb-iap-java-students Inner classes http://sipb.mit.edu/iap/java/ Debugging tools Problem set 1 questions? Problem set 2 released tomorrow 1 2 So far... Reading

More information

Brekeke PBX Version 3 ARS Plug-in Developer s Guide Brekeke Software, Inc.

Brekeke PBX Version 3 ARS Plug-in Developer s Guide Brekeke Software, Inc. Brekeke PBX Version 3 ARS Plug-in Developer s Guide Brekeke Software, Inc. Version Brekeke PBX Version 3 ARS Plug-in Developer s Guide Copyright This document is copyrighted by Brekeke Software, Inc. Copyright

More information

8. Component Software

8. Component Software 8. Component Software Overview 8.1 Component Frameworks: An Introduction 8.2 OSGi Component Framework 8.2.1 Component Model and Bundles 8.2.2 OSGi Container and Framework 8.2.3 Further Features of the

More information

JBoss Tattletale. Betraying all your project's naughty little secrets

JBoss Tattletale. Betraying all your project's naughty little secrets JBoss Tattletale Betraying all your project's naughty little secrets JBoss Tattletale Background Goals Features Reports Integration The Future JBoss Tattletale Background JBoss Tattletale - Background

More information

Richard S. Hall Karl Pauls Stuart McCulloch David Savage

Richard S. Hall Karl Pauls Stuart McCulloch David Savage Creating modular applications in Java Richard S. Hall Karl Pauls Stuart McCulloch David Savage FOREWORD BY PETER KRIENS SAMPLE CHAPTER MANNING OSGi in Action by Richard S. Hall, Karl Pauls, Stuart McCulloch,

More information

OSGi Service Platform Core Specification. The OSGi Alliance

OSGi Service Platform Core Specification. The OSGi Alliance OSGi Service Platform Core Specification The OSGi Alliance Release 4, Version 4.3 April 2011 Copyright OSGi Alliance (2000,2011). All Rights Reserved. OSGi Specification License, Version 1.0 The OSGi Alliance

More information

1.2. Name(s) and address of Document Author(s)/Supplier: Sahoo: 1.3. Date of This Document: 12 July 2008

1.2. Name(s) and  address of Document Author(s)/Supplier: Sahoo: 1.3. Date of This Document: 12 July 2008 01234567890123456789012345678901234567890123456789012345678901234567890123456789 1. Introduction 1.1. Project/Component Working Name: Modularization of GlassFish using OSGi 1.2. Name(s) and e-mail address

More information

Servlets. How to use Apache FOP in a Servlet $Revision: $ Table of contents

Servlets. How to use Apache FOP in a Servlet $Revision: $ Table of contents How to use Apache FOP in a Servlet $Revision: 505235 $ Table of contents 1 Overview...2 2 Example Servlets in the FOP distribution...2 3 Create your own Servlet...2 3.1 A minimal Servlet...2 3.2 Adding

More information

Table of Contents. Tutorial API Deployment Prerequisites... 1

Table of Contents. Tutorial API Deployment Prerequisites... 1 Copyright Notice All information contained in this document is the property of ETL Solutions Limited. The information contained in this document is subject to change without notice and does not constitute

More information

Text User Interfaces. Keyboard IO plus

Text User Interfaces. Keyboard IO plus Text User Interfaces Keyboard IO plus User Interface and Model Model: objects that solve problem at hand. User interface: interacts with user getting input from user giving output to user reporting on

More information

Class Dependency Analyzer CDA Developer Guide

Class Dependency Analyzer CDA Developer Guide CDA Developer Guide Version 1.4 Copyright 2007-2017 MDCS Manfred Duchrow Consulting & Software Author: Manfred Duchrow Table of Contents: 1 Introduction 3 2 Extension Mechanism 3 1.1. Prerequisites 3 1.2.

More information

Unit 10: exception handling and file I/O

Unit 10: exception handling and file I/O Unit 10: exception handling and file I/O Using File objects Reading from files using Scanner Writing to file using PrintStream not in notes 1 Review What is a stream? What is the difference between a text

More information

OSGi Best Practices. Emily

OSGi Best Practices. Emily OSGi Best Practices Emily Jiang @IBM Use OSGi in the correct way... AGENDA > Why OSGi? > What is OSGi? > How to best use OSGi? 3 Modularization in Java > Jars have no modularization characteristics No

More information

Exploiting Java Code Interactions

Exploiting Java Code Interactions INSTITUT NATIONAL DE RECHERCHE EN INFORMATIQUE ET EN AUTOMATIQUE Exploiting Java Code Interactions François Goichon Guillaume Salagnac Stéphane Frénot N 0419 Décembre 2011 Distributed Systems and Services

More information

Scripting Languages in OSGi. Thursday, November 8, 12

Scripting Languages in OSGi. Thursday, November 8, 12 Scripting Languages in OSGi Frank Lyaruu CTO Dexels Project lead Navajo Framework Amsterdam www.dexels.com Twitter: @lyaruu Navajo Framework TSL XML based script language Compiled to Java Recently ported

More information

Exceptions and Libraries

Exceptions and Libraries Exceptions and Libraries RS 9.3, 6.4 Some slides created by Marty Stepp http://www.cs.washington.edu/143/ Edited by Sarah Heckman 1 Exceptions exception: An object representing an error or unusual condition.

More information

Fall 2017 CISC124 10/1/2017

Fall 2017 CISC124 10/1/2017 CISC124 Today First onq quiz this week write in lab. More details in last Wednesday s lecture. Repeated: The quiz availability times will change to match each lab as the week progresses. Useful Java classes:

More information

This chapter describes basic cadexceptions, debug, and network configuration procedures. This is a placeholder since zero is not an error.

This chapter describes basic cadexceptions, debug, and network configuration procedures. This is a placeholder since zero is not an error. CHAPTER 5 This chapter describes basic cadexceptions, debug, and network configuration procedures. Cadexceptions The following basic cadexceptions can be returned. The numbers given in the sample code

More information

New York University Computer Science Department Courant Institute of Mathematical Sciences

New York University Computer Science Department Courant Institute of Mathematical Sciences New York University Computer Science Department Courant Institute of Mathematical Sciences Course Title: Data Communications & Networks Course Number: CSCI-GA.2662-001 Instructor: Jean-Claude Franchitti

More information

Programming - 2. Common Errors

Programming - 2. Common Errors Common Errors There are certain common errors and exceptions which beginners come across and find them very annoying. Here we will discuss these and give a little explanation of what s going wrong and

More information

OSGi and Equinox. Creating Highly Modular Java. Systems

OSGi and Equinox. Creating Highly Modular Java. Systems OSGi and Equinox Creating Highly Modular Java Systems Part I: Introduction This first part of the book introduces OSGi and Equinox, Eclipse s implementation of the OSGi standard. Chapter 1outlines the

More information

For Review Purposes Only. Oracle GlassFish Server 3.1 Application Development Guide

For Review Purposes Only. Oracle GlassFish Server 3.1 Application Development Guide For Review Purposes Only Oracle GlassFish Server 3.1 Application Development Guide Part No: 821 2418 November 2010 Copyright 2010, Oracle and/or its affiliates. All rights reserved. This software and related

More information

Managed Smart Clients

Managed Smart Clients Chapter 4 Managed Smart Clients CHAPTER OVERVIEW Container-Managed Mobile Clients OSGi Containers OSGi Bundle Interactions IBM Service Management Framework A Simple Echo Service Example Smart Client with

More information

Introduction to Computer Science II (ITI 1121) Midterm Examination

Introduction to Computer Science II (ITI 1121) Midterm Examination Introduction to Computer Science II (ITI 1121) Midterm Examination Instructor: Marcel Turcotte February 2008, duration: 2 hours Identification Student name: Student number: Signature: Instructions 1. 2.

More information

1.00 Lecture 30. Sending information to a Java program

1.00 Lecture 30. Sending information to a Java program 1.00 Lecture 30 Input/Output Introduction to Streams Reading for next time: Big Java 15.5-15.7 Sending information to a Java program So far: use a GUI limited to specific interaction with user sometimes

More information

ASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists

ASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists ASSIGNMENT 5 Data Structures, Files, Exceptions, and To-Do Lists COMP-202B, Winter 2009, All Sections Due: Tuesday, April 14, 2009 (23:55) You MUST do this assignment individually and, unless otherwise

More information

1 OBJECT-ORIENTED PROGRAMMING 1

1 OBJECT-ORIENTED PROGRAMMING 1 PREFACE xvii 1 OBJECT-ORIENTED PROGRAMMING 1 1.1 Object-Oriented and Procedural Programming 2 Top-Down Design and Procedural Programming, 3 Problems with Top-Down Design, 3 Classes and Objects, 4 Fields

More information

Getting Started in Java. Bill Pugh Dept. of Computer Science Univ. of Maryland, College Park

Getting Started in Java. Bill Pugh Dept. of Computer Science Univ. of Maryland, College Park Getting Started in Java Bill Pugh Dept. of Computer Science Univ. of Maryland, College Park Hello, World In HelloWorld.java public class HelloWorld { public static void main(string [] args) { System.out.println(

More information

Ibis Communication Library User s Guide

Ibis Communication Library User s Guide Ibis Communication Library User s Guide http://www.cs.vu.nl/ibis May 24, 2012 1 Introduction This manual describes the steps required to run an application that uses the Ibis communication library. How

More information

Dependencies, dependencies, dependencies

Dependencies, dependencies, dependencies Dependencies, dependencies, dependencies Marcel Offermans!"#$%&'&()"* 1 Marcel Offermans Fellow and Software Architect at Luminis Technologies marcel.offermans@luminis.nl Member and Committer at Apache

More information

ESC/Java2 Use and Features David Cok, Joe Kiniry, Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen

ESC/Java2 Use and Features David Cok, Joe Kiniry, Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen ESC/Java2 Use and Features David Cok, Joe Kiniry, Erik Poll Eastman Kodak Company, University College Dublin, and Radboud University Nijmegen David Cok, Joe Kiniry & Erik Poll - ESC/Java2 & JML Tutorial

More information

Managing Installations and Provisioning of OSGi Applications. Carsten Ziegeler

Managing Installations and Provisioning of OSGi Applications. Carsten Ziegeler Managing Installations and Provisioning of OSGi Applications Carsten Ziegeler cziegeler@apache.org About Member of the ASF Current PMC Chair of Apache Sling Apache Sling, Felix, ACE, Portals (Incubator,

More information

This is a placeholder since 0 (zero) is not an error. No action. Not an error.

This is a placeholder since 0 (zero) is not an error. No action. Not an error. CHAPTER 5 Revised: July 2010, This chapter describes basic cadexceptions, debug actions, and network configuration procedures. Cadexceptions The following basic cadexceptions can be returned. The numbers

More information

Peter Kriens OSGi Evangelist/Director. OSGi R4.3 // Next Release Overview

Peter Kriens OSGi Evangelist/Director. OSGi R4.3 // Next Release Overview Peter Kriens OSGi Evangelist/Director OSGi R4.3 // Next Release Overview Agenda Framework & ServiceTracker update to Java 5 generics A replacement for Package Admin and Start Level A Shell standard Managing

More information

Install and Configure ANTLR 4 on Eclipse and Ubuntu

Install and Configure ANTLR 4 on Eclipse and Ubuntu Install and Configure ANTLR 4 on Eclipse and Ubuntu Ronald Mak Department of Computer Engineering Department of Computer Science January 20, 2019 Introduction ANTLR 4 ( Another Tool for Language Recognition

More information

Project #1 rev 2 Computer Science 2334 Fall 2013 This project is individual work. Each student must complete this assignment independently.

Project #1 rev 2 Computer Science 2334 Fall 2013 This project is individual work. Each student must complete this assignment independently. Project #1 rev 2 Computer Science 2334 Fall 2013 This project is individual work. Each student must complete this assignment independently. User Request: Create a simple magazine data system. Milestones:

More information

2.3 Unix Streaming and Piping

2.3 Unix Streaming and Piping 2.3 Unix Streaming and Piping In addition to streams explicitly opened by applications, the Unix system provides you with 3 special streams: stdin (standard input): This stream is usually connected to

More information

Comparing JavaBeans and OSGi

Comparing JavaBeans and OSGi Comparing JavaBeans and OSGi Towards an Integration of Two Complementary Component Models HUMBERTO CERVANTES JEAN-MARIE FAVRE 09/02 Who I Am Humberto Cervantes 3d year PhD at Adèle team, LSR, Grenoble

More information

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find

CS1622. Semantic Analysis. The Compiler So Far. Lecture 15 Semantic Analysis. How to build symbol tables How to use them to find CS1622 Lecture 15 Semantic Analysis CS 1622 Lecture 15 1 Semantic Analysis How to build symbol tables How to use them to find multiply-declared and undeclared variables. How to perform type checking CS

More information

Project 1: Remote Method Invocation CSE 291 Spring 2016

Project 1: Remote Method Invocation CSE 291 Spring 2016 Project 1: Remote Method Invocation CSE 291 Spring 2016 Assigned: Tuesday, 5 April Due: Thursday, 28 April Overview In this project, you will implement a remote method invocation (RMI) library. RMI forwards

More information

EXCEPTIONS. Fundamentals of Computer Science I

EXCEPTIONS. Fundamentals of Computer Science I EXCEPTIONS Exception in thread "main" java.lang.numberformatexception: For input string: "3.5" at java.lang.numberformatexception.forinputstring(numberformatexception.java:48) at java.lang.integer.parseint(integer.java:458)

More information

Java in 21 minutes. Hello world. hello world. exceptions. basic data types. constructors. classes & objects I/O. program structure.

Java in 21 minutes. Hello world. hello world. exceptions. basic data types. constructors. classes & objects I/O. program structure. Java in 21 minutes hello world basic data types classes & objects program structure constructors garbage collection I/O exceptions Strings Hello world import java.io.*; public class hello { public static

More information

Frequently Asked Questions

Frequently Asked Questions Frequently Asked Questions This PowerTools FAQ answers many frequently asked questions regarding the functionality of the various parts of the PowerTools suite. The questions are organized in the following

More information

Downloading Tweet Streams and Parsing

Downloading Tweet Streams and Parsing and Parsing Ayan Bandyopadhyay IR Lab. CVPR Unit Indian Statistical Institute (Kolkata) To download this slide go to: https://goo.gl/aywi1s 1 and Parsing Downloading Tweet Streams It is imagined that Tweets

More information

SHIFTLEFT OCULAR THE CODE PROPERTY GRAPH

SHIFTLEFT OCULAR THE CODE PROPERTY GRAPH SHIFTLEFT OCULAR INTRODUCTION ShiftLeft Ocular offers code auditors the full range of capabilities of ShiftLeft s best-in-class static code analysis 1, ShiftLeft Inspect. Ocular enables code auditors to

More information

Objec-ves JAR FILES. Jar files. Excep-ons. Files Streams. Ø Wrap up Ø Why Excep-ons? 9/30/16. Oct 3, 2016 Sprenkle - CSCI209 1

Objec-ves JAR FILES. Jar files. Excep-ons. Files Streams. Ø Wrap up Ø Why Excep-ons? 9/30/16. Oct 3, 2016 Sprenkle - CSCI209 1 Objec-ves Jar files Excep-ons Ø Wrap up Ø Why Excep-ons? Files Streams Oct 3, 2016 Sprenkle - CSCI209 1 JAR FILES Oct 3, 2016 Sprenkle - CSCI209 2 1 Jar (Java Archive) Files Archives of Java files Package

More information

RMI Case Study. A Typical RMI Application

RMI Case Study. A Typical RMI Application RMI Case Study This example taken directly from the Java RMI tutorial http://java.sun.com/docs/books/tutorial/rmi/ Editorial note: Please do yourself a favor and work through the tutorial yourself If you

More information

Signicat Connector for Java Version 2.6. Document version 3

Signicat Connector for Java Version 2.6. Document version 3 Signicat Connector for Java Version 2.6 Document version 3 About this document Purpose Target This document is a guideline for using Signicat Connector for Java. Signicat Connector for Java is a client

More information

Patterns and Best Practices for Dynamic OSGi Applications

Patterns and Best Practices for Dynamic OSGi Applications Patterns and Best Practices for Dynamic OSGi Applications Kai Tödter, Siemens Corporate Technology Gerd Wütherich, Freelancer Martin Lippert, akquinet it-agile GmbH Agenda» Dynamic OSGi applications» Basics»

More information

Project Compiler. CS031 TA Help Session November 28, 2011

Project Compiler. CS031 TA Help Session November 28, 2011 Project Compiler CS031 TA Help Session November 28, 2011 Motivation Generally, it s easier to program in higher-level languages than in assembly. Our goal is to automate the conversion from a higher-level

More information

JSR 277, 291 and OSGi, Oh My! - OSGi and Java Modularity

JSR 277, 291 and OSGi, Oh My! - OSGi and Java Modularity JSR 277, 291 and OSGi, Oh My! - OSGi and Java Modularity Richard S. Hall June 28 th, 2006 Agenda Modularity Modularity in Java Modularity in Java + OSGi technology Introduction to OSGi technology Apache

More information

Tuesday, April 26, 2011

Tuesday, April 26, 2011 Modular Class Loading With JBoss Modules David M. Lloyd Senior Software Engineer, Red Hat, Inc. The Class Path is Dead - Mark Reinhold, 2009 What does this mean? The limitations inherent in -classpath

More information

Some Notes on R Event Handling

Some Notes on R Event Handling Some Notes on R Event Handling Luke Tierney Statistics and Actuatial Science University of Iowa December 9, 2003 1 Some Things that Do Not Work Here is a non-exhaustive list of a few issues I know about.

More information

OSGi Cloud Ecosystems. David Bosschaert Principal Engineer, JBoss/Red Hat March 2013

OSGi Cloud Ecosystems. David Bosschaert Principal Engineer, JBoss/Red Hat March 2013 OSGi Cloud Ecosystems David Bosschaert Principal Engineer, JBoss/Red Hat david@redhat.com March 2013 Agenda PaaS today OSGi Cloud Ecosystems 'Demo' PaaS offerings today (1) General deployment containers

More information

Java obfuscator: implementation. Re-Trust quarterly meeting Villach, March 11, 2008

Java obfuscator: implementation. Re-Trust quarterly meeting Villach, March 11, 2008 Java obfuscator: implementation Pierre.Girard@gemalto.com Re-Trust quarterly meeting Villach, March 11, 2008 Introduction Java obfuscator design presented one year ago Use cases for Java obfuscation in

More information

Creating a custom control using Java

Creating a custom control using Java Creating a custom control using Java sfx comes with a palette of built-in controls that feature a wide range of use cases. But sometimes you would like to further customize your robot dashboard with controls

More information

Testing Exceptions with Enforcer

Testing Exceptions with Enforcer Testing Exceptions with Enforcer Cyrille Artho February 23, 2010 National Institute of Advanced Industrial Science and Technology (AIST), Research Center for Information Security (RCIS) Abstract Java library

More information

The following steps will create an Eclipse project containing source code for Problem Set 1:

The following steps will create an Eclipse project containing source code for Problem Set 1: Problem Set 1 Programming Music Out: 27 August Due: Monday, 1 Sept (beginning of class) Collaboration Policy - Read Carefully For this problem set, you should work alone, but feel free to ask other students

More information

USING THE OOSIML/JAVA. With a Terminal Window

USING THE OOSIML/JAVA. With a Terminal Window USING THE OOSIML/JAVA With a Terminal Window On Linux Operating System José M. Garrido Department of Computer Science December 2017 College of Computing and Software Engineering Kennesaw State University

More information

SAP Edge Services, cloud edition Edge Services Predictive Analytics Service Guide Version 1803

SAP Edge Services, cloud edition Edge Services Predictive Analytics Service Guide Version 1803 SAP Edge Services, cloud edition Edge Services Predictive Analytics Service Guide Version 1803 Table of Contents MACHINE LEARNING AND PREDICTIVE ANALYTICS... 3 Model Trained with R and Exported as PMML...

More information

CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 165] Postfix Expressions

CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 165] Postfix Expressions CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 165] Postfix Expressions We normally write arithmetic expressions using infix notation: the operator (such as +) goes in between the

More information

CSE 142/143 Unofficial Commenting Guide Eric Arendt, Alyssa Harding, Melissa Winstanley

CSE 142/143 Unofficial Commenting Guide Eric Arendt, Alyssa Harding, Melissa Winstanley CSE 142/143 Unofficial Commenting Guide Eric Arendt, Alyssa Harding, Melissa Winstanley In Brief: What You Need to Know to Comment Methods in CSE 143 Audience o A random person you don t know who wants

More information

The Interceptor Architectural Pattern

The Interceptor Architectural Pattern Dr.-Ing. Michael Eichberg eichberg@informatik.tu-darmstadt.de The Interceptor Architectural Pattern Pattern-oriented Software Architecture Volume 2 Patterns for Concurrent and Networked Objects; Douglas

More information

Customizing the WebSphere Portal login and logout commands

Customizing the WebSphere Portal login and logout commands Customizing the WebSphere Portal login and logout commands Abstract This technical note provides detailed information about how the WebSphere Portal login or logout flow can be extended or customized by

More information

Table of Contents. 1 Context 2. 2 Problem statement 2. 3 Related work 2

Table of Contents. 1 Context 2. 2 Problem statement 2. 3 Related work 2 Table of Contents 1 Context 2 2 Problem statement 2 3 Related work 2 4 Solution approach 3 4.1 Separation is the key 3 4.2 The Module class 3 4.3 Directory contents 5 4.4 Binary instead of library 6 4.5

More information

CS11 Advanced Java. Winter Lecture 2

CS11 Advanced Java. Winter Lecture 2 CS11 Advanced Java Winter 2011-2012 Lecture 2 Today s Topics n Assertions n Java 1.5 Annotations n Classpaths n Unit Testing! n Lab 2 hints J Assertions! n Assertions are a very useful language feature

More information

BEAAquaLogic. Service Bus. Interoperability With EJB Transport

BEAAquaLogic. Service Bus. Interoperability With EJB Transport BEAAquaLogic Service Bus Interoperability With EJB Transport Version 3.0 Revised: February 2008 Contents EJB Transport Introduction...........................................................1-1 Invoking

More information

WebSphere Message Broker. Programming

WebSphere Message Broker. Programming WebSphere Message Broker CMP Programming Version 6 Release 0 WebSphere Message Broker CMP Programming Version 6 Release 0 Note Before using this information and the product it supports, read the information

More information

About me. Jesper Pedersen. Project lead for. Chairman for Boston JBoss User Group. Core developer, JBoss by Red Hat

About me. Jesper Pedersen. Project lead for. Chairman for Boston JBoss User Group. Core developer, JBoss by Red Hat About me Jesper Pedersen Core developer, JBoss by Red Hat Project lead for IronJacamar JCA container Tattletale software quality tool JBoss Profiler 2 profiler suite Papaki high-performance annotation

More information

OSGi. Tales from the Trenches. OSGitales from the trenches

OSGi. Tales from the Trenches. OSGitales from the trenches OSGi Tales from the Trenches Bertrand Delacretaz Senior R&D Developer, Day Software, www.day.com Apache Software Foundation Member and Director bdelacretaz@apache.org blog: http://grep.codeconsult.ch twitter:

More information

Chapter 1. JOnAS and JMX, registering and manipulating MBeans

Chapter 1. JOnAS and JMX, registering and manipulating MBeans Chapter 1. JOnAS and JMX, registering and manipulating MBeans Table of Contents 1.1. Introduction... 1 1.2. ServletContextListener... 1 1.3. Configuration... 4 1.4. Library Dependences... 4 1.5. HibernateService

More information

Pace University. Fundamental Concepts of CS121 1

Pace University. Fundamental Concepts of CS121 1 Pace University Fundamental Concepts of CS121 1 Dr. Lixin Tao http://csis.pace.edu/~lixin Computer Science Department Pace University October 12, 2005 This document complements my tutorial Introduction

More information

API Developer Notes. A Galileo Web Services Java Connection Class Using Axis. 29 June Version 1.3

API Developer Notes. A Galileo Web Services Java Connection Class Using Axis. 29 June Version 1.3 API Developer Notes A Galileo Web Services Java Connection Class Using Axis 29 June 2012 Version 1.3 THE INFORMATION CONTAINED IN THIS DOCUMENT IS CONFIDENTIAL AND PROPRIETARY TO TRAVELPORT Copyright Copyright

More information

ValWorkBench library Developer Guide

ValWorkBench library Developer Guide ValWorkBench: an open source Java library for cluster validation with applications to microarray data analysis Università Degli Studi di Palermo, Dipartimento di Matematica ed Informatica ValWorkBench

More information

ASSIGNMENT 5 Objects, Files, and More Garage Management

ASSIGNMENT 5 Objects, Files, and More Garage Management ASSIGNMENT 5 Objects, Files, and More Garage Management COMP-202B, Winter 2010, All Sections Due: Wednesday, April 14, 2009 (23:55) You MUST do this assignment individually and, unless otherwise specified,

More information