论坛 
IT客
设为首页
加入收藏
关于我们
首页  | 程序 | IT新闻 | IT基础 | 网络 | 系统 | 数据库 | 软件开发 | 软件下载 | 电影频道 | FLASH | 图片 | 技术文档 | 分类信息
网络 Cisco 网络设备 解决方案 系统 Windows Linux 服务器 系统安全 程序 Java Dotnet 数据库 Oracle MySQL MSSQL 软件开发 Web开发 桌面开发 IT基础 网页设计 平面设计 多媒体 工具软件 即时通讯 Flash FLASH爆笑 FLASH游戏 FLASH MTV FLASH彩铃 图片 明星 美女 笑话大全
子栏目  | 安装配置 | 基础入门 | 开发工具 | JDK | oop面向对象
首页 > 程序 > java > 新手入门 > 安装配置 >
 
配置J2EE(v1.4.02)和Cloudscape(10.0)
作者: 发布时间:2008-04-13 13:42:07 来源:

  前天只是下载下来并没有配置,今天配置下
  
  首先我们来配置J2EE,去Sun公司下载J2SDK,和J2SDKEE,其实,我们可以下载那个集成版本的,地址我提取出来了
  
  这个版本集成了它们两个,其中的J2SDK在安装后的J2EE_SDK文件夹(我定义的那个安装目录名字为J2EE_SDK)的jdk/目录。
  
  配置J2EE的环境变量比较简单,我们可以先来设置两个变量,我设置的如下:
  J2EE_HOME: .../J2EE_SDK
  J2DK_HOME:.../J2EE_SDK/jdk
  
  添加path为:%J2EE_HOME%/bin;:%J2DK_HOME%/bin;
  
  检查CLASSPATH值,没有则新建。先给默认值:“.“; value是:.; 然后添加%J2EE_HOME%/lib/J2EE.jar;
  
  在开始菜单中启动J2EE,菜单项为start default server, 启动成功后,向地址栏输入: http://localhost:port/index.html 其中的port是你安装时设置的端口号,我设置的为8000, 因为如果有http服务器如IIS,它占用80,而如果有Tomcat,占用8080,按照惯例,就给他8000吧~
  
  如果出现J2EE画面,说明配置成功。
  
  下面配置Cloudscape
  
  其实人家IBM说的很清楚了,下面我摘取一下原文(前天我从网上找的那篇文章说实话已经有点儿落伍了,另外,那个人也不怎么会用环境变量 :-)
  
  Using sysinfo
  
  You can use Cloudscape’s sysinfo tool to check the versions of Cloudscape products. Once you have the bin directory in your PATH, you can run sysinfo by typing the following command in a command window:
  
  sysinfo
  
  The sysinfo script sets the appropriate environment variables, including class path, and executes the sysinfo program.
  
  Running ij
  
  You can use the ij tool to connect to a Cloudscape database. Once you have the bin directory in your PATH, you can execute the ij command by typing the following:
  
  ij
  
  The ij script sets up environment variables like class path and executes the ij program.
  
  To create a database with ij, type the following command:
  ij> connect ’jdbc:cloudscape:testdb;create=true’;
  
  This command creates the database called testdb in the current directory and populates the system tables. You can then execute any SQL statements from the ij command line. When you are ready to leave ij, type:
  
  ij> exit;
  
  See the IBM Cloudscape Tools and Utilities Guide for more information on running ij.
  
  --------------------------------------------------------------------------------
  
  Manually setting environment variables and paths
  
  If you cannot run the scripts for the Cloudscape tools and utilities, you must complete certain steps manually. The following topics show how to manually set your environment and run the tools manually.
  
  The installation program asked you to choose a base directory where the software was installed; we recommended that you name it Cloudscape_10. This document refers to that directory as the Cloudscape base directory.
  
  If you do not plan to use the scripts in the frameworks/embedded/bin directory and your operating system supports it, create an environment variable called CLOUDSCAPE_INSTALL and set its value to the path of the Cloudscape base directory. For example, if you installed the product in c:/Cloudscape_10, set CLOUDSCAPE_INSTALL to c:/Cloudscape_10:
  
  set CLOUDSCAPE_INSTALL=c:/Cloudscape_10
  
  The JVM (compiler or interpreter) needs to know the path (operating system instructions about location) of every class file needed by your application. The class path is a list of the class libraries needed by the JVM and other Java applications in order to run your program.
  
  There are two ways to set the class path. You can set the operating system’s CLASSPATH environment variable permanently or temporarily. If you set the environment variable temporarily, you must set it each time you open a new command window. Alternatively, you can set the class path with the runtime option, which means specifying the class path at the time you start your Java application and the JVM.
  
  In most development environments, it works best to set the operating system’s CLASSPATH environment variable temporarily. Cloudscape provides some scripts to help you set your class path this way; they are found in theframeworks/embedded/bin directory or the frameworks/NetworkServer/bin directory. Run a script every time you open a new command window.
  
  For example, you can set your class path as follows:
  
  set CLASSPATH=%CLOUDSCAPE_INSTALL%/lib/cs.jar; %CLOUDSCAPE_INSTALL%/lib/cstools.jar;%CLASSPATH%
  
  To manually run the sysinfo utility, type the following in a command window or shell:
  
  java com.ihost.cs.tools.sysinfo
  
  To manually run the ij utility, type the following in a command window or shell:
  
  java com.ihost.cs.tools.ij
  ij> connect 'jdbc:cloudscape:testdb;create=true';
  
  When you are finished running the ij utility, type:
  ij> exit;
  
  看懂了吗?
  其实很简单,他说建议你加一个变量为Cloudscape_install, 值为安装目录,我建立的是CLOUDSCAPE_HOME, 然后说加入一个path,为%CLOUDSCAPE_HOME%/frameworks/embedded/bin这样就可以执行里面的bat文件了,就是sysinfo,ij。然后又加入到CLASSPATH中的如下值:lib中的那些jar文件,我就不详细写了。然后就可以运行这些工具了。
  
  先写到这儿我先重启一下。
  
  继续...
  
  设置好了上面的Classpath,那么我们就可以做下面的例子了;如果出现class找不到,有可能你的Classpath没有设置好,你看一下cmd后中的set命令出来的结果,看与你设置的符合吗? 如果不一样,则你设置不对
  
  Output Cloudscape 10.0 version information
  
  C:/>java com.ihost.cs.tools.sysinfo------------------ Java Information ------------------Java Version:  1.4.2_04Java Vendor:   Sun Microsystems Inc.Java home:    C:/Program Files/Java/j2re1.4.2_04Java classpath: .;E:/Program Files/J2EE_SDK/lib/J2EE.jar;E:/Program Files/IBM/Cloudscape_10.0/lib/cs.jar;E:/Program Files/IBM/Cloudscape_10.0/lib/cstools.jar;E:/Program Files/IBM/Cloudscape_10.0/lib/csnet.jar;E:/Program Files/J2EE_SDK/jdk/lib/tools.jar;E:/Program Files/J2EE_SDK/jdk/lib/dt.jar;OS name:     Windows XPOS architecture: x86OS version:   5.1Java user name: tsuijyJava user home: D:/SettingsJava user dir:  C:/--------- Cloudscape Information --------[E:/Program Files/IBM/Cloudscape_10.0/lib/cs.jar] 10.0.1.0 beta - (29729)[E:/Program Files/IBM/Cloudscape_10.0/lib/cstools.jar] 10.0.1.0 beta - (29729)[E:/Program Files/IBM/Cloudscape_10.0/lib/csnet.jar] 10.0.1.0 beta - (29729)----------------------------------------------------------------------- Locale Information -----------------------------------------------------------------------
  
  C:/>java com.ihost.cs.tools.ijij version 10.0 (c) 1997, 2004 IBM Corp.ij>
  
  Used without additional arguments, the -cp option tests for all Cloudscape libraries, outputting the libraries it can find as well as the ones it cannot, as shown below:
  
  C:/>java com.ihost.cs.tools.sysinfo -cpTesting for presence of all Cloudscape-related libraries; typically, only some are needed.For a list of possible arguments, type java com.ihost.cs.tools.sysinfo -cp argsFOUND IN CLASS PATH:
    Cloudscape embedded engine library (cs.jar)
    Cloudscape Network Server library (csnet.jar)
    Cloudscape tools library (cstools.jar)
  
  NOT FOUND IN CLASS PATH:
    Cloudscape Client libraries (db2jcc.jar)  (com.ibm.db2.jcc.DB2Driver not found.)
  
  试一试:
  E:/Program Files/IBM/Cloudscape_10.0/demo/programs/simple>java com.ihost.cs.tools.sysinfo -cp SimpleApp.classFOUND IN CLASS PATH:
    user-specified class (SimpleApp)
  SUCCESS: All Cloudscape related classes found in class path.
  
  
