没有合适的资源?快使用搜索试试~ 我知道了~
首页STK-X Tutorials-Java
资源详情
资源评论
资源推荐
STK X Tutorial – Java Using J-Integra
In this exercise you will gain hands-on experience using STK X to embed STK
functionality in a container application created with Java using J-integra. Here we
are using J-Integra for COM 2.2 and JRE 1.5.0_09.
N
OTE: information on obtaining and installing J-integra can be found at
http://j-integra.intrinsyc.com/com/download/.
CONTENTS
GENERATE JAVA COM CODE USING J-INTEGRA............................................................. 1
CREATE THE APPLICATION ........................................................................................ 3
ADD THE STK X CONTROLS TO THE WINDOW .............................................................. 6
SEND COMMANDS TO STK X...................................................................................... 7
ADD ZOOM IN/OUT TO THE MAP CONTROL .................................................................. 8
RESPOND TO EVENTS RAISED BY STK X.....................................................................10
ADD MAP PICKING...................................................................................................11
SET STK X PROPERTIES ...........................................................................................13
Generate Java COM code using J-integra
1) Run the application com2java.exe in the <J-integra Install>in
directory.
2) Click the select button at the top of the window and locate the AgStkUtil.dll,
STKX.dll, AgStkObjects.dll to be used to generate the Java code.
STK X Tutorial – Java Using J-Integra 1
3) In the text box labeled
Java package, type the name of the package in which you
want the code to be placed. This tutorial will use the packages of agi.stkobjects,
agi.stkutil, and agi.stkx.
Note: If AgStkObjects.dll is not required for a STKX application, but provides an
extensive API for accessing STK Objects and their Data Providers in an
programmatic way replacing some Connect calls.
4) Select the
Options… button and verify that the following options are enabled:
• Lowercase Method names
• Implement interfaces that may conflict
• Generate BeanInfo
• Generate JavaAWT classes
• Re-use methods if interfaces contain duplicates
5) Click the
Generate Proxies… button.
STK X Tutorial – Java Using J-Integra 2
6) Check the generated files AgUiAxVOCntrl.java and AgUiAx2DCntrl.java to make
sure the classes AgUiAxVOCntrl and AgUiAx2DCntrl extend from the
com.linar.jintegra.Ocx class. If the AgUiAxVOCntrl and AgUiAx2DCntrl do not
extend from the Ocx class you will likely get compile errors stating that you cannot
cast a non-Component type to the java.awt.Component type. The com2java.exe tool
can sometimes use settings which are not the same as what the GUI shows. This is
a known bug, according to JIntegra technical support, and usually occurs when the
com2java.exe GUI is open for a long period of time and multiple changes to the
settings are made. To avoid this, exercise the following steps:
a) Open the com2java.exe GUI
b) Modify your settings so they are all set as described earlier in this document
c) Close the com2java.exe GUI
d) Re-open the com2java.exe GUI
e) Click 'Generate'
Compiling the JIntegra output Java code
1) Open a command prompt to the base directory of your JIntegra outputted Java
code.
2) Enter the command "dir", and make sure the folder is "agi".
3) Type the command as seen in the picture below:
Where:
-J-Xms32m is used to set the initial Javac heap size.
-J-Xmx128m is used to set the maximum Javac heap size.
If you get a response from the compiler like the following:
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError
Then increase the maximum stack size to 256, 512, or more, as follows:
javac -J-Xms32m -J-Xmx256m agi/stkutil/*.java agi/stkobjects/*.java
agi/stkx/*.java
4) Ensure that your CLASSPATH environment variable includes the directory that
contains your agi top-level wrappers folder.
STK X Tutorial – Java Using J-Integra 3
剩余13页未读,继续阅读
51星系
- 粉丝: 1512
- 资源: 136
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- 27页智慧街道信息化建设综合解决方案.pptx
- 计算机二级Ms-Office选择题汇总.doc
- 单链表的插入和删除实验报告 (2).docx
- 单链表的插入和删除实验报告.pdf
- 物联网智能终端项目设备管理方案.pdf
- 如何打造品牌的模式.doc
- 样式控制与页面布局.pdf
- 武汉理工Java实验报告(二).docx
- 2021线上新品消费趋势报告.pdf
- 第3章 Matlab中的矩阵及其运算.docx
- 基于Web的人力资源管理系统的必要性和可行性.doc
- 基于一阶倒立摆的matlab仿真实验.doc
- 速运公司物流管理模式研究教材
- 大数据与管理.pptx
- 单片机课程设计之步进电机.doc
- 大数据与数据挖掘.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1