Wrong JRE in a JavaScript Project Imported Into Eclipse












1















I imported a maven project into Eclipse. It is a JavaScript project, but still I get the following warnings:

- Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment.

- The compiler compliance specified is 1.5 but a JRE 1.8 is used



I examined the pom.xml, but did not find a:

maven-compiler-plugin



and not even the string 1.5.



What could be the reason for this behaviour?



I did see something strange. When I go to the properties of the project I see:



Source



Libraries



Order and Export



The strange thing is src/main/java and src/test java do not exist. So why are they included into the project?



When I remove those two paths and the JRE System library everything is clean.
But the code is going to be distributed and we do not want that everyone has to do these clean-up actions.
What could be the problem and how can I solve it?



It is only partly true that removing the paths and JRE System library makes thing clean. When I do:

Maven -> Update Project



I get the old problem back again.





Edit on the comment of @greg-449.



I created a pom.xml that is as clean as I can create it:



<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<name>Foo Client Application</name>
<description>The Foot client, enabling local users and remote partners to work together.</description>
<url>https://www.Foo.net/</url>
<groupId>net.Foo.client</groupId>
<artifactId>Foo-client</artifactId>
<version>1.2.0.0-SNAPSHOT</version>

</project>


I see nothing wrong with this pom.xml. But I am still getting the same messages.

So why do I keep getting those messages?










share|improve this question

























  • Someone told me the problem is that Eclipse thinks that the project is a Java/JavaSript project, while it is an HTML/JavaScript project. Could this be the case? If so: what can I do about it?

    – Cecil Westerhof
    Nov 26 '18 at 13:53













  • If you have 'Java Build Path' in the project properties then Eclipse thinks this is a Java project. These are nothing to do with Javascript. You might want to create a new project which is Javascript only (or one of the 'Web' projects).

    – greg-449
    Nov 28 '18 at 10:09













  • @greg-449 It is a project that is more as a decade in the running. I am not allowed to just create a new pom.xml I am afraid. I had searched for compiler directives, but did not find any. I just now saw there was also JUnit dependency. What seemed a bit odd. But removing this did not change things. I look further in the pom.xml to see if there is anything that would explain this behaviour.

    – Cecil Westerhof
    Nov 28 '18 at 10:37
















1















I imported a maven project into Eclipse. It is a JavaScript project, but still I get the following warnings:

- Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment.

- The compiler compliance specified is 1.5 but a JRE 1.8 is used



I examined the pom.xml, but did not find a:

maven-compiler-plugin



and not even the string 1.5.



What could be the reason for this behaviour?



I did see something strange. When I go to the properties of the project I see:



Source



Libraries



Order and Export



The strange thing is src/main/java and src/test java do not exist. So why are they included into the project?



When I remove those two paths and the JRE System library everything is clean.
But the code is going to be distributed and we do not want that everyone has to do these clean-up actions.
What could be the problem and how can I solve it?



It is only partly true that removing the paths and JRE System library makes thing clean. When I do:

Maven -> Update Project



I get the old problem back again.





Edit on the comment of @greg-449.



I created a pom.xml that is as clean as I can create it:



<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<name>Foo Client Application</name>
<description>The Foot client, enabling local users and remote partners to work together.</description>
<url>https://www.Foo.net/</url>
<groupId>net.Foo.client</groupId>
<artifactId>Foo-client</artifactId>
<version>1.2.0.0-SNAPSHOT</version>

</project>


I see nothing wrong with this pom.xml. But I am still getting the same messages.

So why do I keep getting those messages?










share|improve this question

























  • Someone told me the problem is that Eclipse thinks that the project is a Java/JavaSript project, while it is an HTML/JavaScript project. Could this be the case? If so: what can I do about it?

    – Cecil Westerhof
    Nov 26 '18 at 13:53













  • If you have 'Java Build Path' in the project properties then Eclipse thinks this is a Java project. These are nothing to do with Javascript. You might want to create a new project which is Javascript only (or one of the 'Web' projects).

    – greg-449
    Nov 28 '18 at 10:09













  • @greg-449 It is a project that is more as a decade in the running. I am not allowed to just create a new pom.xml I am afraid. I had searched for compiler directives, but did not find any. I just now saw there was also JUnit dependency. What seemed a bit odd. But removing this did not change things. I look further in the pom.xml to see if there is anything that would explain this behaviour.

    – Cecil Westerhof
    Nov 28 '18 at 10:37














1












1








1








I imported a maven project into Eclipse. It is a JavaScript project, but still I get the following warnings:

- Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment.

- The compiler compliance specified is 1.5 but a JRE 1.8 is used



