facebook

Eclipse error running cod in jdk1.6

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #288967 Reply

    muddu_shafi
    Member

    I am trying to run Maven POM.xml file which points to my project-src-java directory. This directory has all my code. while doing mvn:install on pom.xml I am getting this error.

    [INFO] Building ATCC Security
    [INFO]
    [INFO] Id: atcc-common:atcc-common-security:jar:1.3.4
    [INFO] task-segment: [install]
    [INFO] ————————————————————————
    [INFO] [resources:resources]
    [INFO] Using default encoding to copy filtered resources.
    url = http://repo1.maven.org/maven2
    Downloading: http://repo1.maven.org/maven2/rbums/rbums-core/1.2/rbums-core-1.2.pom
    [INFO] [compiler:compile]
    [INFO] Compiling 13 source files to C:\Muddu1\atcc-common\target\classes
    [ERROR]

    Mojo:

    org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile

    FAILED for project:

    atcc-common:atcc-common-security:jar:1.3.4

    Reason:

    C:\Muddu1\atcc-common\security\src\java\org\atcc\common\security\AtccLoginModule.java:[69,27] generics are not supported in -source 1.3
    (try -source 1.5 to enable generics)
    Map<String, ?> sharedState, Map<String, ?> options) {

    C:\Muddu1\atcc-common\security\src\java\org\atcc\common\security\UserRegistery.java:[29,63] generics are not supported in -source 1.3
    (try -source 1.5 to enable generics)
    private static ThreadLocal userHolder = new ThreadLocal<AtccUser>();
    ——————————————————————————————————–
    Well in my Myeclipse configruration I have gone to windows-> prefernces->installed JRE’s and pointed to my jdk1.5.
    Note:- I feel that I am executing the java code using hte jdk1.5, then why am I getting this error.
    Also when you look at the Myeclipse installation summary, it shows some different details.
    I am confused

    ———————————————————————————————————-
    *** Date:
    Wednesday, September 10, 2008 3:31:37 PM EDT

    ** System properties:
    OS=WindowsXP
    OS version=5.1
    Java version=1.5.0_11

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 6.5.1 GA
    Build id: 6.5.1-GA-20080715

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 6.5.1 GA
    Build id: 6.5.1-GA-20080715

    Eclipse Platform

    Version: 3.3.0.v20070612-_19UEkLEzwsdF9jSqQ-G
    Build id: I20070625-1500

    Eclipse RCP

    Version: 3.3.0.v20070607-8y8eE8NEbsN3X_fjWS8HPNG
    Build id: I20070625-1500

    Eclipse Java Development Tools

    Version: 3.3.0.v20070606-0010-7o7jCHEFpPoqQYvnXqejeR
    Build id: I20070625-1500

    Eclipse Plug-in Development Environment

    Version: 3.3.0.v20070607-7N7M-DUUEF6Ez0H46IcCC
    Build id: I20070625-1500

    Eclipse Project SDK

    Version: 3.3.0.v20070607-7M7J-BIolz-OcxWxvWAPSfLPqevO
    Build id: I20070625-1500

    Eclipse Graphical Editing Framework

    Version: 3.3.2.v20080129
    Build id: 20080221-1602

    Eclipse startup command=-os
    win32
    -ws
    win32
    -arch
    x86
    -showsplash
    -launcher
    C:\Program Files\MyEclipse-6.0M1\eclipse\eclipse.exe
    -name
    Eclipse
    –launcher.library
    C:\Program Files\MyEclipse-6.0M1\eclipse\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.0.v20070523\eclipse_1017a.dll
    -startup
    C:\Program Files\MyEclipse-6.0M1\eclipse\plugins\org.eclipse.equinox.launcher_1.0.0.v20070606.jar
    -exitdata
    b24_7c
    -vm
    C:\Program Files\MyEclipse-6.0M1\jre\bin\javaw.exe

    #288977

    Loyal Water
    Member

    Are you using any maven plugins along with MyEclipse ?

    #288982

    muddu_shafi
    Member

    Yes I am using the Myeclipse 6.5 version which has Maven4Myeclipse.
    I dont think that might be the problem.
    Well the error states I am running my code in JDk version 1.3 while I am pointing to jdk1.5 using windows->preferences->installed JRE’s to jdk1.5 instead of the default JRE which comes with Myeclipse.

    #289008

    muddu_shafi
    Member

    Well the problem with the jdk is that, Maven by default uses jdk1.3 version, You have to include a plugin, so that Maven tries to compile the java code using a different version of compiler like here I am using jdk1.5.

    Hope this would help somebody facing the same problem….

    <build>
    […]
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
    <source>1.5</source>
    <target>1.5</target>
    </configuration>
    </plugin>
    </plugins>
    […]
    </build>

    #289023

    Loyal Water
    Member

    Thanks for posting this information.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Eclipse error running cod in jdk1.6

You must be logged in to post in the forum log in