facebook

Mixed java 1.4 and java 1.5 source

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

    Hello,

    I am looking for a way to tell MyEclipse to compile some of my source in java 1.4 and some in java 1.5.

    We are writing code in java 1.5 but we include generated code in 1.4. I can compile everything in 1.5, it works perfectly, but I am annoyed by the numerous warnings about not using generic types and other things.

    I have been looking in the obvious places (Java Build Path > Source, Java Compiler, or Properties in the Package Explorer where the text encoding can be given), but I didn’t find any option to set the java version. Is there a way to do what I want? I know I can filter the error messages, but it is cumbersome and linked to the IDE, not the project.

    Any help is appreciated.
    Florian Fischer

    #294211 Reply

    Loyal Water
    Member

    Florian,
    You want to compile a part of the source code of your project using Java 1.4 and the rest of the project using 1.5 ?

    I’m sorry thats new possible. You need to choose either 1.4 or 1.5.

    #294242 Reply

    Yes. And I suspected it would not be possible. I just hoped for an obscure setting somewhere.

    #294289 Reply

    Loyal Water
    Member

    I just hoped for an obscure setting somewhere.

    I’m afraid there is no setting that can help you achieve this.

    #294304 Reply

    Ton Huisman
    Member

    You could create separate projects and directories, and connect both using project dependencies. If you use the same package names, that should be just fine.
    Project specific settings should then supply you the option of Java 1.4 for the generated stuff, and Java 5.0 for the normal production code.

    HTH
    Ton

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Mixed java 1.4 and java 1.5 source

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