I examined the pom.xml, but did not find a:

maven-compiler-plugin



and not even the string 1.5.



What could be the reason for this behaviour?



I did see something strange. When I go to the properties of the project I see:



Source



Libraries



Order and Export



The strange thing is src/main/java and src/test java do not exist. So why are they included into the project?



When I remove those two paths and the JRE System library everything is clean.
But the code is going to be distributed and we do not want that everyone has to do these clean-up actions.
What could be the problem and how can I solve it?



It is only partly true that removing the paths and JRE System library makes thing clean. When I do:

Maven -> Update Project



I get the old problem back again.





Edit on the comment of @greg-449.



I created a pom.xml that is as clean as I can create it:



<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<name>Foo Client Application</name>
<description>The Foot client, enabling local users and remote partners to work together.</description>
<url>https://www.Foo.net/</url>
<groupId>net.Foo.client</groupId>
<artifactId>Foo-client</artifactId>
<version>1.2.0.0-SNAPSHOT</version>

</project>


I see nothing wrong with this pom.xml. But I am still getting the same messages.

So why do I keep getting those messages?










share|improve this question
















I imported a maven project into Eclipse. It is a JavaScript project, but still I get the following warnings:

- Build path specifies execution environment J2SE-1.5. There are no JREs installed in the workspace that are strictly compatible with this environment.

- The compiler compliance specified is 1.5 but a JRE 1.8 is used



I examined the pom.xml, but did not find a:

maven-compiler-plugin



and not even the string 1.5.



What could be the reason for this behaviour?



I did see something strange. When I go to the properties of the project I see:



Source



Libraries



Order and Export



The strange thing is src/main/java and src/test java do not exist. So why are they included into the project?



When I remove those two paths and the JRE System library everything is clean.
But the code is going to be distributed and we do not want that everyone has to do these clean-up actions.
What could be the problem and how can I solve it?



It is only partly true that removing the paths and JRE System library makes thing clean. When I do:

Maven -> Update Project



I get the old problem back again.





Edit on the comment of @greg-449.



I created a pom.xml that is as clean as I can create it:



<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<name>Foo Client Application</name>
<description>The Foot client, enabling local users and remote partners to work together.</description>
<url>https://www.Foo.net/</url>
<groupId>net.Foo.client</groupId>
<artifactId>Foo-client</artifactId>
<version>1.2.0.0-SNAPSHOT</version>

</project>


I see nothing wrong with this pom.xml. But I am still getting the same messages.

So why do I keep getting those messages?







javascript eclipse maven






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 28 '18 at 11:07







Cecil Westerhof

















asked Nov 22 '18 at 8:04









Cecil WesterhofCecil Westerhof

58




58













  • Someone told me the problem is that Eclipse thinks that the project is a Java/JavaSript project, while it is an HTML/JavaScript project. Could this be the case? If so: what can I do about it?

    – Cecil Westerhof
    Nov 26 '18 at 13:53













  • If you have 'Java Build Path' in the project properties then Eclipse thinks this is a Java project. These are nothing to do with Javascript. You might want to create a new project which is Javascript only (or one of the 'Web' projects).

    – greg-449
    Nov 28 '18 at 10:09













  • @greg-449 It is a project that is more as a decade in the running. I am not allowed to just create a new pom.xml I am afraid. I had searched for compiler directives, but did not find any. I just now saw there was also JUnit dependency. What seemed a bit odd. But removing this did not change things. I look further in the pom.xml to see if there is anything that would explain this behaviour.

    – Cecil Westerhof
    Nov 28 '18 at 10:37



















  • Someone told me the problem is that Eclipse thinks that the project is a Java/JavaSript project, while it is an HTML/JavaScript project. Could this be the case? If so: what can I do about it?

    – Cecil Westerhof
    Nov 26 '18 at 13:53













  • If you have 'Java Build Path' in the project properties then Eclipse thinks this is a Java project. These are nothing to do with Javascript. You might want to create a new project which is Javascript only (or one of the 'Web' projects).

    – greg-449
    Nov 28 '18 at 10:09













  • @greg-449 It is a project that is more as a decade in the running. I am not allowed to just create a new pom.xml I am afraid. I had searched for compiler directives, but did not find any. I just now saw there was also JUnit dependency. What seemed a bit odd. But removing this did not change things. I look further in the pom.xml to see if there is anything that would explain this behaviour.

    – Cecil Westerhof
    Nov 28 '18 at 10:37

















Someone told me the problem is that Eclipse thinks that the project is a Java/JavaSript project, while it is an HTML/JavaScript project. Could this be the case? If so: what can I do about it?

