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 44966 - Cannot build project on JDK 1.3.x
Summary: Cannot build project on JDK 1.3.x
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks: 41537
  Show dependency tree
 
Reported: 2004-06-16 13:02 UTC by Milan Kubec
Modified: 2006-03-24 10:28 UTC (History)
2 users (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 Milan Kubec 2004-06-16 13:02:53 UTC
[dev-200406151800, JDK 1.5.0 Beta3 b55]

I've added platform JDK 1.3.1_07 and set this
platform for already created project. The project
cannot be built, error message says:
...
Compiling 1 source file to
/usr/local/space/testing/projects/TestPlatform/build/classes
javac: invalid flag: -source
...
Comment 1 psuk 2004-06-17 08:42:35 UTC
Chaning subcomponents to project
Comment 2 David Konecny 2004-06-23 17:05:19 UTC
Jesse,

when explicit platform is set we start <javac> task with fork=true and
executable=path_to_javac. The problem is that if platform is JDK 1.3
there is no "source" parameter and <javac> task does not filter it out
because it does not know of what version the executed javac is.

So the solution could be:
* modify j2se-project.xsd to allow <explicit-platform> element to have
value which would be specification version of JDK.
* use the value in build-impl.xsl to generate "source" attribute of
javac/javadoc tasks only for explicit-platform > 1.3

I'm not expert in XSL but I guess it should be easy to do.

Do you agree? Any better solution?
Comment 3 Jesse Glick 2004-06-23 17:20:42 UTC
Or add an attribute to <explicit-platform> saying whether or not
-source is supported, so the options would be

1. (nothing)

2. <explicit-platform explicit-source-supported="true"/> (1.4+)

3. <explicit-platform explicit-source-supported="false"/> (1.3-)

Unfortunately I don't see any better solution, since <javac> does not
handle it for you.
Comment 4 David Konecny 2004-06-24 13:32:49 UTC
Partially fixed in:
src/org/netbeans/modules/java/j2seproject/resources/j2se-project.xsd;
new revision: 1.6; previous revision: 1.5
src/org/netbeans/modules/java/j2seproject/ui/customizer/J2SEProjectP
new revision: 1.17; previous revision: 1.16

Tomas, please update build-impl.xsl to use new attribute. DO NOT
FORGET that it must be done both for <javac> and <javadoc>.
Comment 5 Tomas Zezula 2004-06-24 15:00:07 UTC
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/resources/build-impl.xsl,v
 <--  build-impl.xsl
new revision: 1.23; previous revision: 1.22
done
Comment 6 Jesse Glick 2004-06-24 16:07:06 UTC
Did someone check existing projects in nb.org to see if they need
updating? (nbbuild/validate-project-xmls.xml) And notify nbdev?
Comment 7 Milan Kubec 2004-07-23 10:10:36 UTC
Verified in 20040723.