Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Call c Program With Java?

I have a project in Java, but would like to use FFTW ( a C implementation of the fast fourier transform). (Download page here: http://www.fftw.org/download.html) Its been years since I messed with C or C++. The download page contains a section for calling FFTW from other languages, including java.

The download for calling FFTW from java contains some java source files, as well as a .h and a .c that corresponds to each of the class files in java (or the other way around).

The download of the actual FFTW library, contains a .dll, a .def, and a .h file (and a .f, no idea what that is).

I am using MyEclipse as my ide (just installed the c/c++ capabilities for eclipse), on a 32 bit windows vista machine.

I've never done anything with jni or any of that. I tried googling how to get all this to work together, but haven't quite figured it out yet. How do I get all of this to work together so I can call it from java, and how should I structure my source files with all the c stuff in it?

2 Answers

Relevance
  • 1 decade ago
    Favorite Answer

    If you had NetBeans, I could help. Maybe MyEclipse (why not Eclipse? BTW) is like NetBeans. You start a Project and to that Project you add a Library and/or .jar and/or folder.

    I used your link. Downloaded the first java Wrappers from Jeff (MIT, BTW), jfftw-1.2.zip. I would unzip a copy of that and start reading the html docs.

    Then, add the .zip to the Project. Inside the jar is the API docs -- the method and their parameters, NetBeans can use the zipped file structure and provide code hinting from those docs.

    If you get stuck. I know of two other pure java implementations, but what you are doing will be better. What the zipped download from Jeff looks like is an applet, not sure, didn't dig deep enough.

  • ?
    Lv 4
    5 years ago

    you're on the outstanding computer screen. yet be certain you adjust to the question "All fees would desire to be standard as integer values (int)" which you will would desire to alter your "flow price1Final" to int. Print out your assertion to the consumer soliciting for an enter, you ought to use ".NextInt();" for the reason that the question states the inputs are ints. shop each and every quickly to this is variable. Ie. Please enter final1; int final1 = userInput.GetInt(); when you have all inputs which you would be waiting to then calculate the midpoint. which you would be waiting to declare double midpoint; on the top with something of your variables inspite of the incontrovertible fact which you won't be able to do the equation till as quickly as you have all the consumer inputs so circulate your equation down. finally you basically would desire to print out the fee of double midpoint;

Still have questions? Get your answers by asking now.