Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java package does not exist

I am starting to work on legacy project and fighting now with running it on my computer. I have imported it yesterday and everything worked fine, project did build and everyone was happy. Then I had to install some additional software and had some problems with java jdk and jre paths, but I managed to finish that task and I got back to building the project and I couldn't do it. I have not changed any file in the project, nor any project configuration (I'm using eclipse and build with ant) only changes in system environment were made. It also builds in other team member environment, so it's not the code itself.

error message I get looks like this:

[javac] C:\Users\bilskluc\virtualdisk\blah\xyz\packages\radius\src\com\blah\wfc\radiusinput\RadiusHostEntry.java:9: package com.blah.devkit.exception does not exist
[javac] import com.blah.devkit.exception.DRException;
[javac]                                         ^
[javac] C:\Users\bilskluc\virtualdisk\blah\xyz\packages\radius\src\com\blah\wfc\radiusinput\RadiusHostEntry.java:10: package com.blah.devkit.storable does not exist
[javac] import com.blah.devkit.storable.DRAbstractStorable;
[javac]                                        ^

and so on. It looks exactly the same in eclipse an when I run it from the console. ant packages used are imported with the project and pointed explicitly, also most important env variables are set from configuration file before running the build and the configuration file did not change.

Mentioned packages and classes are in a .jar file included in project.

Did anyone have a similar problem? I have checked everything I could think of. To reduce risk that I changed something I removed all code and download it from svn again (and checked that there were no commits in last few days).

Maybe someone has an idea where I should look for some system configuration changes that could cause this problem.

EDIT

those two libraries are mentioned in .classpath file

<classpathentry kind="lib" path="blah/lib/devkit.jar">
    <attributes>
        <attribute name="javadoc_location" value="jar:platform:/resource/MZ-package-radius/blah/lib/devkit_javadoc.jar!/javadoc"/>
    </attributes>
</classpathentry>
<classpathentry kind="lib" path="blah/lib/picostart.jar"/>

but I don't know ant very well so I don't know if it uses this file to determine classpath or does it use any other setting

like image 396
Edheene Avatar asked Oct 10 '22 01:10

Edheene


1 Answers

Assuming you have your class path set up in your ANT script:

<path id="compile.classpath">
    ...
</path>

You can output the classpath being used by your ANT script by putting something like this inside your target:

<property name="myclasspath" refid="compile.classpath"/>
  <echo message="Classpath = ${myclasspath}"/>
like image 80
Paul Avatar answered Oct 14 '22 04:10

Paul