Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #26429

Re: Calling Fortran code with Photran?

Date 2013-10-25 18:01 -0400
From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: Calling Fortran code with Photran?
References <e5e3b431f2a98a379d59e30f5694c10b$1@homeunix.nl>
Message-ID <526aea41$0$305$14726298@news.sunsite.dk> (permalink)
Organization SunSITE.dk - Supporting Open source

Show all headers | View raw


On 10/25/2013 2:26 PM, Hawkan wrote:
> We have some old Fortran code that we would like to be able to use from
> a Java application. Have downloaded Photran and I am now looking for how
> to call Fortran subroutines from a Java program, but their documentation
> doesn't mention that and I have not been able to find the answer
> elsewhere on the Web. Anyone have any experience or a reference to a
> good source of info?

JNI does not support Fortran only C and C++.

So what you need to do is:

your Java code->Java class with native methods->C or C++ wrapper 
following JNI convention->your Fortran code

Calling C/C++ from Java via JNI is well documented.

Calling Fortran from C/C++ is usually also well documented.

Arne

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Calling Fortran code with Photran? hakan@lingu.no (Hawkan) - 2013-10-25 18:26 +0000
  Re: Calling Fortran code with Photran? Jeff Higgins <jeff@invalid.invalid> - 2013-10-25 15:08 -0400
  Re: Calling Fortran code with Photran? Arne Vajhøj <arne@vajhoej.dk> - 2013-10-25 18:01 -0400

csiph-web