0
votes

I tried the instructions at this tutorial (http://www.phpied.com/jslint-on-mac-textmate/) to run jslint with textmate but getting stuck at step at the last step of "Step 1"

Here is the error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/mozilla/javascript/tools/shell/Main Caused by: java.lang.ClassNotFoundException: org.mozilla.javascript.tools.shell.Main at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

Thanks

3

3 Answers

1
votes

The whole process described in the article seems a bit hackish.

Both the js-tools and javascript-tools bundles work pretty well for me.

1
votes

It's easier to avoid Rhino and use JavascriptCore, the JS engine built into OS X. I use JSLintMate, which presents more readable feedback, can use JSHint instead of JSLint, can run on save, and lets you set custom options in various ways (e.g., a config file in each project repo, global options across all projects).

0
votes

Your ‘CLASSPATH‘ isn't set up correctly. You need to download a copy of mozilla rhino and ensure that the resulting jar file is mentioned in your ‘$CLASSPATH‘ environment variable.

You may have better luck with jslint4java which includes a bundled copy of rhino.