1:警告一般不用管,只要不是ERROR就行;2:我也不太清楚,还请大虾指点
解决方案 »
- 内存溢出问题!
- java生成xml文档和解析xml文档,分别使用哪种技术比较好?
- 讨论Hibernate的查询函数
- 大家开发struts2时,使用Eclipse插件吗,还是纯手写
- 求AXIS1.3
- HIBERNATE在tomcat创建的数据源下测试POJO类必须通过自己做的SERVLET??
- struts <html:select> 动态获得数据怎么会提交的时候有时出错
- jboss数据库连接怎样自动恢复?急
- Hibernate中left join fetch如何添加条件
- Hibernate学习,版本选择选择问题
- Eclipse和J2EE SDK的疑问?(偶超菜,莫笑偶)
- 求购关于struts实例
系统变量下的默认为c:\winnt\temp
没有问题,可是编译时还是出现警告??
没有人知道第二个问题呀吗??
--如果你想正确运行weblogic.关于问题2,查j2ee api doc.
这段代码返回的是weblogic容器的上下文环境,看不明白的地方就问吧.
其中 Context.INITIAL_CONTEXT_FACTORY 等涉及相关的设计模式,暂时看不懂没关系,知道怎么用就行了. private static Context getInitialContext() throws Exception {
String url = "t3://localhost:7001";
String user = "aaa";
String password = "11111111";
Properties properties = null;
try {
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
properties.put(Context.PROVIDER_URL, url);
if (user != null) {
properties.put(Context.SECURITY_PRINCIPAL, user);
properties.put(Context.SECURITY_CREDENTIALS,
password == null ? "" : password);
}
return new InitialContext(properties);
}
catch (Exception e) {
throw e;
}
}
谢谢wingtrace(暮寒.烟灰.风化物) 的忠告,还有你的代码~~
主要是问为什么System.getProperties()这样写,为什么会出错,而第二种写法就OK??
谢谢!!! 原理或区别~