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 108915 - NetBeans 6.0 M10 doesn't compile projects using java platform <= 1.4 any more
Summary: NetBeans 6.0 M10 doesn't compile projects using java platform <= 1.4 any more
Status: RESOLVED DUPLICATE of bug 108832
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: issues@platform
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-05 00:32 UTC by evandro
Modified: 2008-12-22 10:30 UTC (History)
0 users

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 evandro 2007-07-05 00:32:06 UTC
NetBeans are passing arguments to javac that are not supported in javac compilers of version 1.4, so these projects 
configured to use java platform 1.4 can't be compiled anymore.

It was not happening in NetBeans 6.0 M9.

The problem should be the argument -Djava.endorsed.dirs

See log below:

init:
deps-clean:
Deleting directory C:\projetos\Jas\dist
clean:
init:
deps-jar:
Compiling 578 source files to C:\projetos\Jas\src
javac: invalid flag: -Djava.endorsed.dirs=C:\NetBeans6.0M10\java1\modules\ext\jaxws21\api
Usage: javac <options> <source files>
where possible options include:
  -g                        Generate all debugging info
  -g:none                   Generate no debugging info
  -g:{lines,vars,source}    Generate only some debugging info
  -nowarn                   Generate no warnings
  -verbose                  Output messages about what the compiler is doing
  -deprecation              Output source locations where deprecated APIs are used
  -classpath <path>         Specify where to find user class files
  -sourcepath <path>        Specify where to find input source files
  -bootclasspath <path>     Override location of bootstrap class files
  -extdirs <dirs>           Override location of installed extensions
  -d <directory>            Specify where to place generated class files
  -encoding <encoding>      Specify character encoding used by source files
  -source <release>         Provide source compatibility with specified release
  -target <release>         Generate class files for specific VM version
  -help                     Print a synopsis of standard options

BUILD FAILED (total time: 7 seconds)
Comment 1 ats37 2007-07-06 18:20:44 UTC
This does not only affect JDK 1.4 apps, nor only java projects.  I have a web
application that is built using IBM's 1.3.1 JDK, which was building fine in
Netbeans 5.5.  I opened it up in Netbeans 6.0 M10 and it refuses to build,
giving the error quoted below.
The main difference I could find is that when I edited the project properties to
resolve the missing J2EE Server (by selecting Tomcat 6.0.13 instead of 5.5.17
that was in the settings previously) Netbeans has added the line
<compilerarg line="-Djava.endorsed.dirs='@{jaxwsendorsed}'"/>
into the javac macro definition in -init-macrodef-javac in build-impl.xml

In my opinion, this should be more than a P3; even if it does not happen with
later JDKs, migrating to a different JDK version is not a viable option for
most projects (else they would surely have done so already).

Whether the blame lies with Netbeans or with Ant 1.7.0's javac task not
filtering out the unsupported option is debatable, but either way the end
result is that projects which built in NB 5.5 no longer do so.
Comment 2 ats37 2007-07-06 18:29:53 UTC
Duplicate of issue #108832.

*** This issue has been marked as a duplicate of 108832 ***