Board index » jbuilder » classpath problem with bmj of JBuilder Enterprise X

classpath problem with bmj of JBuilder Enterprise X


2004-11-05 10:29:21 PM
jbuilder5
I am using the bmj to build my source code.
It complains about unable to resolve a class.
The import statement for its package is present in the code.
The same class path works fine with the javac to build the same
file. pls advise. The details are as follows :-
source file = /opt2/Projects/Abc/AbcUtil.java
It contains = package Abc;import Abc.Abc.intf.*;
It references a class XYException which is present in /opt2/Classes/Abc/Abc/intf
The command used to build the file =
/opt2/JBuilderEnterpriseX/bin/bmj -sourcepath "/opt2/Projects" -classpath "/opt2/Classes:<other jars go in here>"
-d /opt2/Classes -nomakestable -nocheckstable -nowarn -g
-s /opt2/Projects/Abc/AbcUtil.java
It reports the error messages :-
/opt2/Projects/Abc/AbcUtil.java:51: cannot resolve symbol: class XYException in class Abc.AbcUtil
public static boolean findAbcPlace(String file) throws XYException {
If I edit the source code and replace XYException with Abc.Abc.intf.XYException, everything works fine.
But I dont want to edit so many files. The same classpath works
well with javac.
I have also tried to edit the classpath and provide /opt2/Classes/Abc/Abc/intf but no effect.
pls advise.
RK
 
 

Re:classpath problem with bmj of JBuilder Enterprise X

I think the problem may be that you're building to a directory that is in
your classpath. JBuilder's compiler gets a little funny when you do that,
probably because it's looking for the source for that class rather than the
class output file. Move the "missing" class to a separate directory or JAR
file, put that directory in the build class path, and try again.
--
Check out our latest white papers at
www.datadevelopment.com/papers/index.html
BladeNET Scores With Borland Enterprise Tools
Team Development with JBuilder and Borland Enterprise Server
Dolphin Data Development Ltd.
www.datadevelopment.com/
"RK" < XXXX@XXXXX.COM >wrote in message
Quote

I am using the bmj to build my source code.
It complains about unable to resolve a class.
The import statement for its package is present in the code.
The same class path works fine with the javac to build the same
file. pls advise. The details are as follows :-

source file = /opt2/Projects/Abc/AbcUtil.java
It contains = package Abc;import Abc.Abc.intf.*;
It references a class XYException which is present in
/opt2/Classes/Abc/Abc/intf

The command used to build the file =
/opt2/JBuilderEnterpriseX/bin/bmj -sourcepath "/opt2/Projects" -classpath
"/opt2/Classes:<other jars go in here>"
-d /opt2/Classes -nomakestable -nocheckstable -nowarn -g
-s /opt2/Projects/Abc/AbcUtil.java

It reports the error messages :-

/opt2/Projects/Abc/AbcUtil.java:51: cannot resolve symbol: class
XYException in class Abc.AbcUtil
public static boolean findAbcPlace(String file) throws XYException {

If I edit the source code and replace XYException with
Abc.Abc.intf.XYException, everything works fine.
But I dont want to edit so many files. The same classpath works
well with javac.

I have also tried to edit the classpath and provide
/opt2/Classes/Abc/Abc/intf but no effect.

pls advise.
RK