JBuilder2005+JBOSS+Oracle9i环境配置教程
Borland JBuilder 是一个非常方便的Java IDE 开发工具,而JBoss 则是一个很好的开源应用服务器,Oracle 9i是优秀的企业级数据库。下面就介绍在Windows XP环境下来配置JBuilder 2005、JBoss 4.0和Oracle9i 的J2EE开发环境。 1.安装 SDK 到 D:j2sdk1.4.2_06;方
Borland JBuilder 是一个非常方便的Java IDE 开发工具,而JBoss 则是一个很好的开源应用服务器,Oracle 9i是优秀的企业级数据库。下面就介绍在Windows XP环境下来配置JBuilder 2005、JBoss 4.0和Oracle9i 的J2EE开发环境。
1.安装 SDK 到 D:j2sdk1.4.2_06;方法为:双击执行下载的 j2sdk-1_4_2_06-windows-i586-p.exe 文件,选择安装目录为 D:j2sdk1.4.2_06,其它默认即可。
2.安装JBOSS,方法为:将下载的 jboss-4.0.1RC1.zip 文件解压到任意一个目录,如 D:jboss4.0,在此文件夹下有一系列的文件和文件夹。即将 JBOSS 安装到了 D:jboss4.0目录中。
3、设置环境变量,,在 winxp 下方法为,在桌面上右键点击“我的电脑”,选择属性,然后在弹出的页面上点“高级” -> “环境变量”,然后在弹出的页面中“系统变量”下点击“新建”,然后在弹出的窗口中“变量名 (N)” 输入“ JAVA_HOME ”,在“变量值 (V) ”一栏中输入“D:j2sdk1.4.2_06 ”。JBOSS_HOME 值为:D:jboss4.0 ,添加Path:“D:j2sdk1.4.2_06in; D:jboss4.0in ”
4、在JBuilder中配置JBoss,选择Tools的Config servers,然后选择JBoss3+,选中Enable server,指定Home Directory即可。
5、在JBoss中配置Oracle9i数据源并测试, Oracle以它的运行稳定和可靠成为了一个非常受欢迎的企业级数据库。要在Jboss 上配置使用Oracle的话我们要做的第一件事就是把Oracle的JDBC驱动程序复制到ClassPath下。我们把这个JDBC驱动程序(classes111.zip和classes12.zip)复制到server/default/lib目录下。为了使用Oracle的事务处理数据源我们还要把/docs/examples/jca/oracle-xa-ds.XML复制到/server/default/deploy目录下。假如使用的事非事务处理的数据源,就把/docs/examples/jca/oracle-ds.xml文件复制到/server/default/deploy目录下。
下一步,我们需要修改oracle-ds.xml配置文件。修改部分如下:
OracleDS
jdbc:oracle:thin:@localhost:oradb
oracle.jdbc.driver.OracleDriver
hrms
hrms
org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter
Oracle9i
下面就来运行JBoss测试连接数据库:
步骤如下:“jboss安装目录serverdefaultdeploy”中新建文件夹db_test.war,在db_test.war中新建index.jsp,内容如下:
language="java"
contentType="text/Html; charset=gb2312"
pageEncoding="GBK"
%>
测试JBOSS连接Oracle 9i数据库
Test Oracle Database
InitialContext ctx = new InitialContext();
DataSource ds = (DataSource) ctx.lookup("java:/OracleDS");
Connection conn = ds.getConnection();
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("SELECT TO_CHAR(SYSDATE,´YYYY-MM-DD HH24:MI:SS´) FROM DUAL");
while ( rs.next() ) {
out.println( rs.getString(1) + "
");
out.println( "My name is Justinchen
");
}
conn.close();
%>
在db_test.war中新建文件夹WEB-INF,其中有两个文件jboss-web.xml和web.xml,其中jboss-web.xml内容如下:
而web.xml内容如下:
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"">
访问:8080/db_test,成功后表示和数据库正常连接了。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Windows Recovery Environment (WinRE) is an environment used to repair Windows operating system errors. After entering WinRE, you can perform system restore, factory reset, uninstall updates, etc. If you are unable to boot into WinRE, this article will guide you through fixes to resolve the issue. Unable to boot into the Windows Recovery Environment If you cannot boot into the Windows Recovery Environment, use the fixes provided below: Check the status of the Windows Recovery Environment Use other methods to enter the Windows Recovery Environment Did you accidentally delete the Windows Recovery Partition? Perform an in-place upgrade or clean installation of Windows below, we have explained all these fixes in detail. 1] Check Wi

In this article, we will learn about the differences between Python and Anaconda. What is Python? Python is an open source language that places great emphasis on making the code easy to read and understand by indenting lines and providing whitespace. Python's flexibility and ease of use make it ideal for a variety of applications, including but not limited to scientific computing, artificial intelligence, and data science, as well as creating and developing online applications. When Python is tested, it is immediately translated into machine language because it is an interpreted language. Some languages, such as C++, require compilation to be understood. Proficiency in Python is an important advantage because it is very easy to understand, develop, execute and read. This makes Python

PHP integrated environment packages include: 1. PhpStorm, a powerful PHP integrated environment; 2. Eclipse, an open source integrated development environment; 3. Visual Studio Code, a lightweight open source code editor; 4. Sublime Text, a A popular text editor, widely used in various programming languages; 5. NetBeans, an integrated development environment developed by the Apache Software Foundation; 6. Zend Studio, an integrated development environment designed for PHP developers.

Setting environment variables on Windows 11 can help you customize your system, run scripts, and configure applications. In this guide, we'll discuss three methods along with step-by-step instructions so you can configure your system to your liking. There are three types of environment variables System environment variables – Global variables are the lowest priority and are accessible to all users and applications on Windows and are typically used to define system-wide settings. User Environment Variables – Higher priority, these variables only apply to the current user and process running under that account, and are set by the user or application running under that account. Process environment variables – have the highest priority, they are temporary and apply to the current process and its sub-processes, providing the program

Common problems and solutions for Laravel environment configuration file .env When using the Laravel framework to develop projects, the environment configuration file .env is very important. It contains key configuration information of the project, such as database connection information, application keys, etc. However, sometimes there are some common problems when configuring the .env file. This article will introduce these problems and provide solutions, and attach specific code examples for reference. Problem 1: Unable to read the .env file when we have configured the .env file

Go language environment configuration method: 1. Download the go language compiler and double-click to run the installation program; 2. Accept the license agreement and click next; 3. Set the installation directory and click OK; 4. After the installation is completed, change the go installation directory Just add the bin directory to the environment variable.

Deleting Conda Environments with One Click: Tips for Quickly Cleaning Up Useless Environments With the rapid development of data science and machine learning, the need to use Python for development and analysis is becoming stronger and stronger. Conda, as a popular Python package manager and environment management tool, is widely used in project development and environment configuration. However, over time, we often leave many useless Conda environments on the computer, which not only wastes disk space, but may also lead to environment clutter and unnecessary trouble. This article will introduce

The difference and connection between the pipenv environment and the virtual environment requires specific code examples. With the increasing popularity of Python, more and more developers are using virtual environments in Python projects to isolate the dependent libraries of different projects. The virtual environment can ensure that the Python libraries and their versions that the project depends on are properly managed to avoid various conflicts and version inconsistencies. However, in the past, using virtual environments required third-party libraries such as virtualenv and virtualenvwrapper. soon
