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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:01:33+00:00 2026-06-16T07:01:33+00:00

I am facing a weird problem here… I have a JUnit implementing a few

  • 0

I am facing a weird problem here…

I have a JUnit implementing a few tests. This class looks like the following:

public class MyTest {

    @Rule
    public TemporaryFolder folder = new TemporaryFolder();

    @Test
    public void myTest1() throws IOException {
        String destinationPath = folder.newFile("destination1.txt").getPath();
        // Do things
    }

    @Test
    public void myTest2() throws IOException {
        String destinationPath = folder.newFile("destination2.txt").getPath();
        // Do things
    }

    @Test
    public void myTest3() throws IOException {
        String destinationPath = folder.newFile("destination.txt").getPath();
        // Do things
    }
}

This test class used to work in my previous environment and still does in Continuum.

Yet, when launching from Eclipse none, some, or all of the tests arbitrarily throw an IOException such as:

java.io.IOException: The system cannot find the path specified
    at java.io.WinNTFileSystem.createFileExclusively(Native Method)
    at java.io.File.createNewFile(File.java:883)
    at org.junit.rules.TemporaryFolder.newFile(TemporaryFolder.java:53)
    at MyTest.myTest2(MyTest.java:50)

I have the exact same problem running JUnit 4.9 or JUnit 4.10 …

How can I fix that so that it works properly?

  • 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-16T07:01:35+00:00Added an answer on June 16, 2026 at 7:01 am

    You should try disabling your anti-virus protection.

    I was having same problem, and after disabling Kaspersky everything was working just fine.

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

Sidebar

Related Questions

This is a very weird problem am facing HTML: <input type=button id=buttonobj class=some class
I facing a weird problem here. I already have a simple try-out for jquery
I am facing this very weird problem, I have created a custom UITableViewCell on
I am facing a weird problem I have defined I a structure in a
I am facing a weird problem. I have got a file called in which
I am facing is weird problem. I have an input field on my page
I am facing a weird problem with a text field on my page. This
Within last few days I'm facing really weird problem, I did my best to
I'm just facing weird problem with cos function in objective c. I have the
I am facing this weird problem. The WebApp I'm debugging right now, is invoking

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.