can't run my application from prompt

Posted on 2004-09-01
Last Modified: 2010-04-16
i have the following directory structrute

E:\testing\src\classes : contains class files as  com.dt.m.min.App
E:\testing\src : contains jar files(conf.jar, log4j-1.2.7.jar etc)

I am trying to run my application as follows

E:\Testing\src>java -classpath classes;log4j-1.2.7.jar;mysql-connector-java-3.0.6-stable-bin.jar;conf.jar;datasocket.jar;.; com.dt.m.min.App

But keep getting the follwoing error

log4j:ERROR Could not open [conf\format.xml]. conf\format.xml (The system cannot find the path

I have set my classpaths properly, why is this happening
Question by:thomas908
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 35

Accepted Solution

girionis earned 45 total points
ID: 11951629
The format.xml does not have to do with the classpath but with the path. How are you trying to load it?
LVL 35

Assisted Solution

TimYates earned 40 total points
ID: 11951641
Are you using back slashes in your code where you reference format.xml?



assuming format.xml is inside a directory "conf" inside one of your jar files ;-)

Author Comment

ID: 11951899
I am using


on windows.
It runs perfectly fine when i run from JBUIlder but problem is coming from prompt
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

LVL 35

Expert Comment

ID: 11951927


Where is the format.xml file?  in the conf.jar?

Is it in a folder in the conf.jar?

if not, try:

    DOMConfigurator.configure( "/format.xml" );
LVL 35

Expert Comment

ID: 11951941
Folder separators shouldn't matter tbh. But Tim is right, we need to know the location of the file in order to help you.
LVL 35

Expert Comment

ID: 11951981
Actually, it could be:

DOMConfigurator.configure( "/conf/format.xml" );

But again, I'm just guessing...
LVL 18

Assisted Solution

armoghan earned 40 total points
ID: 11952133
actually JBuilder makes the project directory as root directory.. and src, classes and conf dir are inside it and they would all be on the same level.

Place the config dir in classes and then give the path

DOMConfigurator.configure( "conf/format.xml" );

LVL 35

Expert Comment

ID: 11952177
> Place the config dir in classes and then give the path

But it works in JBuilder...

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
How to get all the API from website? 11 160
SHA2 certs for IIS AND Java? 2 136
spring jars download 1 68
Eclipse neon2 "Java build path" correctness 7 43
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This video teaches viewers about errors in exception handling.
Suggested Courses

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question