评论】【加入收藏夹】【 】【打印】【关闭
※ 相关信息
 ·Flex开发步骤——配置过程总结  (2008-04-13)
 ·新手入门 解析配置文件的文件问题  (2008-04-13)
 ·安装配置:zip版本Tomcat配置新手  (2008-04-13)
 ·轻松玩转Java配置的Classpath  (2008-04-13)
 ·新手入门经典:Jsp环境配置  (2008-04-13)
 ·Java环境配置的Classpath使用故障  (2008-04-13)
 ·JAVA中配置环境变量设置方法大全  (2008-04-13)
 ·用Eclipse+MyEclipse+Tomcat的环  (2008-04-13)
 ·Weblogic的安装与JBuilder6的集成  (2008-04-13)
 ·使用EditPlus配置Java编译环境  (2008-04-13)

发表评论
用户名: 密码:
验证码: 匿名发表
 
 搜索文章
 最新文章
·Win2K入侵检测实例分析
·Win2000 Server安全入门
·使用微软安全工具包加固Win2
·Windows2000安全检查清单
· 安全管理
·利用安全工具包保持系统的最
·怎么实施和做好入侵检测
·Win2k建立安全WEB站点的解决
·用“$”来加强共享资源的安全
·让你的IIS无懈可击
 热点文章 
· 我的xfce学习笔记(汉化)
·三个方法优化MySQL数据库查询
·IPW2100安装详细步骤说明
·Gnuplot科学绘图——入门篇
·Linux下使用Evolution收发Em
·在Archlinux 安装Maya7.01
·安装Linux中文输入法fcitx
·向Linux迁移的人才准备
·使用指南:好用的播放器mpd
·你应该知道的10个MySQL客户启

社区关于我们广告业务信息反馈合作伙伴网站地图
ITKee.Com 版权所有
Copyright © 2008 All rights reserved