java - Where is the debug class path in netbeans / where does the spring config XML file go? -
I have another project with a series of packages in the Java Desktop App (Main Project) and Netbusiness. Some packages use spring for JDBC and IoC.
I'm having the following error while running the debug:
Reason by: java.io.FileNotFoundException: class path resource [config.xml] can not be opened because It does not exist
Where does the config file go? Where is the classroom path actually? Is it in the root of the project in dist
, build
, which spring or main project (desktop app)?
Confused.
When you call your app java
You can specify it using:
java - cp $ path my.Main
Where $ path is your Classpath is This is a :
- Jar files and / or directories that have compiled .class
files, on the seperated (;
) windows
If you run your program:
java -cp configdir my.Main
and its spring config configdir (full Way qualified path) should be searched.
Netbeans : Unless I am a Netbeen user, probably provides several ways to accomplish the task you want:
-
In your run configuration (i.e. where do you define which class is being run, command line parameters etc), you can probably add items to the cell spaces. These can be directories or different files
-
In your compiler settings, you can probably assign netbens to a specific type of automatically copy files (Eg properties files, XML config files) from your source locations where Netbeans puts your class files.
-
If you put your
config.xml
file in the directory NetBeans your class files
Comments
Post a Comment