Jump to content

Jni


armjan

Recommended Posts

What? :eek:

 

You've got C and want to mess it up with JNI and Fortran?

 

Why are you even bothering with JNI in between the two? Why not just pass the data directly from C to Fortran? In other words, just call the fortran functions from C.

 

Edit: Out of curiosity, I just did a quick search on google ...

C-Fortran interface.

Passing params from Java to Fortran

Edited by Sip
Link to comment
Share on other sites

What? :eek:

 

You've got C and want to mess it up with JNI and Fortran? 

 

Why are you even bothering with JNI in between the two? Why not just pass the data directly from C to Fortran?  In other words, just call the fortran functions from C.

 

Edit: Out of curiosity, I just did a quick search on google ...

C-Fortran interface.

Passing params from Java to Fortran

style_images/master/snapback.png

 

i've got fortran, and wanted to add a graphical user interface for I/O.

i can't go from fortran->java, so i have to make a quick stop at c,

fortran->c->java. c is the intermediary step needed to translate fortran types to java(JNI).

I wish i had the code in c, but statistical packages are often done in fortran.

 

thnx for links...

 

u wouldn't happen to know how to create shared libraries(.dll or .so) for ibm pc and powerpc respectively.

Edited by armjan
Link to comment
Share on other sites

u wouldn't happen to know how to create shared libraries(.dll or .so) for ibm pc and powerpc respectively.

style_images/master/snapback.png

 

PC and PowerPC run different native code ... so a compiled "DLL" cannot be shared unless there is some sort of virtual machine running on the MAC (same thing the other way around).

 

If you compile something for a PC (aka a DLL), it's for the PC. If you compile for the PowerPC, then it's for the powerPC. The two have very different architectures (risc/cisc) and are definitely running VERY different operating systems.

 

You can probably compile your code for either one separately if you use mostly standard C/fortran routines. But I am not aware of a "shared" DLL.

 

Actually, that's where the entire concept of Java comes from. You write something in JAVA, and then can run it anywhere there is a JVM (java virtual machine) ... whether it's a PC, MAC, or anything else.

Link to comment
Share on other sites

PC and PowerPC run different native code ... so a compiled "DLL" cannot be shared unless there is some sort of virtual machine running on the MAC (same thing the other way around).

 

If you compile something for a PC (aka a DLL), it's for the PC. If you compile for the PowerPC, then it's for the powerPC. The two have very different architectures (risc/cisc) and are definitely running VERY different operating systems.

 

You can probably compile your code for either one separately if you use mostly standard C/fortran routines. But I am not aware of a "shared" DLL.

 

Actually, that's where the entire concept of Java comes from. You write something in JAVA, and then can run it anywhere there is a JVM (java virtual machine) ... whether it's a PC, MAC, or anything else.

style_images/master/snapback.png

yes, i am hoping (.so) will take care of powerpc. it's a shared library in the sense that it integrates headers (.h) with fortran (.f). i just need to look further for compilation instructions...

i am planning to have an installation package that will determine which binaries to install at host.

thnx

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...