Java with Fortran - possible with GCJ ?

Andrew Haley aph@cambridge.redhat.com
Wed Apr 3 11:13:00 GMT 2002


James Adams writes:
 > I will soon begin work on converting pieces of an
 > atmospheric chemistry model, which is implemented in
 > Fortran, to an object-oriented design/implementation. 
 > The plan at this point is to use C++ for the OO
 > converted parts of the program since C++ classes can
 > be compiled into native object files and linked in
 > with the Fortran program. However I am more familiar
 > with Java and would like to use Java as the
 > implementation language.
 > 
 > >From the brief description of GCJ that I've read it
 > looks like it may be a good alternative for me if I
 > want to use Java for the OO parts. I hope so.
The most immediate problem that springs to mind is that we do have an
interface between Java and C++ but we don't have an interface between
Java and Fortran. However, given that GNU Fortran will link to GNU
C++ that shouldn't be a problem, and you can make calls between the
languages.
I hope not, but it might be necessary to use C++ wrappers between the
Java part and the Fortran part.
 > Has anyone done this sort of thing before, and if so
 > can you give some high-level pointers to someone who
 > is quite new to this sort of development ? [My recent
 > experience has been solely with Java/JSP/JDBC and it
 > has been many years since I've had to deal with make
 > files, linking object files, etc. and I know no
 > Fortran.]
Gosh. No Fortran at all? You have a challenge ahead of you.
 > Is GCJ somewhat mature by now, i.e. are most of the
 > major kinks worked out by now to make it comparable to
 > the average C++ compiler in terms of ease of use,
 > performance of codes, etc. ?
Mostly. The performance isn't quite as good, but to some extent
that's inherent to the Java language design.
 > Are there any IDE's which can use GCE, or perhaps a
 > better question, how would I integrate GCE with an IDE
 > such as Visual Age, XEmacs/JDE or Rational's XDE ?
I don't think that this has been done. My IDE is EMACS.
 > I will really appreciate any feedback.
I can't think of any insurmountable problems in what you are intending
to do, but I think you'll need to become familiar with GNU Fortran and
gcj to make this work. This will take time. However, we will help
you if we can.
This sounds interesting. Good luck.
Andrew.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /