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.
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.
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...
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.
Assuming this is obsolete; reopen if not.