Changing JDK

View: New views
2 Messages — Rating Filter:   Alert me  

Changing JDK

by TomSimmons :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have several project originally written under NB 5.x using JDK 5.

I would now like to change them to JDK 6, so i thought simply project properties, change the Source/Binary Format, recompile, job done.

However I can change the JDK, that's fine, but when I dot he clean compile I get...

Created dir: D:\Projects\SurveyReports\build\generated\src
Exception in thread "main" java.lang.IllegalArgumentException: PWC6309: Illegal compilerSourceVM: 1.6
        at org.apache.jasper.JspC.setCompilerSourceVM(JspC.java:707)
        at org.netbeans.modules.web.project.ant.JspC.main(JspC.java:78)
D:\Projects\SurveyReports\nbproject\build-impl.xml:436: Java returned: 1
BUILD FAILED (total time: 2 seconds)

which points to.....

<target depends="compile" description="Test compile JSP pages to expose compilation errors." if="do.compile.jsps" name="compile-jsps">
        <mkdir dir="${build.generated.dir}/src"/>
        <java classname="org.netbeans.modules.web.project.ant.JspC" failonerror="true" fork="true">
            <arg value="-uriroot"/>
            <arg file="${basedir}/${build.web.dir}"/>
            <arg value="-d"/>
            <arg file="${basedir}/${build.generated.dir}/src"/>
            <arg value="-die1"/>
            <arg value="-compilerSourceVM ${javac.source}"/>
            <arg value="-compilerTargetVM ${javac.target}"/>
            <classpath path="${java.home}/../lib/tools.jar:${copyfiles.classpath}:${jspcompilation.classpath}"/>
        </java>
        <mkdir dir="${build.generated.dir}/classes"/>
        <webproject2:javac classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}" destdir="${build.generated.dir}/classes" srcdir="${build.generated.dir}/src"/>
    </target>


of the build-impl.xml.

If I delete the compilerSourceVM and compilerTargetVM I can clean build, but as soon a I close the project and re-open it complains that build-impl.xml has been externall modified, would I like to regenerate, say yes, the lines come back, can't build again.

So simply, how do I move the project up to JDK?


Tom

Re: Changing JDK

by Karthikeyan Rajeswaran :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Seems related to:
    http://www.netbeans.org/issues/show_bug.cgi?id=128232
    http://www.netbeans.org/issues/show_bug.cgi?id=135568
        ...do not compile/run any specific JSP, just run the whole
project and no issue will happen.


regards,
karthik
     

TomSimmons wrote:

> I have several project originally written under NB 5.x using JDK 5.
>
> I would now like to change them to JDK 6, so i thought simply project
> properties, change the Source/Binary Format, recompile, job done.
>
> However I can change the JDK, that's fine, but when I dot he clean compile I
> get...
>
> Created dir: D:\Projects\SurveyReports\build\generated\src
> Exception in thread "main" java.lang.IllegalArgumentException: PWC6309:
> Illegal compilerSourceVM: 1.6
>         at org.apache.jasper.JspC.setCompilerSourceVM(JspC.java:707)
>         at org.netbeans.modules.web.project.ant.JspC.main(JspC.java:78)
> D:\Projects\SurveyReports\nbproject\build-impl.xml:436: Java returned: 1
> BUILD FAILED (total time: 2 seconds)
>
> which points to.....
>
> <target depends="compile" description="Test compile JSP pages to expose
> compilation errors." if="do.compile.jsps" name="compile-jsps">
>         <mkdir dir="${build.generated.dir}/src"/>
>         <java classname="org.netbeans.modules.web.project.ant.JspC"
> failonerror="true" fork="true">
>             <arg value="-uriroot"/>
>             <arg file="${basedir}/${build.web.dir}"/>
>             <arg value="-d"/>
>             <arg file="${basedir}/${build.generated.dir}/src"/>
>             <arg value="-die1"/>
>             <arg value="-compilerSourceVM ${javac.source}"/>
>             <arg value="-compilerTargetVM ${javac.target}"/>
>             <classpath
> path="${java.home}/../lib/tools.jar:${copyfiles.classpath}:${jspcompilation.classpath}"/>
>         </java>
>         <mkdir dir="${build.generated.dir}/classes"/>
>         <webproject2:javac
> classpath="${j2ee.platform.classpath}:${build.classes.dir}:${jspcompilation.classpath}"
> destdir="${build.generated.dir}/classes"
> srcdir="${build.generated.dir}/src"/>
>     </target>
>
>
> of the build-impl.xml.
>
> If I delete the compilerSourceVM and compilerTargetVM I can clean build, but
> as soon a I close the project and re-open it complains that build-impl.xml
> has been externall modified, would I like to regenerate, say yes, the lines
> come back, can't build again.
>
> So simply, how do I move the project up to JDK?
>
>
> Tom
>  
LightInTheBox - Buy quality products at wholesale price