– Cecil Westerhof
Nov 26 '18 at 13:53







Someone told me the problem is that Eclipse thinks that the project is a Java/JavaSript project, while it is an HTML/JavaScript project. Could this be the case? If so: what can I do about it?

– Cecil Westerhof
Nov 26 '18 at 13:53















If you have 'Java Build Path' in the project properties then Eclipse thinks this is a Java project. These are nothing to do with Javascript. You might want to create a new project which is Javascript only (or one of the 'Web' projects).

– greg-449
Nov 28 '18 at 10:09







If you have 'Java Build Path' in the project properties then Eclipse thinks this is a Java project. These are nothing to do with Javascript. You might want to create a new project which is Javascript only (or one of the 'Web' projects).

– greg-449
Nov 28 '18 at 10:09















@greg-449 It is a project that is more as a decade in the running. I am not allowed to just create a new pom.xml I am afraid. I had searched for compiler directives, but did not find any. I just now saw there was also JUnit dependency. What seemed a bit odd. But removing this did not change things. I look further in the pom.xml to see if there is anything that would explain this behaviour.

– Cecil Westerhof
Nov 28 '18 at 10:37





@greg-449 It is a project that is more as a decade in the running. I am not allowed to just create a new pom.xml I am afraid. I had searched for compiler directives, but did not find any. I just now saw there was also JUnit dependency. What seemed a bit odd. But removing this did not change things. I look further in the pom.xml to see if there is anything that would explain this behaviour.

– Cecil Westerhof
Nov 28 '18 at 10:37












2 Answers
2






active

oldest

votes


















0














Using Maven, you should better to use a JDK instead of a JRE.



Try in you build path : Right click on the project > Build Path > Configure Build path



Remove the JRE and add a JDK






share|improve this answer
























  • Here why : eclipse.org/forums/index.php/t/264351

    – Jérôme Renard
    Nov 26 '18 at 12:35











  • That only removes one of the messages. And when I do 'Maven -> Update Project' it returns. Also the problem is that people need to do things after they imported the project. We want this not to be necessary.

    – Cecil Westerhof
    Nov 26 '18 at 13:51



















0














It looks like Eclipse does not handle imported maven projects correctly. It seems it supposes that these are always Java projects.

When I create and import the following pom.xml (and nothing beside this pom.xml):



<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>

<name>Foo Client Application</name>
<description>The Foo client, enabling local users and remote partners to work together.</description>
<url>https://www.Foo.com/</url>
<groupId>com.Foo.client</groupId>
<artifactId>Foo-client</artifactId>
<version>1.2.0.0-SNAPSHOT</version>

</project>


I have the same problems. So it looks like it is impossible to solve without changing Eclipse.






