Eclipse- Dynamic Web Module 3.0 requires Java 1.6 or newer error while creating new project

后端 未结 15 1274
后悔当初
后悔当初 2020-12-29 04:51

I am not able to create a new Dynamic Web Project in eclipse indigo. I am getting the following error while creating new one.

Dynamic Web Module 3.0 r

相关标签:
15条回答
  • 2020-12-29 04:54

    if there is any different JDK version (more then one jdk )installed previously uninstall all of it. then install fresh one jdk (latest ) n to configure java environment see follow this link....

    https://www.youtube.com/watch?v=Hl-zzrqQoSE&list=PL484D73FA74A11AC9

    now follow following steps:

    1. right click on project >properties >project fact
    2. check on java by selecting version on its right side with dropdownlist.
    3. check on Dynamic Web Module with its version (remember that different version of this requires different version of TomcatServer so installed one step old version of tomcatServer)
    4. now click apply n ok.

    There are different reason for this problems but this is the most cases. is not solved contact at sanlama21@outlook.com

    0 讨论(0)
  • 2020-12-29 04:55

    This works for me ...

    file >> New >> Dynamic web project >> Enter project name >> Change 'Dynamic Web module version' from 3.0 to a lower version ,say 2.5, then change it back to 3.0 , the error message disappears . I think the initial error message that says it requires java 1.6 or above is a bug in Eclipse Java EE.

    0 讨论(0)
  • 2020-12-29 04:56

    Most probably you have several installed java versions on your PC, and your Eclipse is started based on old version.
    In command line java -version command shows default one or even first installed one, which is saved somewhere in registers, and it is not always that which is used by your applications. (As example, I have only 1.7 installed physically now but java -version shows old one 1.5)

    You may try next: right click on Eclipse shortcut, chose Shortcut tab, and change Target field so that it run with -vm argument pointing on that Java version you need:
    "D:\eclipse-jee-kepler-R-win32-x86_64\eclipse\eclipse.exe" -vm "C:\Program Files\Java\jdk1.7.0_45\bin\javaw.exe"

    0 讨论(0)
  • 2020-12-29 04:56

    i had the same problem, see what i did: first screen Shot:

    go and click New Runtime>Apache Tomcat v7.0 (for me)>Finish

    now the error has been removed

    0 讨论(0)
  • 2020-12-29 04:57

    I needed to modify the configuration and create a new runtime for tomcat. Not sure what happened to the original installation, but creating a new one did the trick.

    TomcatConfiguration

    0 讨论(0)
  • 2020-12-29 04:59

    This is late answer. But may help to other. If you are using Maven based project. You just include following code in pom.xml file. It can be resolved.

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                </configuration>
            </plugin>
        </plugins>
    </build>
    

    Update: Similarly if you are using jdk version 1.8 just include it in your <source> and <target> tags.

    0 讨论(0)
提交回复
热议问题