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 8936917
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:19:07+00:00 2026-06-15T10:19:07+00:00

I am trying to setup xmlbeans-maven-plugin 2.3.3 in my Eclipse and while everything seems

  • 0

I am trying to setup xmlbeans-maven-plugin 2.3.3 in my Eclipse and while everything seems to go OK, It fails with an java.io.IOException due to inability to find the file C:\Users\Daniel\Workspace\MyProject\javac.

This is strange because javac is on the system’s %PATH% so why would it try to find it in %PROJECT_LOC%?

I found this problem description which sounds very similar to mine, but I placed the JDK path in front of all other paths and that didn’t help.

Any idea how to tell the xmlbeans-maven-plugin where to look for javac?

UPDATE 1: I tried working around this problem by simply copying javac.exe to the project’s directory and at least it now finds it but the problem moved forward to:

java.lang.NoClassDefFoundError: com/sun/tools/javac/Main
Caused by: java.lang.ClassNotFoundException: com.sun.tools.javac.Main
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
Exception in thread "main" Could not find the main class: com.sun.tools.javac.Main.  Program will exit.

Any insight that could help come up with the correct solution to this (e.g. something in .m2/settings.xml?) would be appreciated.

UPDATE 2: I also tried this little solution I found in my searches:

<settings xmlns="http://maven.apache.org/POM/4.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository>c:\maven\repository</localRepository>
   <configuration>
    <compiler>C:\Program Files (x86)\Java\jdk1.6.0_37\bin\javac.exe</compiler>
   </configuration>
</settings>

But that didn’t help the plugin find javac. It still complains about “The system cannot find the file specified” for javac.exe.

  • 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-06-15T10:19:08+00:00Added an answer on June 15, 2026 at 10:19 am

    Found the solution! In the project’s pom.xml, simply add the following inside <configuration>:

    <compiler>C:\Program Files (x86)\Java\jdk1.6.0_37\bin\javac.exe</compiler>
    

    i.e.

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>xmlbeans-maven-plugin</artifactId>
                <version>2.3.3</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>xmlbeans</goal>
                        </goals>
                    </execution>
                </executions>
                <inherited>true</inherited>
                <configuration>
                    <schemaDirectory>${basedir}/src/main/xsd</schemaDirectory>
                    <compiler>C:\Program Files (x86)\Java\jdk1.6.0_37\bin\javac.exe</compiler>
                </configuration>
            </plugin>
    

    Also, be sure to point the Window -> Preferences -> Java -> installed JREs to the JDK’s, not JRE’s: C:\Program Files (x86)\Java\jdk1.6.0_37. As described in this thread.

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

Sidebar

Related Questions

I am trying to setup my Eclipse for Hadoop using this page I am
We are trying to setup Eclipse in a shared environment, i.e., it will be
I am trying to setup gitolite on Ubuntu Server! It seems to work as
I am trying setup a Java program to connect to a website of my
Trying to setup Eclispe. The Eclipse help/about/installed software says: Eclipse Platform 3.5.2 Subclipse 1.0.0
Trying to setup a Maven Nexus Server but getting Could not resolve dependencies only
Trying to setup a Cron task that gets a file via FTP however seems
I'm trying to setup the Widget plugin by wiredesignz at http://codeigniter.com/forums/viewthread/109584/P20 but I keep
I trying setup Hadoop install on Ubuntu 11.04 and Java 6 sun. I was
While trying to setup a synchronization for a bitbucket repo on my local server,

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.