Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I have found your site brilliant. What makes it good are the people that contribute to the site..."

Geography

Where in the world do Tek-Tips members come from?
keenanbr (Programmer)
11 Apr 11 9:17
I have created a jar file;

There is just one class in it called XMLUtils

My manifest is ;

CODE

Manifest-Version: 1.0
Class-Path: ".;C:\Documents and Settings\a995085\.m2\repository\commons-io\commons-io\1.4\commons-io-1.4.jar"
Main-Class: XMlUtils

When I run as;

CODE

java -jar XMLUtils.jar C:/47670436.xml C:/Scenario6.xml C:/BK1.xml

i get;

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/io/FileUtils
    at XMlUtils.removeNS(XMlUtils.java:286)
    at XMlUtils.main(XMlUtils.java:304)


if i run it in a batch file thus;

CODE

echo off
cd projects\XMLUtils\bin\
SET CLASSPATH=".;C:\Documents and Settings\a995085\.m2\repository\commons-io\commons-io\1.4\commons-io-1.4.jar"
java -cp %CLASSPATH% XMlUtils C:/47670436.xml C:/Scenario6.xml C:/BK1.xml

it works fine.

I presume I doing something silly but what?

Any help appreciated.

Regards

 
Diancecht (Programmer)
11 Apr 11 19:05
I think you have to remove quotes and semicolon

CODE

Class-Path: . C:\Documents and Settings\a995085\.m2\repository\commons-io\commons-io\1.4\commons-io-1.4.jar
I also think you don't need the .
Take a look at this

Cheers,
Dian

keenanbr (Programmer)
12 Apr 11 8:50
Thanks for your suggestion. I got it working with ;

CODE

Manifest-Version: 1.0
Class-Path: /projects/XMLUtils/bin /Docume~1/a995085/.m2/repository/commons-io/commons-io/1.4/commons-io-1.4.jar
Main-Class: XMlUtils

Regards,

Brian

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close