中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档 | 网通镜像
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 程序开发 > 编程语言 > Java > 测试
Cyberflex Open 16K Development Kit by Schlumberger @ JDJ
作者:未知 时间:2005-08-10 22:24 出处:Java频道 责编:chinaitpower
              摘要:Cyberflex Open 16K Development Kit by Schlumberger @ JDJ
One of the coolest pieces of technology I'd ever used was a programming interface for HK Systems' mechanical cranes. However, my coolness factor just went through the roof when I got a chance to try out the Cyberflex Open 16k Development Kit from Schlumberger Smart Cards and Systems. Schlumberger is well known in high-tech oilfield and measurement systems, and the Cyberflex development team is part of their Testing and Transactions group. The Java Card technology offers some exciting opportunities for building security and "wallet" applications using the Java language, and Schlumberger is at the forefront of this effort.

Product Installation
The Cyberflex kit ships with a Litronic 210 card reader, two Cyberflex smart cards and the development software on a CD-ROM. The installation process itself is straightforward; it's built with DemoShield so it behaves like a typical product installation. There are four pieces of software to install: the Microsoft Smart Card Base Components, the Litronic 210 Reader Driver, the Cyberflex Toolkit and the Cyberflex Documentation and Samples. Each installation requires a reboot operation, which slows down the overall installation, but it still took only ten minutes to install everything. The biggest challenge is getting the Litronic card reader plugged in and operating, as it uses a 25-pin serial adapter to connect to your workstation. Since I was running on a laptop, I was forced to dig into my bag of tricks and find a 25-pin to 9-pin converter (which Schlumberger is now including in their kits). The reader is powered off the keyboard connector, and I was able to connect my external mouse and the reader power supply into the same port without difficulty.

Developing a Java Card Application
I'd advise you to read through the Programmer's Guide and the Java Card 2.0 specification document before you try working with the software. The Java Card 2.0 API is based on the ISO 7816 framework for smart cards, and not all smart card vendors implement all features for all parts of the ISO 7816 standard. Although I don't have a background in smart-card programming, I could follow the manual fairly easily. There are several key terms to understand before you get rolling. The first is Application Protocol Data Unit (APDU), the message you send between your application and the smart card. The Card Acceptance Device (CAD) is the physical device into which the smart card is inserted. The Java Card Runtime Environment (JCRE) is the Java Card Virtual Machine and core Java Card API classes. You should also remember that, by definition, objects on the Java Card are persistent, i.e., values persist from one CAD session to the next.

Schlumberger provides a number of sample applications as Java source files along with the development kit, and I suggest you start with the examples before striking out on your own. While the Java Card technology is powerful, you have to get used to working in a 16 K environment again, and the command language for ISO 7816 can be somewhat limiting if you aren't used to it. The Java applications you build use only Boolean, byte and short data types; your code must be derived from the applet class and compiled with the debugging option set, even for production code.

I ignored convention and started with the most complex of the four sample applications, the Wallet application. I used Oracle's JDeveloper 1.0 to open the Java source code for Wallet and followed the instructions in the tutorial for compiling and testing the application. You'll find the instructions at this point a trifle unclear since you need to use the simulator class libraries to test your program and the tutorial doesn't explicitly point you toward that. In general, I found the printed documentation a bit skimpy, but the Cyberflex Web site (www.cyberflex.slb.com) has a good newsgroup bulletin board. Thanks to the numerous postings from Schlumberger's Anthony Chen, I quickly figured out that I had the wrong libraries. Once I fixed that problem, I used the APDU simulator to test the Wallet program (see Figure 1).

Deploying the Code
The APDU Manager, part of the Cyberflex toolkit, allows you to input commands and data to your program as if the code was running on the Java Card itself. On the left-hand side of the panel is the input window, which you can use to input a command string to your Java program. The right-hand panel of the form shows the output from the program after processing your command. The simulator offers some clever additions, such as the ability to save commands for later reuse. Once I successfully tested the program with the simulator, I used the MakeSolo utility to convert my Java class file into a stand-alone executable program and deployed the code to the Java Card without difficulty.

Building Your Own Program from Scratch
Once you're ready to begin developing programs from scratch, Schlumberger provides a simple, elegant skeleton Java program from which you can base your code. The skeleton code is derived from the Java applet class, and there is basically a five-step process to build your own program. First you create the applet name and class of instruction (CLA), then definitions for the primitive commands you'll be supporting. Next you define and allocate your instance variables for the application and create your class methods for the processing you plan to support in your program. The final step is to connect your methods to the APDU framework, which connects the messaging from the card to your application. Some restrictions are imposed on your code by the framework, and I'd suggest that you read the "Programming Requirements" section of the Developer's Guide before you start designing your own custom program.

Final Notes
Schlumberger is branding a complete line of smart technology under the Smart Village trademark, and they can print their Cyberflex cards with your company logo and information. The cards themselves have the same dimensions as a credit card with a small gold chip on the surface. Schlumberger's Cyberflex Open 16k Development Kit is worth looking into if you're considering using the technology for security or payment systems. Some other things you can get involved with are ID/personnel information, health care and telecommunications.

关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有