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

  • Home
  • SEARCH
  • 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 6370653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:57:30+00:00 2026-05-25T00:57:30+00:00

I am new in Java, spent on this problem too much time, can’t solve

  • 0

I am new in Java, spent on this problem too much time, can’t solve it:

I run build.xml file in Eclipse Java project. Project successfully built, all tests passed, but after that project not working, seems to be that something wrong happens with .classpath file, cause if I change build path settings (e.g. delete libs and add again), everything works…

build.xml file
`

<!-- Sets variables which can later be used. -->
<!-- The value of a property is accessed via ${} -->
<property name="src.dir" location="src" />
<property name="build.dir" location="build" />
<property name="dist.dir" location="dist" />
<property name="test.report.dir" location="test report" />

<!-- Define the classpath which includes -->
<path id="junit.class.path">

    <!-- needed libs -->
    <pathelement location="lib/commons-dbcp.jar" />
    <pathelement location="lib/commons-logging.jar" />
    <pathelement location="lib/commons-pool.jar" />
    <pathelement location="lib/log4j-1.2.15.jar" />
    <pathelement location="lib/mysql-connector-java-5.1.6-bin.jar" />
    <pathelement location="lib/spring.jar" />
    <pathelement location="lib/spring-webmvc.jar" />
    <pathelement location="lib/standard.jar" />

    <!-- JUnit 3-4 -->
    <pathelement location="C:\Program Files\eclipse\plugins\org.junit_4.8.1.v4_8_1_v20100427-1100\junit.jar" />
    <pathelement location="C:\Program Files\eclipse\plugins\org.junit_3.8.2.v3_8_2_v20100427-1100\junit.jar" />

    <!-- repository-config.xml -->
    <pathelement location="config" />

    <!-- classes after compiling -->
    <pathelement location="${build.dir}" />
</path>

<!-- Deletes the existing build, docs and dist directory-->
<target name="clean">
    <delete dir="${build.dir}" />
    <delete dir="${dist.dir}" />
    <delete dir="${test.report.dir}" />
</target>

<!-- Creates the  build, docs and dist directory-->
<target name="makedir">
    <mkdir dir="${build.dir}" />
    <mkdir dir="${dist.dir}" />
    <mkdir dir="${test.report.dir}" />
</target>

<!-- Compiles the java code (including the usage of library for JUnit -->
<target name="compile" depends="clean, makedir">
    <javac srcdir="${src.dir}" destdir="${build.dir}">
        <classpath refid="junit.class.path" />
    </javac>
</target>

<!--Creates the deployable jar file  -->
<target name="jar" depends="compile">
    <jar destfile="${dist.dir}\empdb.build.ant.jar" basedir="${build.dir}">
    </jar>
</target>

<!-- Run the JUnit Tests -->
<!-- Output is XML, could also be plain-->
<target name="junit" depends="jar">
    <junit printsummary="on" fork="true" haltonfailure="yes">
        <classpath refid="junit.class.path" />
        <formatter type="xml" />
        <batchtest todir="${test.report.dir}">
            <fileset dir="${src.dir}">
                <include name="**/*Test*.java" />
            </fileset>
        </batchtest>
    </junit>
</target>

<target name="main" depends="junit">
    <description>Main target</description>
</target>

`

This is the error on one of tests after project build

Class not found sef.test.repository.StubProjectRepositoryImplTest
java.lang.ClassNotFoundException: sef.test.repository.StubProjectRepositoryImplTest
    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)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:693)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:429)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
  • 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-25T00:57:30+00:00Added an answer on May 25, 2026 at 12:57 am

    Often eclipse flips out when files changes.

    Try this.

    1. Right click your project and press refresh
    2. Use Project -> clean… in eclipse
    3. Use Project -> build all in eclipse
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new in java, I have spent hours for this problem. I will
I'm new to Linux but having spent a whole day I Installed Java and
This is my second try to solve this problem. My first try was here
For a new Java web project I thought about using: Eclipse as IDE Mercurial
Almost every new Java-web-project is using a modern MVC-framework such as Struts or Spring
I'm a relatively new Java programmer coming from C++/STL, and am looking for a
We are starting a new Java EE project and am looking for suggestions regarding
When creating a new Java project in IntelliJ IDEA, the following directories and files
I am starting a new Java web project that will be worked on by
Eclipse and MyEclipse create new Java files with an extra blank line after the

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.