Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5085132

cross-compilation capability for `javac -h`

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 6
    • tools
    • Fix Understood
    • generic
    • generic

      javah generates the i64 suffix on Windows platforms and the LL suffix for
      non-Windows platforms, which seems like a deliberate design choice (see
      bugs 4239819, 4451616).

      Unfortunately, it is at the same time also limiting -- at least to us -- in
      that it complicates cross-platform product development. We would therefore
      like to propose changes to javah that will enable it to generate code for
      any platform, independent of the platform that javah is being executed on;
      hence cross-compilation capability basically. The target of the generated
      code would be controlled by appropriate command-line options.

      Please note that the current C standard (C99) actually specifies LL for
      64-bit constants. In trying to develop cross-platform products, one would
      think the various Java tools would at least conform to the standard. In
      this light it would seem a bit presumptious to use the i64 suffix instead
      of the LL suffix as the default for the Windows platform, though perhaps an
      exception could/should be made in this case?

      --

      It came as a surprise to us when we recently discovered that tools.jar and
      rt.jar come in multiple flavors. We had assumed that all classes would be
      included, regardless of the platform. I don't think this aspect of jar
      contents is well documented, and it does have an impact on cross-platform
      development, since we cannot guarantee that Java compilations will have the
      same class suite available on all platforms.

      --

      Please provide cross-compilation capability for javah, as well as for any
      other relevant code generating Java tools.

            Unassigned Unassigned
            clucasius Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: