-1

I am trying to use the local version of css-validator, but can't seem to get it to work. I think everything is set up correctly, but whenever I run it with the command given as an example by w3c, it gives errors. Some people say I am missing something in my path or something like that, but I am not sure which path they are talking about (build path or environmental variables), and I don't know what exactly needs to be put into this path either.

I have looked for detailed instructions, but the most detailed instruction I found was that it needed to be in lib (which lib, I see hundreds of them). For reference, here is the documentation of css-validator.jar that I have found so far (which is not much, consisting of nothing but a command to run in cmd prompt): http://jigsaw.w3.org/css-validator/DOWNLOAD.html

This is the part most relevant from there: Note : the css-validator.jar file must be located at the exact same level as the lib/ folder to work properly.

Also, I tried using the jcabi.w3c wrapper(which I thought it said it only needed one dependency, but another website said it needed more, including glassfish jersey-core), but it talks about all these dependencies that I don't know where to put them (its xml, but it doesn't seem to match an Ivy document) and many I don't even have or know how to set up.

The w3c wrapper simply says "No main in selection" when I try to run it (which is a message I have never even seen before in cmd). So how do I get this thing working? Where is the documentation (more than 3 lines that W3C provides please,)?

Also, the error I am getting when trying to use css-validator.jar:

C:\Users\burnjc\Downloads>java -jar css-validator.jar http://www.w3.org/
Exception in thread "main" java.lang.NoClassDefFoundError: org/w3c/tools/resourc
es/ProtocolException
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2531)
    at java.lang.Class.getMethod0(Class.java:2774)
    at java.lang.Class.getMethod(Class.java:1663)
    at sun.launcher.LauncherHelper.getMainMethod(LauncherHelper.java:494)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:486)

Caused by: java.lang.ClassNotFoundException: org.w3c.tools.resources.ProtocolExc
eption
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    ... 6 more
Dharman
  • 30,962
  • 25
  • 85
  • 135
cluemein
  • 884
  • 13
  • 27

0 Answers0