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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:57:40+00:00 2026-05-28T17:57:40+00:00

I am trying to compile the canonical metamodel classes for some JPA entities using

  • 0

I am trying to compile the canonical metamodel classes for some JPA entities using an ant script. I am using OpenJPA. I would like the generated files to be located in a subdirectory which, according to the OpenJPA documentation, I can do by specifying the -s option for javac. The way I am trying to do this right now is like this:

<compilerarg value="-s c:\buildfiles"/>

However, I keep getting an error that says:

javac: invalid flag: -s 
Usage: javac <options> <source files>

If I do:

<compilerarg value="-version"/>

it tells me that I am using 1.6. And if I do:

<compilerarg value="-help"/>

it lists -s as a valid option. Does anybody have any advice on what I can do to accomplish what I’m trying to do? Thank you!

  • 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-28T17:57:42+00:00Added an answer on May 28, 2026 at 5:57 pm

    You have two args in there, with a space between them. You just need to separate them:

    <compilerarg value="-s"/>
    <compilerarg value="c:\buildfiles"/>
    

    At the moment you’re parsing the single arg “-s c:\buildfiles”. If you run

    ant -verbose
    

    you can verify this – you’ll see something like:

      [javac] Compilation arguments:
        [javac] '-classpath'
        [javac] ''
        [javac] '-sourcepath'
        [javac] '/a/b/c'
        [javac] '-target'
        [javac] '1.5'
        [javac] '-g:none'
        [javac] '-s c:\buildfiles'    <-- here is the problem
        [javac] '-source'
        [javac] '1.5'
        [javac] 
        [javac] The ' characters around the executable and arguments are
        [javac] not part of the command.
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im trying to compile an assembly at runtime with CSharpCodeProvider and i would like
Im trying to compile some java files using the Runtime.getRuntime.exec(command) and im generating the
When trying to compile this code: #include <iostream> #include <vector> using namespace std; class
While trying to compile a 64 bit linux kernel using gcc, I see the
While trying to compile my project, that uses some third party headers, with mingw
While trying to compile an LLVM IR, like this llc main.ll -o main.s &&
Iam trying to compile rtmpd using VS2008 Iam getting this error. Error 63 error
When trying to compile the following: #include <string> #include <iterator> #include <iostream> using namespace
I'm trying to compile fastboot for Android using this guide , but I'm getting
I am trying to compile a simple C Windows API program using the Windows

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.