I am a .NET developer, but for my current project I need to use Java Caja, a Java project. Uhhh!
I followed the manual on http://code.google.com/p/google-caja/wiki/RunningCaja on my Windows computer, but could not start the program. The command line they offer did not work, so I wrote cd'd to the ant -jars directory and tried to run the plugin.jar file:
D:\java\caja\svn-changes\pristine\ant-jars>java -cp . -jar pluginc.jar -i test.htm Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/cli/ParseException at com.google.caja.plugin.PluginCompilerMain.<init>(PluginCompilerMain.java:78) at com.google.caja.plugin.PluginCompilerMain.main(PluginCompilerMain.java:368) Caused by: java.lang.ClassNotFoundException: org.apache.commons.cli.ParseException 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) ... 2 more
What does it mean?
I also tried the file: /// d: / java / caja / svn-changes / pristine / ant -jars / test.htm instead of test.htm. Looking at the source, it seems that the file parameter is Uri ...
I also tried to run IKVM on pluginc, and then did not worry about java, but that also raised a ClassDefNotFoundException ...
thanks!
Edit: thanks everyone for the help so far :) still stuck. please continue with me, this may be the beginning of a .net transition to the great OSS technology!
d:\java\caja\svn-changes\pristine\ant-jars>java -cp .\*.* com.google.caja.plugin.PluginCompilerMain => NoClassDefFoundError: /\commons-cli/jar D:\java\caja\svn-changes\pristine\ant-jars>java -cp .\*.*;..\third_party\java\jakarta_commons\*.* com.google.caja.plugin.PluginCompilerMain => Could not find the main class: com.google.caja.plugin.PluginCompilerMain
Is there a way to run it based on the code in the build.xml file?
java noclassdeffounderror google-caja
mcintyre321
source share