实习环境配置出现的问题记录

本文介绍了解决在Eclipse中运行Java程序时出现的FileNotFoundException问题的方法。通过正确配置项目的Run Configurations中的Arguments参数,加入-DuseSelfPool=true选项,可以避免因找不到指定路径而引发的异常。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

使用eclipse运行Java程序出现如下异常(只标明主要异常点):
java.io.FileNotFoundException:
D:***\config\security.properties (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
at com.sun.enterprise.iiop.POAEJBORB.(POAEJBORB.java:78)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at org.omg.CORBA.ORB.create_impl(ORB.java:295)
at org.omg.CORBA.ORB.init(ORB.java:336)
at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:138)
at com.sun.enterprise.util.ORBManager.init(ORBManager.java:65)
at com.sun.enterprise.naming.SerialInitContextFactory.(SerialInitContextFactory.java:31)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
java.io.FileNotFoundException: D:***\config\ejb.properties (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
at com.sun.enterprise.iiop.J2EEInitializer.(J2EEInitializer.java:54)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

Warning: unable to read transaction.interoperability config property
java.io.FileNotFoundException:
D:***\config\security.properties (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.(FileInputStream.java:106)
at com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
at com.sun.enterprise.iiop.security.SecurityMechanismSelector.(SecurityMechanismSelector.java:102)
解决办法:
右击要运行类所在的项目,然后选择Run As ,Run Configurations,配置Arguments参数,-DuseSelfPool=true,然后重新运行程序,问题解决。
这里写图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值