share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53426330%2fwrong-jre-in-a-javascript-project-imported-into-eclipse%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Using Maven, you should better to use a JDK instead of a JRE.



    Try in you build path : Right click on the project > Build Path > Configure Build path



    Remove the JRE and add a JDK






    share|improve this answer
























    • Here why : eclipse.org/forums/index.php/t/264351

      – Jérôme Renard
      Nov 26 '18 at 12:35











    • That only removes one of the messages. And when I do 'Maven -> Update Project' it returns. Also the problem is that people need to do things after they imported the project. We want this not to be necessary.

      – Cecil Westerhof
      Nov 26 '18 at 13:51
















    0














    Using Maven, you should better to use a JDK instead of a JRE.



    Try in you build path : Right click on the project > Build Path > Configure Build path



    Remove the JRE and add a JDK






    share|improve this answer
























    • Here why : eclipse.org/forums/index.php/t/264351

      – Jérôme Renard
      Nov 26 '18 at 12:35











    • That only removes one of the messages. And when I do 'Maven -> Update Project' it returns. Also the problem is that people need to do things after they imported the project. We want this not to be necessary.

      – Cecil Westerhof
      Nov 26 '18 at 13:51














    0












    0








    0







    Using Maven, you should better to use a JDK instead of a JRE.



    Try in you build path : Right click on the project > Build Path > Configure Build path



    Remove the JRE and add a JDK






    share|improve this answer













    Using Maven, you should better to use a JDK instead of a JRE.



    Try in you build path : Right click on the project > Build Path > Configure Build path



    Remove the JRE and add a JDK







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Nov 26 '18 at 12:34









    Jérôme RenardJérôme Renard

    172




    172













    • Here why : eclipse.org/forums/index.php/t/264351

      – Jérôme Renard
      Nov 26 '18 at 12:35











    • That only removes one of the messages. And when I do 'Maven -> Update Project' it returns. Also the problem is that people need to do things after they imported the project. We want this not to be necessary.

      – Cecil Westerhof
      Nov 26 '18 at 13:51



















    • Here why : eclipse.org/forums/index.php/t/264351

      – Jérôme Renard
      Nov 26 '18 at 12:35











    • That only removes one of the messages. And when I do 'Maven -> Update Project' it returns. Also the problem is that people need to do things after they imported the project. We want this not to be necessary.

      – Cecil Westerhof
      Nov 26 '18 at 13:51

















    Here why : eclipse.org/forums/index.php/t/264351

    – Jérôme Renard
    Nov 26 '18 at 12:35





    Here why : eclipse.org/forums/index.php/t/264351

    – Jérôme Renard
    Nov 26 '18 at 12:35













    That only removes one of the messages. And when I do 'Maven -> Update Project' it returns. Also the problem is that people need to do things after they imported the project. We want this not to be necessary.

    – Cecil Westerhof
    Nov 26 '18 at 13:51





    That only removes one of the messages. And when I do 'Maven -> Update Project' it returns. Also the problem is that people need to do things after they imported the project. We want this not to be necessary.

    – Cecil Westerhof
    Nov 26 '18 at 13:51













    0














    It looks like Eclipse does not handle imported maven projects correctly. It seems it supposes that these are always Java projects.

    When I create and import the following pom.xml (and nothing beside this pom.xml):



    <?xml version="1.0" encoding="UTF-8"?>
    <project
    xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <name>Foo Client Application</name>
    <description>The Foo client, enabling local users and remote partners to work together.</description>
    <url>https://www.Foo.com/</url>
    <groupId>com.Foo.client</groupId>
    <artifactId>Foo-client</artifactId>
    <version>1.2.0.0-SNAPSHOT</version>

    </project>


    I have the same problems. So it looks like it is impossible to solve without changing Eclipse.






    share|improve this answer




























      0














      It looks like Eclipse does not handle imported maven projects correctly. It seems it supposes that these are always Java projects.

      When I create and import the following pom.xml (and nothing beside this pom.xml):



      <?xml version="1.0" encoding="UTF-8"?>
      <project
      xmlns="http://maven.apache.org/POM/4.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

      <modelVersion>4.0.0</modelVersion>

      <name>Foo Client Application</name>
      <description>The Foo client, enabling local users and remote partners to work together.</description>
      <url>https://www.Foo.com/</url>
      <groupId>com.Foo.client</groupId>
      <artifactId>Foo-client</artifactId>
      <version>1.2.0.0-SNAPSHOT</version>

      </project>


      I have the same problems. So it looks like it is impossible to solve without changing Eclipse.






      share|improve this answer


























        0












        0








        0







        It looks like Eclipse does not handle imported maven projects correctly. It seems it supposes that these are always Java projects.

        When I create and import the following pom.xml (and nothing beside this pom.xml):



        <?xml version="1.0" encoding="UTF-8"?>
        <project
        xmlns="http://maven.apache.org/POM/4.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

        <modelVersion>4.0.0</modelVersion>

        <name>Foo Client Application</name>
        <description>The Foo client, enabling local users and remote partners to work together.</description>
        <url>https://www.Foo.com/</url>
        <groupId>com.Foo.client</groupId>
        <artifactId>Foo-client</artifactId>
        <version>1.2.0.0-SNAPSHOT</version>

        </project>


        I have the same problems. So it looks like it is impossible to solve without changing Eclipse.






        share|improve this answer













        It looks like Eclipse does not handle imported maven projects correctly. It seems it supposes that these are always Java projects.

        When I create and import the following pom.xml (and nothing beside this pom.xml):



        <?xml version="1.0" encoding="UTF-8"?>
        <project
        xmlns="http://maven.apache.org/POM/4.0.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

        <modelVersion>4.0.0</modelVersion>

        <name>Foo Client Application</name>
        <description>The Foo client, enabling local users and remote partners to work together.</description>
        <url>https://www.Foo.com/</url>
        <groupId>com.Foo.client</groupId>
        <artifactId>Foo-client</artifactId>
        <version>1.2.0.0-SNAPSHOT</version>

        </project>


        I have the same problems. So it looks like it is impossible to solve without changing Eclipse.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 6 '18 at 13:09









        Cecil WesterhofCecil Westerhof

        58




        58






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53426330%2fwrong-jre-in-a-javascript-project-imported-into-eclipse%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            404 Error Contact Form 7 ajax form submitting

            How to know if a Active Directory user can login interactively

            TypeError: fit_transform() missing 1 required positional argument: 'X'