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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T17:42:39+00:00 2026-06-03T17:42:39+00:00

On a linux box I am making the following SVN import command: svn import

  • 0

On a linux box I am making the following SVN import command:

svn import
           --non-interactive 
           --trust-server-cert 
           --username username 
           --password password 
           -m "a message" 
           /path/to/local.zip 
           https://sub.domain.net/path/to/export.zip

When calling it from the command line myself it works without a problem.

However, if I make this call using a a Java command prompt then I receieve an error message that there are too many arguments in the import command.

Does anyone know what could be causing this?

Additional notes

  • If I copy and paste the Java generated svn import command from my log file to the console then the import works as expected.

  • I am able to use SVN export command from within Java without any problems

  • I have tried using single ' quotes

Edit

The code to make these calls are as follows:

private void exportToSvn()
    String command = String.format(
            "svn import --non-interactive --trust-server-cert " +
            "--username %s --password %s -m %s %s %s",
            username, password, "\"a message\"", "/path/to/local.zip",
            "https://sub.domain.net/path/to/export.zip"
    );
    command( command );
}

private void command( String... commands ) throws IOException, InterruptedException {
    Runtime rt = Runtime.getRuntime();
    for( String command : commands ){
        Process pr = rt.exec( command );
        BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
        logger.debug( command );
        String line;
        while ( (line = input.readLine()) != null)
            logger.debug("> " + line);
    }
  • 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-03T17:42:48+00:00Added an answer on June 3, 2026 at 5:42 pm

    After an anonymous tip (the commenter deleted their comment before I caught their name) – I found that the problem lay with the quotes as they cannot be escaped within Process (see this question).

    String message = "\"Some message\"";    //quotes aren't escaped
    

    I found a work around for this was to include the quotes in char format instead:

    String message = String.format( "%sSome message%s", (char)34 );  //quotes as char
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run several queries from mysql command line on my linux box (Fedora Os).
I installed mysql server on linux box IP = 192.168.1.100 but when i try
I am getting output from my linux box running the ifconfig command. I do
I have a linux box (Ubuntu 10.10 server edition) in ec2. I have written
I need to contact a server (perhaps Apache) running on a Linux box and
I'm setting up my first development Linux box - a netbook actually. I'm quite
If this was on a linux box I'd be set, but there's a distinct
I need to control inbound and outbound traffic to/from a linux box from within
I need to install some CPAN modules in a linux box which I do
I need to edit XML files on a small Linux box that we have

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.