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

Re: ITP enhydra



> > It's interesting that you if can run a Java "binary" you'll also be able
> > to build the sources very easily. This is because Java is always linked at
> > run time, so the build-time and run-time dependencies are the same.
> 
> This is clearly wrong:
> 
> - your compiler may fail with some Java constructs (a common problem with gcj),
> - your compiler may do checks "just in case" for classes you will not use.
> 
> Also, most Java programs come without any sort of Makefile (or Ant file or 
> anything like that). The upstream author says it's because "you don't need to" 
> recompile (which shows their contempt for free software). Finding the 
> dependencies, in order to write a Makefile (or debian/rules), while always 
> possible, is not obvious and is a problem with several Java programs.

You're right, of course you need makefiles and a compiler similar to the
one used by the original author. But most java compilers are similar
(jikes, javac, kjc) and gcj is probably not 'complete'.

I was just trying to make the point that you can't statically link a Java
program and then distribute it (at least in .class format). Which means
that if you can run the program, you have all the libraries available to
compile it. (But not necessarily a working compiler, or the correct build
scripts / tools, as you pointed out).

I can see the case arising where the compiler looks for a class that you
don't actually use, but then strictly speaking it is not a dependency,
only a token dependency.

John Leuner




Reply to: