Calling Fortran code with Photran?

H

Hawkan

Hey

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?

Regards.
 
J

Jeff Higgins

Hey

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?

Regards.

It seems like a search on the string "call Fortran subroutines from a
Java program" should produce some usable results.
 
A

Arne Vajhøj

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top