test for javac

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
when configuring classpath with --with-ecj=something there is still a
test being run to check whether 'javac' exists and whether it is Java5
compatible.

I think the correct behavior would be:
  a) test whether the supplied command (may ecj or whathever) is available
  b) test whether this executable can compile Java5 code

There should be no test for other compilers if I explicitly provide one.

Additionally the current test for Java5 compatibility is IMHO wrong. To
compile Java5 code one needs a suitable compiler and class library. If a
Java5-capable compiler is running on a pre-Java5 class library (e.g. ecj
on gcj 4.2.1) the current test fails.

A better test would IMHO be to compile the following source:

package java.lang;

public class Object
{
  static <T> void foo()
  {
  }
}

with

<javac-to-be-tested> -source 1.5 -bootclasspath . -d . java/lang/Object.java

and check the results.

File some bugs?

Regards
Robert

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux