拜托!请问全面学习J2EE一共要装哪些软件?谢谢! 只下载jb和weblogic一切都够了.数据库用sql server 或oracle其一即可,数据库驱动weblogic都有..jb带有jdk其他的什么tomct ,struts,wsad,jkd ..都不需要 ------------------------------------------------------ 我们还年轻牛奶会有的奶牛也会有的 可天天在 csdn 混这些会有吗 ?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我觉得初学者应该从<J2EETutorial>开始学。上面前言部分有详细的介绍,你可以看看啊。 我晕了,没有那么复杂,网络服务器weblogic或websphere,(他俩都是服务器,只不过不是一个公司的)tomcat,iis是对.net架构讲的。。jdk环境变量必须设置好,oracle恐怕你的机器要下个几天吧,即使下来,你的机器能不能转起来也很难说,用个sql做数据库服务器遍地都是,wsad是IBM用来开发j2ee的东东,没用过 http://www.jdnet.com.cn/softview.asp?SoftID=706http://download.21cn.com/list.php?id=5227http://www.zy263.com/soft/669.htmhttp://www.code-labs.com/http://www.2008soft.com/SoftView.asp?SoftID=275http://www.52puyang.com/download/view.asp?id=172http://www.huihoo.com/middleware/application_server/tomcat4.htmlhttp://www.52puyang.com/download/view.asp?id=31http://www.hongw.com/read_code.asp?SOFTWAREID=9887http://as.onlinedown.net/sort/123_1.htmhttp://www.fzsky.net/soft/6330.htmhttp://www.51-pass.com/downoracle.htmhttp://free.pixel2001.com/http://www.comfan.com/ldown/soft/440.htmhttp://www.leocn.com/soft/SoftView.asp?SoftID=2254http://91xz.cx001.com/down/softview.asp?SoftID=1405http://61.132.30.248/new/soft/614.htmhttp://www.itebook.net/downzone/list.asp?id=855http://www.comfan.com/ldown/soft/1293.htmhttp://web45.ispidc.com/006/download/list.asp?id=666http://web45.ispidc.com/006/download/list.asp?id=94 开发工具,建议用Jbuilder就可以;应用服务器,用weblogic或者websphere都成;后台数据库,用SQL server还是oracle,看你的喜好。编辑页面用UltraEdit吧,其他不需要什么软件了 要不试试BARRACUDA?JB8+TOMCAT然后再加一些辅助的工具, 建议用 tomcat+jboss+eclipse+ant+mysql 等这些都是开放源代码的资源。可以为以后提高准备。 微软下载:http://www.microsoft.com/downloads/search.aspx?displaylang=zh-cn http://www.4057.com/down/http://www.77ww.net/down/index.asp?classid=&Nclassid=3&order=ordershttp://www.szguangfu.com/adu/down/SoftView.asp?SoftID=1265http://www.5157.net/soft/1051.htm sql server对java的支持不是很好。jb+wls很方便,但是正版太贵。 我给你精简一下:必装的只有两样1,J2EE服务器(WLG,WEBSHPERE等)2,数据库其他的没了,什么开发工具之类的,用个记事本也可以呀,编译都可以在DOS下搞定的。如果你不要用到数据库,那只要装个J2EE服务器就行了。 weblogic server和weblogic一样吗? JBuilder,WebLogic,JBoss是目前用的最多的!!! 哈哈什么都想下载!!!买个盗版的不就得了。服务器:WebSphere或Tomcat、Weblogic开发工具:JB数据库:Oracle、DB2 在给你一个jbuilder7+weblogic7JBuilder7+WebLogic7 的配置假设Jbuilder7和WebLogic7安装完毕,操作系统为:windows2000 server(SP2),数据库为: SQLServer2000(SP2)。JBuilder7的配置:1.修改环境变量TEMP和TMP 为不带空格的目录如:E:\winnt\temp2.启动Jbuilder7,选择:Tools->Configure Servers3.选中左侧的Weblogic Application Server 6.x+,选中右边的Enable Server4.将General->Home Directory设为WebLogic7的Home Directory如:E:/bea/weblogic700/server,正常的话Jbuilder7将自动为你添好其他的项。5. 将Custom->JDK Installation Directory设为 JDK的安装目录,如:E:/bea/jdk131_026.将Custom->BEA Home Directory设为WebLogic7的Home Director,如:E:/bea7.将Custom->Domain Directory设为你的域目录,如:E:/bea/user_projects/mydomain8.添好User name, Password ,Domain name, Server name后,单击OK退出。9.选择:Tools->Enterprise Setup,单击CORBA页上的New, 按下表填写相应信息:Name for this configuration = WelLogic 7.0Path for ORB Tools = E:/bea/weblogic700/serverLibrary for Projects = WebLogic 6.x+ DeployIDL compiler command = idlj.exeCommnad option for output directory = E:\CORBAOutput(任意目录,不要有空格)单击OK退出。10.选择Project->Default Project properties在Path页的Required libraries中将会看到WebLogic 6.x+ Client和WebLogic 6.x+ Deploy两项,如果没有,请检查以上步骤是否正确。11.选择Server页,单击Single services for all service in project在下拉列表中选择WebLogic Application Server 6.x+,但击OK退出,配置完毕。WebLogic7的配置:1.启动WebLogic72.打开IE6,在地址栏中输入:http://localhost:7001/console3.输入用户名和密码4.在左边的目录树中选中Services->JDBC->Connection Pools,单击右侧的Configure a new JDBC Connection Pool.,输入以下信息:Configuration->General页:Name = SQL Server Connection PoolURL = jdbc:weblogic:mssqlserver4:northwind@localhostDriver classname = weblogic.jdbc.mssqlserver4.DriverProperties : user = saPassword = “” <- sa的密码单击Create建立连接池。Targets->Server页:将myserver(服务器名称)移至右侧的列表中,但击单击Apply5.在左边的目录树中选中Services->JDBC->Data Sources(或者TXData Sources),单击右侧的Configure a new JDBC Connection Pool.,输入以下信息:Configuration->General页:Name = SQLServer Tx Data SourceJNDI Name = SQLServerPool Name = SQL Server Connection Pool选中Emulate Two-Phase Commit for non-XA Driver和Row Prefetch Enabled单击Create建立数据源。Targets->Server页:将myserver(服务器名称)移至右侧的列表中,但击单击Apply,配置完毕。实战1:连接SQLServer20001.打开JBuilder7选择File->New project在Name栏中输入SQLServerDemo,Directory栏中输入存放路径(不要有空格),其他不变,单击Finish。2.选择File->New,选择General->Application,单击OK。第一步,第二步和第三步都不用更改,直接Finish即可。3.回到JBuilder7的集成开发环境中,单击右侧的Designer页设计窗体,在窗体中放入一个JscrollPane 和JtextArea 及三个按钮,双击第一个按钮输入以下代码: try { Class.forName("weblogic.jdbc.mssqlserver4.Driver"); Connection con = DriverManager.getConnection("jdbc:weblogic:mssqlserver4:northwind@localhost","sa","");//此处根据你的SQLServer帐户而定。 Statement st = con.createStatement(); ResultSet res = st.executeQuery("select * from employees"); String line = ""; while (res.next()) line = line + res.getString("title")+"\n"; jTextArea1.setText(line); con.close(); } catch (Exception ex) { jTextArea1.setText("error : "+ex.getMessage());}双击第二个按钮输入以下代码 Hashtable ht = new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory"); ht.put(Context.PROVIDER_URL,"t3://localhost:7001"); try { Context ctx = new InitialContext(ht); DataSource ds = (DataSource)ctx.lookup("SQLServer"); Connection con = ds.getConnection("system","12345678");//此处是WebLogic7的域用户和密码 Statement st = con.createStatement(); ResultSet res = st.executeQuery("select * from employees"); String line = ""; while (res.next()) line = line + res.getString("notes")+"\n"; jTextArea1.setText(line); con.close(); } catch (Exception ex) { jTextArea1.setText("error : "+ex.getMessage()); }运行WebLogic7,运行程序单击第一个按钮使用JDBC直接连接SQLServer并获取数据,单击第二个按钮使用DataSource连接SQLServer并获取数据。实战2:Session Bean实战3:Entity Bean(待续) 考的不对在贴一次JBuilder7+WebLogic7 的配置假设Jbuilder7和WebLogic7安装完毕,操作系统为:windows2000 server(SP2),数据库为: SQLServer2000(SP2)。JBuilder7的配置:1.修改环境变量TEMP和TMP 为不带空格的目录如:E:\winnt\temp2.启动Jbuilder7,选择:Tools->Configure Servers3.选中左侧的Weblogic Application Server 6.x+,选中右边的Enable Server4.将General->Home Directory设为WebLogic7的Home Directory如:E:/bea/weblogic700/server,正常的话Jbuilder7将自动为你添好其他的项。5. 将Custom->JDK Installation Directory设为 JDK的安装目录,如:E:/bea/jdk131_026.将Custom->BEA Home Directory设为WebLogic7的Home Director,如:E:/bea7.将Custom->Domain Directory设为你的域目录,如:E:/bea/user_projects/mydomain8.添好User name, Password ,Domain name, Server name后,单击OK退出。9.选择:Tools->Enterprise Setup,单击CORBA页上的New, 按下表填写相应信息:Name for this configuration = WelLogic 7.0Path for ORB Tools = E:/bea/weblogic700/serverLibrary for Projects = WebLogic 6.x+ DeployIDL compiler command = idlj.exeCommnad option for output directory = E:\CORBAOutput(任意目录,不要有空格)单击OK退出。10.选择Project->Default Project properties在Path页的Required libraries中将会看到WebLogic 6.x+ Client和WebLogic 6.x+ Deploy两项,如果没有,请检查以上步骤是否正确。11.选择Server页,单击Single services for all service in project在下拉列表中选择WebLogic Application Server 6.x+,但击OK退出,配置完毕。WebLogic7的配置:1.启动WebLogic72.打开IE6,在地址栏中输入:http://localhost:7001/console3.输入用户名和密码4.在左边的目录树中选中Services->JDBC->Connection Pools,单击右侧的Configure a new JDBC Connection Pool.,输入以下信息:Configuration->General页:Name = SQL Server Connection PoolURL = jdbc:weblogic:mssqlserver4:northwind@localhostDriver classname = weblogic.jdbc.mssqlserver4.DriverProperties : user = saPassword = “” <- sa的密码单击Create建立连接池。Targets->Server页:将myserver(服务器名称)移至右侧的列表中,但击单击Apply5.在左边的目录树中选中Services->JDBC->Data Sources(或者TXData Sources),单击右侧的Configure a new JDBC Connection Pool.,输入以下信息:Configuration->General页:Name = SQLServer Tx Data SourceJNDI Name = SQLServerPool Name = SQL Server Connection Pool选中Emulate Two-Phase Commit for non-XA Driver和Row Prefetch Enabled单击Create建立数据源。Targets->Server页:将myserver(服务器名称)移至右侧的列表中,但击单击Apply,配置完毕。实战1:连接SQLServer20001.打开JBuilder7选择File->New project在Name栏中输入SQLServerDemo,Directory栏中输入存放路径(不要有空格),其他不变,单击Finish。2.选择File->New,选择General->Application,单击OK。第一步,第二步和第三步都不用更改,直接Finish即可。3.回到JBuilder7的集成开发环境中,单击右侧的Designer页设计窗体,在窗体中放入一个JscrollPane 和JtextArea 及三个按钮,双击第一个按钮输入以下代码: try { Class.forName("weblogic.jdbc.mssqlserver4.Driver"); Connection con = DriverManager.getConnection("jdbc:weblogic:mssqlserver4:northwind@localhost","sa","");//此处根据你的SQLServer帐户而定。 Statement st = con.createStatement(); ResultSet res = st.executeQuery("select * from employees"); String line = ""; while (res.next()) line = line + res.getString("title")+"\n"; jTextArea1.setText(line); con.close(); } catch (Exception ex) { jTextArea1.setText("error : "+ex.getMessage());}双击第二个按钮输入以下代码 Hashtable ht = new Hashtable(); ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory"); ht.put(Context.PROVIDER_URL,"t3://localhost:7001"); try { Context ctx = new InitialContext(ht); DataSource ds = (DataSource)ctx.lookup("SQLServer"); Connection con = ds.getConnection("system","12345678");//此处是WebLogic7的域用户和密码 Statement st = con.createStatement(); ResultSet res = st.executeQuery("select * from employees"); String line = ""; while (res.next()) line = line + res.getString("notes")+"\n"; jTextArea1.setText(line); con.close(); } catch (Exception ex) { jTextArea1.setText("error : "+ex.getMessage()); }运行WebLogic7,运行程序单击第一个按钮使用JDBC直接连接SQLServer并获取数据,单击第二个按钮使用DataSource连接SQLServer并获取数据。实战2:Session Bean实战3:Entity Bean jboss + tomcat + mysql + intellij idea 3.05 用上Jbuilder8(9也行),里面自代了Tomcat 4.0,中间件WebLogic,数据库Sybase,如果比较大型的话最好使用Oracle。我现正用此开发一J2EE的大型项目,非常成功!!! JBuilder9Weblogic8.0就可以了。 免费的可用:jboss+mysql+apache+tomcat,就可以跑起来了,我试过,可以到那些网站上去下载。不过用了JBuilder9,这个就不免费啦。 http://jakarta.apache.org/site/binindex.cgiAlexandria BCEL BSF Cactus Commons ECS Gump Jetspeed JMeter Log4J Lucene ORO POI Regexp Slide Struts Taglibs Tapestry Tomcat Turbine Velocity Watchdog http://jakarta.apache.org/commons/index.htmlBeanUtils Betwixt CLI Codec Collections Daemon DBCP Digester Discovery EL FileUpload HttpClient Jelly Jexl JXPath Lang Latka Logging Modeler Net Pool Validator 你可以不用,但你不可以不知道 怎么这么多的回复里面每一个提到j2ee所需的JDK + Java EE 啊<a href="http://java.sun.com/javase/downloads/index.jsp">http://java.sun.com/javase/downloads/index.jsp</a> 项目运行时抛出添加时异常,添加方法在其他方法使用正常,求高人解答 如何用struts2来从数据库中把一个byte[]做为图片显示出来呢 并发执行 关于参数传递的问题 如何实现下拉列表框中自己输入值? Hibernate动态查询外连接问题 tomcat的jsp文件移植到weblogic,出现的问题 如何通过ResultSet结果集来实现Struts中的重复标签 关于JTABLE的问题 新年了,分不多,也散点吧1◎◎ 我对JAVA学习和JAVA程序员找工作的看法 用过JFreeChart的高手进来
上面前言部分有详细的介绍,你可以看看啊。
http://download.21cn.com/list.php?id=5227
http://www.zy263.com/soft/669.htm
http://www.code-labs.com/
http://www.2008soft.com/SoftView.asp?SoftID=275
http://www.52puyang.com/download/view.asp?id=172
http://www.huihoo.com/middleware/application_server/tomcat4.html
http://www.52puyang.com/download/view.asp?id=31
http://www.hongw.com/read_code.asp?SOFTWAREID=9887
http://as.onlinedown.net/sort/123_1.htm
http://www.fzsky.net/soft/6330.htm
http://www.51-pass.com/downoracle.htm
http://free.pixel2001.com/
http://www.comfan.com/ldown/soft/440.htm
http://www.leocn.com/soft/SoftView.asp?SoftID=2254
http://91xz.cx001.com/down/softview.asp?SoftID=1405
http://61.132.30.248/new/soft/614.htm
http://www.itebook.net/downzone/list.asp?id=855
http://www.comfan.com/ldown/soft/1293.htm
http://web45.ispidc.com/006/download/list.asp?id=666
http://web45.ispidc.com/006/download/list.asp?id=94
JB8+TOMCAT
然后再加一些辅助的工具,
这些都是开放源代码的资源。
可以为以后提高准备。
http://www.77ww.net/down/index.asp?classid=&Nclassid=3&order=ordershttp://www.szguangfu.com/adu/down/SoftView.asp?SoftID=1265
http://www.5157.net/soft/1051.htm
必装的只有两样
1,J2EE服务器(WLG,WEBSHPERE等)
2,数据库
其他的没了,什么开发工具之类的,用个记事本也可以呀,编译都可以在DOS下搞定的。
如果你不要用到数据库,那只要装个J2EE服务器就行了。
什么都想下载!!!
买个盗版的不就得了。服务器:WebSphere或Tomcat、Weblogic
开发工具:JB
数据库:Oracle、DB2
JBuilder7+WebLogic7 的配置
假设Jbuilder7和WebLogic7安装完毕,操作系统为:windows2000 server(SP2),数据库为:
SQLServer2000(SP2)。JBuilder7的配置:
1.修改环境变量TEMP和TMP 为不带空格的目录如:E:\winnt\temp
2.启动Jbuilder7,选择:Tools->Configure Servers
3.选中左侧的Weblogic Application Server 6.x+,选中右边的Enable Server
4.将General->Home Directory设为WebLogic7的Home Directory如:E:/bea/weblogic700/s
erver,正常的话Jbuilder7将自动为你添好其他的项。
5. 将Custom->JDK Installation Directory设为 JDK的安装目录,如:E:/bea/jdk131_02
6.将Custom->BEA Home Directory设为WebLogic7的Home Director,如:E:/bea
7.将Custom->Domain Directory设为你的域目录,如:E:/bea/user_projects/mydomain
8.添好User name, Password ,Domain name, Server name后,单击OK退出。
9.选择:Tools->Enterprise Setup,单击CORBA页上的New, 按下表填写相应信息:
Name for this configuration = WelLogic 7.0
Path for ORB Tools = E:/bea/weblogic700/server
Library for Projects = WebLogic 6.x+ Deploy
IDL compiler command = idlj.exe
Commnad option for output directory = E:\CORBAOutput(任意目录,不要有空格)
单击OK退出。
10.选择Project->Default Project properties
在Path页的Required libraries中将会看到WebLogic 6.x+ Client和WebLogic 6.x+ Deploy
两项,如果没有,请检查以上步骤是否正确。
11.选择Server页,单击Single services for all service in project
在下拉列表中选择WebLogic Application Server 6.x+,但击OK退出,配置完毕。WebLogic7的配置:
1.启动WebLogic7
2.打开IE6,在地址栏中输入:http://localhost:7001/console
3.输入用户名和密码
4.在左边的目录树中选中Services->JDBC->Connection Pools,单击右侧的Configure a n
ew JDBC Connection Pool.,输入以下信息:
Configuration->General页:
Name = SQL Server Connection Pool
URL = jdbc:weblogic:mssqlserver4:northwind@localhost
Driver classname = weblogic.jdbc.mssqlserver4.Driver
Properties : user = sa
Password = “” <- sa的密码
单击Create建立连接池。
Targets->Server页:
将myserver(服务器名称)移至右侧的列表中,但击单击Apply
5.在左边的目录树中选中Services->JDBC->Data Sources(或者TXData Sources),单击右
侧的Configure a new JDBC Connection Pool.,输入以下信息:
Configuration->General页:
Name = SQLServer Tx Data Source
JNDI Name = SQLServer
Pool Name = SQL Server Connection Pool
选中Emulate Two-Phase Commit for non-XA Driver和Row Prefetch Enabled
单击Create建立数据源。
Targets->Server页:
将myserver(服务器名称)移至右侧的列表中,但击单击Apply,配置完毕。
实战1:连接SQLServer2000
1.打开JBuilder7选择File->New project
在Name栏中输入SQLServerDemo,Directory栏中输入存放路径(不要有空格),其他不变,
单击Finish。
2.选择File->New,选择General->Application,单击OK。
第一步,第二步和第三步都不用更改,直接Finish即可。
3.回到JBuilder7的集成开发环境中,单击右侧的Designer页设计窗体,在窗体中放入一个
JscrollPane 和JtextArea 及三个按钮,双击第一个按钮输入以下代码:
try
{
Class.forName("weblogic.jdbc.mssqlserver4.Driver");
Connection con = DriverManager.getConnection("jdbc:weblogic:mssqlserver4:no
rthwind@localhost","sa","");//此处根据你的SQLServer帐户而定。
Statement st = con.createStatement();
ResultSet res = st.executeQuery("select * from employees");
String line = "";
while (res.next())
line = line + res.getString("title")+"\n";
jTextArea1.setText(line);
con.close();
}
catch (Exception ex)
{
jTextArea1.setText("error : "+ex.getMessage());
}
双击第二个按钮输入以下代码
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory
");
ht.put(Context.PROVIDER_URL,"t3://localhost:7001"); try
{
Context ctx = new InitialContext(ht);
DataSource ds = (DataSource)ctx.lookup("SQLServer");
Connection con = ds.getConnection("system","12345678");//此处是WebLogic7
的域用户和密码
Statement st = con.createStatement();
ResultSet res = st.executeQuery("select * from employees");
String line = "";
while (res.next())
line = line + res.getString("notes")+"\n";
jTextArea1.setText(line);
con.close();
}
catch (Exception ex)
{
jTextArea1.setText("error : "+ex.getMessage());
}
运行WebLogic7,运行程序单击第一个按钮使用JDBC直接连接SQLServer并获取数据,单击第
二个按钮使用DataSource连接SQLServer并获取数据。
实战2:Session Bean
实战3:Entity Bean
(待续)
在贴一次JBuilder7+WebLogic7 的配置
假设Jbuilder7和WebLogic7安装完毕,操作系统为:windows2000 server(SP2),数据库为:
SQLServer2000(SP2)。JBuilder7的配置:
1.修改环境变量TEMP和TMP 为不带空格的目录如:E:\winnt\temp
2.启动Jbuilder7,选择:Tools->Configure Servers
3.选中左侧的Weblogic Application Server 6.x+,选中右边的Enable Server
4.将General->Home Directory设为WebLogic7的Home Directory如:E:/bea/weblogic700/s
erver,正常的话Jbuilder7将自动为你添好其他的项。
5. 将Custom->JDK Installation Directory设为 JDK的安装目录,如:E:/bea/jdk131_02
6.将Custom->BEA Home Directory设为WebLogic7的Home Director,如:E:/bea
7.将Custom->Domain Directory设为你的域目录,如:E:/bea/user_projects/mydomain
8.添好User name, Password ,Domain name, Server name后,单击OK退出。
9.选择:Tools->Enterprise Setup,单击CORBA页上的New, 按下表填写相应信息:
Name for this configuration = WelLogic 7.0
Path for ORB Tools = E:/bea/weblogic700/server
Library for Projects = WebLogic 6.x+ Deploy
IDL compiler command = idlj.exe
Commnad option for output directory = E:\CORBAOutput(任意目录,不要有空格)
单击OK退出。
10.选择Project->Default Project properties
在Path页的Required libraries中将会看到WebLogic 6.x+ Client和WebLogic 6.x+ Deploy
两项,如果没有,请检查以上步骤是否正确。
11.选择Server页,单击Single services for all service in project
在下拉列表中选择WebLogic Application Server 6.x+,但击OK退出,配置完毕。WebLogic7的配置:
1.启动WebLogic7
2.打开IE6,在地址栏中输入:http://localhost:7001/console
3.输入用户名和密码
4.在左边的目录树中选中Services->JDBC->Connection Pools,单击右侧的Configure a n
ew JDBC Connection Pool.,输入以下信息:
Configuration->General页:
Name = SQL Server Connection Pool
URL = jdbc:weblogic:mssqlserver4:northwind@localhost
Driver classname = weblogic.jdbc.mssqlserver4.Driver
Properties : user = sa
Password = “” <- sa的密码
单击Create建立连接池。
Targets->Server页:
将myserver(服务器名称)移至右侧的列表中,但击单击Apply
5.在左边的目录树中选中Services->JDBC->Data Sources(或者TXData Sources),单击右
侧的Configure a new JDBC Connection Pool.,输入以下信息:
Configuration->General页:
Name = SQLServer Tx Data Source
JNDI Name = SQLServer
Pool Name = SQL Server Connection Pool
选中Emulate Two-Phase Commit for non-XA Driver和Row Prefetch Enabled
单击Create建立数据源。
Targets->Server页:
将myserver(服务器名称)移至右侧的列表中,但击单击Apply,配置完毕。
实战1:连接SQLServer2000
1.打开JBuilder7选择File->New project
在Name栏中输入SQLServerDemo,Directory栏中输入存放路径(不要有空格),其他不变,
单击Finish。
2.选择File->New,选择General->Application,单击OK。
第一步,第二步和第三步都不用更改,直接Finish即可。
3.回到JBuilder7的集成开发环境中,单击右侧的Designer页设计窗体,在窗体中放入一个
JscrollPane 和JtextArea 及三个按钮,双击第一个按钮输入以下代码:
try
{
Class.forName("weblogic.jdbc.mssqlserver4.Driver");
Connection con = DriverManager.getConnection("jdbc:weblogic:mssqlserver4:no
rthwind@localhost","sa","");//此处根据你的SQLServer帐户而定。
Statement st = con.createStatement();
ResultSet res = st.executeQuery("select * from employees");
String line = "";
while (res.next())
line = line + res.getString("title")+"\n";
jTextArea1.setText(line);
con.close();
}
catch (Exception ex)
{
jTextArea1.setText("error : "+ex.getMessage());
}
双击第二个按钮输入以下代码
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory
");
ht.put(Context.PROVIDER_URL,"t3://localhost:7001"); try
{
Context ctx = new InitialContext(ht);
DataSource ds = (DataSource)ctx.lookup("SQLServer");
Connection con = ds.getConnection("system","12345678");//此处是WebLogic7
的域用户和密码
Statement st = con.createStatement();
ResultSet res = st.executeQuery("select * from employees");
String line = "";
while (res.next())
line = line + res.getString("notes")+"\n";
jTextArea1.setText(line);
con.close();
}
catch (Exception ex)
{
jTextArea1.setText("error : "+ex.getMessage());
}
运行WebLogic7,运行程序单击第一个按钮使用JDBC直接连接SQLServer并获取数据,单击第
二个按钮使用DataSource连接SQLServer并获取数据。
实战2:Session Bean
实战3:Entity Bean
Weblogic8.0
就可以了。
Alexandria
BCEL
BSF
Cactus
Commons
ECS
Gump
Jetspeed
JMeter
Log4J
Lucene
ORO
POI
Regexp
Slide
Struts
Taglibs
Tapestry
Tomcat
Turbine
Velocity
Watchdog
http://jakarta.apache.org/commons/index.html
BeanUtils
Betwixt
CLI
Codec
Collections
Daemon
DBCP
Digester
Discovery
EL
FileUpload
HttpClient
Jelly
Jexl
JXPath
Lang
Latka
Logging
Modeler
Net
Pool
Validator
你可以不用,但你不可以不知道
<a href="http://java.sun.com/javase/downloads/index.jsp">http://java.sun.com/javase/downloads/index.jsp</a>