You are on page 1of 5

Contents

Introduction Why Not Just Use Java? Minimum Requirements Standardization and Compliance Breadth of Content Naming Conventions AIR Service Programs Downloading the Source Code Compiling the Examples Chapter 1 Learning to Provide Modern Solutions Providing Solutions to Meet Todays Industry Standards Evolving Your RPG Development Skills Integrating RPG with Java Creating Electronic Documents Distributing Electronic Documents Using E-mail Chapter 2 The Integrated Language Environment Converting Existing OPM Source Code to ILE Compiling ILE Source Code into a *PGM Object Modules Procedures Prototyping Procedure Interface Activation Groups Service Programs Putting the Concepts to Work Compiler Directives

1 2 3 5 5 5 6 8 8 11 11 14 15 17 17 19 20 21 23 23 23 25 26 29 31 43

ix

CONTENTS

Chapter 3 Advanced ILE RPG Free-Format RPG Built-In Functions APIs Chapter 4 Introduction to Java Java Classes Java Methods Java Objects Java Packages Import Class Path Static Methods Main Method Naming Conventions Public and Private Access Control Encapsulation and the JavaBeans Naming Standards Inheritance and Polymorphism Integrated Development Environment JavaDoc A Good Foundation Chapter 5 Java and RPG Determining the Current Version of Java Java Invocation API Accessing Java Objects from Within RPG Accessing Java Methods from Within RPG Java Object Constructors The QSYSINC/QRPGLESRC,JNI File Java Primitive Types Referring to External Jar Files The SVAIRJAVA Service Program Installing External Jar Files on the IFS Standard JVM Streams: STDIN, STDOUT, and STDERR Starting and Destroying the JVM

47 48 56 67 77 77 78 78 79 81 82 82 83 83 83 84 88 100 101 104 105 105 106 107 108 109 110 110 111 113 113 116 118

Contents

JNI Service Program QJVAJNI Thread-Safe RPG with THREAD(*SERIALIZE) Garbage Collection Hello World Chapter 6 Java Native Interface Advanced JNI RPG Code Sample to Access Java Instance Variables Arrays of Objects Exception Handling On to the Fun Stuff Chapter 7 Excel Basics Creating Excel Spreadsheets Using Apache POI Installing POI POI Version Compatibility Common Code Apache POI and Java JavaDocs Constants Excel Components Hello World Chapter 8 Excel Formatting and Properties Fonts and Colors Cell Styles Font and Cell Style Constructors AirExcel_setCellValue Xxx Revisited Data Formatting Date Formatting Column Width and Text Wrap Setting Print and Display Properties Headers and Footers Chapter 9 Formulas Excel Formulas and Charts

121 121 123 126 129 129 137 144 149 153 155 155 156 157 158 159 159 161 174 177 178 181 183 188 189 196 199 203 207 217 217

xi

CONTENTS

The Java Iterator Class Using Sheet Indexes Working with Rows Within Sheets Working with Cells Within Rows Working with Cell Types and Values Reading an Existing Spreadsheet Charts, Graphs, and Images Chapter 10 PDF Basics Installing iText Common Code iText and Java JavaDocs iText Components Adding Elements to a Document Saving the PDF File Hello World PDF Metadata Chapter 11 PDF Formatting Colors Fonts PDF Tables Adding a New Page Hyperlinks Lists Chapter 12 PDF Images and Bar Codes Images with Borders Images with Text Wrapping Bar Codes Chapter 13 Sending E-Mail JavaMail Common Code JavaMail and JAF JavaDocs

222 223 224 226 227 230 235 243 243 245 246 246 254 254 260 262 267 268 271 274 279 279 286 291 291 297 301 315 316 318 319

xii

Contents

Sending a Text E-Mail Calling a Static Method Using JNI MimeMessage Chapter 14 JavaMail Formatting and Attachments Sending an E-Mail with HTML Content Sending an HTML E-Mail with Images in RPG Sending an E-mail with Attachments Sending an E-Mail with Embedded Images in Java Thats a Wrap Appendix A EBCDIC/ASCII/Hexadecimal Translation Table Appendix B Appendix C RPG Java POI iText JavaMail Other Topics Data Formats for Use with HSSFDataFormat References and Resources

319 338 339 345 346 352 354 360 361 363 367 369 369 370 370 371 371 372

xiii

You might also like