Home AMX User Forum Duet/Cafe Duet
Options

Generics

Has anyone had a play with any of the available translators or compiler hacks around to let them roll code that uses generics, but still compile as something that plays nice with the VM on the AMX box's?

I've come across this article which looks promising but haven't been able to find the eclipse config file mentioned.

Comments

  • Options
    AuserAuser Posts: 506
    As mentioned in the post you linked to, change the compiler preferences for the workspace and the file will be created in <workspace root>\<project>\.settings

    Right click on the project in the Package Explorer and check the "Enable project specific settings" checkbox in the "Java compiler" options.

    Hit "Apply" and the file attached is produced.

  • Options
    PhreaKPhreaK Posts: 966
    Ah awesome. I was looking for it in the .settings folder in the eclipse install directory.
  • Options
    jjamesjjames Posts: 2,908
    So this means you can use classes that require 1.5 with Duet now?

    Sorry for the silly question - still very new to all this Java stuff! I feel like a complete noob . . . it's very humbling.
  • Options
    PhreaKPhreaK Posts: 966
    jjames wrote: »
    So this means you can use classes that require 1.5 with Duet now?
    Unfortunately not. If you're going to use this you have to be careful as it will play nice with generics as that is all handled at compile time (ie, won't let you attempt to stuff an object of a different type somewhere it's not supposed to be), but for other things it will break.

    If you've got a chunk of java 5 code you want to try and get running on the AMX box's look into retrotranslator.
Sign In or Register to comment.