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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:32:24+00:00 2026-06-16T22:32:24+00:00

We have a TeamCity (7.0.3) agent running on a 64-bit Windows Server 2008 machine.

  • 0

We have a TeamCity (7.0.3) agent running on a 64-bit Windows Server 2008 machine. When we recently upgraded the agent to use Java 7 (1.7.0_10) the builds started failing with the following stacktrace:

Error occurred during initialization of VM
java.lang.ExceptionInInitializerError
    at java.lang.Runtime.loadLibrary0(Runtime.java:841)
    at java.lang.System.loadLibrary(System.java:1084)
    at java.lang.System.initializeSystemClass(System.java:1145)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    at java.lang.String.charAt(String.java:658)
    at java.io.Win32FileSystem.<init>(Win32FileSystem.java:40)
    at java.io.WinNTFileSystem.<init>(WinNTFileSystem.java:37)
    at java.io.FileSystem.getFileSystem(Native Method)
    at java.io.File.<clinit>(File.java:156)
    at java.lang.Runtime.loadLibrary0(Runtime.java:841)
    at java.lang.System.loadLibrary(System.java:1084)
    at java.lang.System.initializeSystemClass(System.java:1145)

The problem seems to be caused by the inclusion of the “-Dfile.separator=\” java option that TeamCity uses in the executable command for the agent. I was able to reproduce the problem by writing a simple “Hello World” class and compiling it on the Windows box and then running the program with the file.separator option (i.e. java -Dfile.separator=\ HelloWorld)

I haven’t found any similar bug reports. Has anyone seen anything like this? Has the behaviour of file.separator changed in Java 7?

Furthermore I realise that \ is the default file.separator for Windows anyway so I don’t think the agent really needs to use it in the executable command, however I can’t see a way in TeamCity to tell the agent not to include it. Is it possible to do this?

  • 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-16T22:32:25+00:00Added an answer on June 16, 2026 at 10:32 pm

    It looks java.exe now trims trailing \ (back-slash).

    I have the following code:
    import java.lang.*;

    public class test {
      public static void main(String[] argz) { 
        for(String s : argz) {
         System.out.println("agg=" + s + "|");
        }
    
        System.out.println("prop=" +  System.getProperty("prop") + "|");
      }
    }
    

    I start it with Java 1.7.0_07 and _10:

    C:\Java\jdk1.7.0_07\bin\java.exe -cp . -Dprop=z\\ test a\\ b
    agg=a\\|
    agg=b|
    prop=z\\|
    

    and _10

    C:\Java\jdk1.7.0_10\bin\java.exe -cp . -Dprop=z\\ test a\\ b
    agg=a|
    agg=b|
    prop=z|
    

    And one more series:

    C:\Java\jdk1.7.0_07\bin\java.exe -cp . -Dprop=z\ test a\ b
    agg=a\|
    agg=b|
    prop=z\|
    

    and _10

    C:\Java\jdk1.7.0_10\bin\java.exe -cp . -Dprop=z\ test a\ b
    agg=a|
    agg=b|
    prop=z|
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have several build machines, each running a single TeamCity build agent. Each machine
We recently added a new TeamCity build agent. Because it doesn't have ASP.NET MVC
I currently have TeamCity CI installed on a windows server. I want to install
I have a TeamCity server setup to do my CI builds. I'm building and
We currently have our dev server running Teamcity 7.1 and have been building /
I have installed TeamCity on a server machine, but I would like to administer
I have two build agents running for teamcity. One build agent runs on a
I have a TeamCity (5.1.2) server with currently one agent. During the day, it
We are using Teamcity to do continuous integration builds for our website and have
My current requirement is: I have to package my grails app and use teamcity

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.