Results 1 to 2 of 2
  1. #1
    new_2_java is offline Member
    Join Date
    Feb 2008
    Posts
    60
    Rep Power
    0

    Default The type Class is not generic; it cannot be parameterized with arguments <T>

    Hi all,

    I have set up a project in Eclipse 3.1 and am using java 5.0 compiler.

    Here's my folder structure in Eclipse


    Java Code:
    DFS\RemoteClient\TestClient.java
    DFS is the project in Eclipse


    and this is how it looks my java class

    Java Code:
    package RemoteClient;
    
    import java.util.*;
    // other imports
    public class TestClient {
        public static void main(String [] args) throws ServiceInvocationException {
            // business logic here ....
        }
    }
    So, basically, my java class is just a simple class with a main function.

    Now when I build my project, using Project->Clean...

    Then I get this as an error at the very first line where i specify the package

    This is the error:

    Java Code:
    The type Class is not generic; it cannot be parameterized with arguments <T>
    Can someone please comment on this, as what's this error and why am I getting this.

    Thanks.

  2. #2
    hardwired's Avatar
    hardwired is offline Senior Member
    Join Date
    Jul 2007
    Posts
    1,576
    Rep Power
    8

    Default

    The type Class is not generic; it cannot be parameterized with arguments <T>
    It may be that your ide is using a version of java (earlier than j2se 1.5 in which generics was added to the language) which does not support generics. You can try removing the generic type parameters.

Similar Threads

  1. A generic interface example
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-17-2008, 07:42 PM
  2. A simple generic class
    By Java Tip in forum java.lang
    Replies: 0
    Last Post: 04-17-2008, 07:41 PM
  3. Will struts work for parameterized message in internationlization
    By felixtfelix in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 04-04-2008, 01:32 PM
  4. Generic Hashtables
    By ShoeNinja in forum New To Java
    Replies: 0
    Last Post: 12-04-2007, 10:43 PM
  5. Creating object of Type Object class
    By venkatv in forum New To Java
    Replies: 3
    Last Post: 07-17-2007, 03:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •