Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 794191
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:16:35+00:00 2026-05-14T22:16:35+00:00

I’m a .NET developer, but for my current project I need to use Google

  • 0

I’m a .NET developer, but for my current project I need to use Google Caja, a Java project. Uh-oh!

I’ve followed the guide at http://code.google.com/p/google-caja/wiki/RunningCaja on my windows machine, but can’t get the program to run. The command line they suggest didn’t work, so I cd’d into the ant-jars directory and tried to run plugin.jar:

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

Whats that all about?

I’ve also tried file:///d:/java/caja/svn-changes/pristine/ant-jars/test.htm instead of test.htm. Looking at the source, it seems the file param is a Uri…

I’ve also tried running IKVM on pluginc and then not worrying about java, but that came up with the ClassDefNotFoundException too…

thanks!

edit: thanks everyone for the help so far 🙂 still stuck. please persevere with me, this might be the start of a .net developer switching to beautiful OSS technologies!

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 some way I can get it to run given the code in the build.xml file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:16:35+00:00Added an answer on May 14, 2026 at 10:16 pm

    Java’s trying to load the org.apache.commons.cli.ParseException class, but it can’t find it. This suggests you’re not setting the classpath properly.

    That particular class comes from the Apache Commons CLI library, so have a look around for a jar named something like cli.jar or commons-cli.jar. It may be in a separate lib directory. If there are other jars in the same place, you’ll probably need to add them, too.

    Edit: looking at the build.xml file, it uses the following classpath:

      <path id="classpath.web">
        <pathelement path="${third_party}/java/jsdk2.1/servlet.jar"/>
        <pathelement path="${third_party}/java/jaf/activation.jar"/>
        <pathelement path="${third_party}/java/javamail/mail.jar"/>
        <pathelement path="${third_party}/java/jetty/lib/jetty.jar"/>
        <pathelement path="${third_party}/java/jetty/lib/jetty-util.jar"/>
      </path>
      <path id="classpath.compile">
        <path refid="classpath.web"/>
        <pathelement path="${third_party}/java/jakarta_commons/commons-cli.jar"/>
        <pathelement path="${third_party}/java/json_simple/json_simple.jar"/>
        <pathelement path="${third_party}/java/rhino/js.jar"/>
        <pathelement path="${third_party}/java/xerces/xercesImpl.jar"/>
        <pathelement path="${jars}/htmlparser.jar"/>
      </path>
      <path id="classpath.run">
        <pathelement path="${lib}"/>
        <path refid="classpath.compile"/>
      </path>

    So you’ll need to include all of those jars in the cp argument when calling java.

    Edit #2: As Ash pointed out, you can’t use -cp with -jar, so you’ll need to put the pluginc.jar on the classpath as well and manually specify the main class (so java -cp ...;pluginc.jar com.google.classname -i etc). It’d probably be easier to get ant working than to do all of this manually 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 424k
  • Answers 424k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer cellForRowAtIndexPath: method is not provided by UITableView, that method is… May 15, 2026 at 12:06 pm
  • Editorial Team
    Editorial Team added an answer One way of solving this issue ( a non elegant… May 15, 2026 at 12:06 pm
  • Editorial Team
    Editorial Team added an answer I would not have thought that introducing a filter on… May 15, 2026 at 12:06 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.