This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 58075 - Using bmj (Borland Make) with ant to compile java files
Summary: Using bmj (Borland Make) with ant to compile java files
Status: RESOLVED WONTFIX
Alias: None
Product: projects
Classification: Unclassified
Component: Ant Project (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-20 01:15 UTC by sviyer
Modified: 2006-11-20 18:05 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sviyer 2005-04-20 01:15:33 UTC
Hi,

Justification:

Some of us are JBuilder-2005 users moving on to NetBeans. We still want to
continue using JB till we are confident with NB. Further bmj still supports
"-target 1.4"  for java 1.5 source while javac has removed this support.

To use bmj with ant we set 

  build.compiler=com.borland.jbuilder.ant.compiler.Bmj
 
and provide the following 3 jars as additional classpath to ANT
  which are under JB2005 install dir   
      lib/javac.jar, lib/jbuilder.jar and lib/primetime.jar

When the above is set up with NetBeans 4.2  java compile fails with the
following error
------------------------------start stack trace ---------------------------
Compiler internal error.
java.lang.NoSuchMethodError:
com.sun.tools.javac.util.Log.addMessageBundler(Ljava/lang/String;)Z
        at com.borland.javac.compiler.storage.SystemLog.<init>(Unknown Source)
        at com.borland.javac.compiler.storage.SystemLog.instance(Unknown Source)
        at com.borland.javac.javamaker.Main.compile(Unknown Source)
        at com.borland.jbuilder.ant.compiler.Bmj.execute(Unknown Source)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:936)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:758)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:386)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
        at org.apache.tools.ant.Task.perform(Task.java:364)
        at org.apache.tools.ant.Target.execute(Target.java:341)
        at org.apache.tools.ant.Target.performTasks(Target.java:369)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1214)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1062)
        at
org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:234)
        at
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:242)
        at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:125)   

------------------------------end stack trace ---------------------------

Looks like some other netbeans/ant jar also provides com.sun.tools.javac.* files
and instead of using JB2005/lib/javac.jar the wrong class is picked up.

I examined the class path but none of them seem to ?  the java tools jar comes
in the end ?

Note that the setting described above works perfectly with JB and Ant.

How do we fix this ?

Please help. This is high priority for us as bmj let's us use java 1.5 lang and
compile it to 1.4 byte code. 

Correct ant integration should allow us to use any compiler we choose to use.
Comment 1 Jesse Glick 2005-04-20 02:02:14 UTC
Did you try Borland's javac.jar to NB's classpath (-cp:p in netbeans.conf)? NB's
lib/nbexec puts ${jdk.home}/lib/tools.jar in the IDE's classpath, and this is
the only way you could override it. Worth a try, even if it's pretty ugly. I
don't think we had any expectation that someone would be trying to override
tools.jar...
Comment 2 sviyer 2005-05-21 23:26:00 UTC
Yes, tried (-cp:p in netbeans.conf) and changed class path . That worked.

Although I get some other problem related to bmj (i.e. definitely not NB )

Have given up on this.
Comment 3 Jesse Glick 2006-11-20 18:05:28 UTC
Assuming this is obsolete; reopen if not.