This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 10347 - Cannot run java -jar css-validator.jar on local machine
Summary: Cannot run java -jar css-validator.jar on local machine
Status: NEW
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: Other (show other bugs)
Version: CSS Validator
Hardware: Macintosh MacOS X
: P2 critical
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: qa-dev tracking
Depends on:
Reported: 2010-08-11 17:32 UTC by Chen Sun
Modified: 2012-01-15 21:23 UTC (History)
3 users (show)

See Also:

Patches the build.xml file for current available dependencies (6.14 KB, patch)
2011-06-28 08:56 UTC, Stefan Wallin
Patch file to make it works on my mac (3.32 KB, application/octet-stream)
2012-01-15 21:23 UTC, Dinny Wu

Description Chen Sun 2010-08-11 17:32:00 UTC
I want to download CssValidator to my local machine. I have Java installed on c:\Program Files\Java\jdk1.6.0_21.
I am not a Java person at this moment so I am unwilling to install and config CVS; Ant; Appach; Tomcat; etc. 
I downloaded css-validator.jar at c:\Program Files\Java\jdk1.6.0_21\css-validator.jar which is exact the same level as c:\Program Files\Java\jdk1.6.0_21\lib
The issue is:
C:\Program Files\Java\jdk1.6.0_21>java -jar css-validator.jar
Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/tools/resourc
Caused by: java.lang.ClassNotFoundException:
        at$ Source)
        at Method)
        at Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
Could not find the main class: org.w3c.css.css.CssValidator. Program will exit.

 I guess I missed a lot. Do I have to go through all these Ant-Appach-Tomcat things? What is the easiest way to run CSSValidator on local machine?
Thanks a lot!
Comment 1 Stefan Wallin 2011-06-28 08:56:27 UTC
Created attachment 1007 [details]
Patches the build.xml file for current available dependencies
Comment 2 Stefan Wallin 2011-06-28 08:58:16 UTC
This are issues found in dev channel for compiling the jar-file on OS X. (mostly unreachable versions of packages)
Comment 3 Dinny Wu 2012-01-15 21:17:39 UTC
I tried re-compile it successfully on my mac os since the official one is a bit out of date and can't run on my machine. I can offer the build.xml for ant to build the jar package if necessary.
Comment 4 Dinny Wu 2012-01-15 21:22:26 UTC
Here is the patch of build.xml to make the build work on my mac os
Comment 5 Dinny Wu 2012-01-15 21:23:50 UTC
Created attachment 1067 [details]
Patch file to make it works on my mac

Here's the patch against the build.xml of the mainline in cvs repo.