Download presentation
Presentation is loading. Please wait.
Published byDawson Perkin Modified over 9 years ago
1
Rick Root
2
It just doesn’t seem right to have a slide with bullet points that prompt me to talk about myself.
3
Extend ColdFusion with “core” java Extend ColdFusion with external java libraries We will not talk about JVM tuning, writing CFX Custom Tags in Java, or writing your own Java classes.
4
ColdFusion newbs Never really used Java in ColdFusion Just here for the networking
6
Java Objects Data Types Creating and Initializing Java Objects JavaCast() Examples
7
It all starts with java.langObjectjava.langObject Java objects have methods, so ColdFusion variables do to. Example 1
8
Strictly typed, very picky! Don’t assume! Example 2
9
In Java, create and initialize all at once, ie: foo = new ClassName(arguments) In CF, use CreateObject() and init() method foo = CreateObject(“java”,”path.to.ClassName”); foo.init(arguments); Multiple constructors / overloaded methods foo.init(“string”); foo.init(someint);
10
Force a ColdFusion variable to be a specific data type Example 3 & 4
11
Object creation is expensive Strings are immutable Java StringBuffer object can help! Example 5
12
Where to Install Java Loader Examples
13
Standalone: /lib Multi-server Install, all instances: /servers/lib Multi-server install, specific Instance: /servers/ /cfusion.ear/cfusion.war /WEB-INF/cfusion/lib Anywhere you want!
14
javaloader.cfc – Mark Mandel Access classes without requiring them to be in the server CLASSPATH Javaloader.riaforge.org Javaloader.riaforge.org Example 6
15
Generating Excel Files Creating delimited text files Extracting JPEG image metadata
16
Apache POI – API to interface with Microsoft Office files http://poi.apache.org http://poi.apache.org Create Excel files in native format Use more Excel features Example 7
17
JavaCSV makes it easy Choose your delimiter Automatic quoting when data contains your delimiter or even newlines Example 8
18
Digital cameras store lots of metadata in captured images Timestamp Exposure Camera model Lots of stuff I don’t understand! Example 9
19
Rick Root rick.root@gmail.com rick.root@gmail.com http://www.opensourcecf.com/ http://www.opensourcecf.com/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.