Z
zyng
Our java program(running on linux) needs calling a C program installed on our linux machine. It works fine!
The thing I don't understand is when we deliver our product(the Java program) to our clients, who are using the same version Red Hat linux machines asus, but don't have that C program installed(it's very painful to install that C program for us due to the fact that the Red Hat version was old and the dependency library files are either out-of-dated or just not there. It took us a great amount of effort to install that C program. So we cannot assume or require our clients to install that program)
I sort of know that no need to ask the clients to install the C program on their linux machine. We can wrap all the needed *.o library files in the delivered JAR files and in our Java code, use this code:
System.load("the_c_program")
and set environment variable "LD_LIBRARY_PATH" to point to the location of those *.o files within the JAR file
But I just feel unclear about this procedure. If you know this and willing to explain to me all this is doing, I will greatly appreciate it.
This C program has its library files and its library files needs other library files on the system. So, which library files needs to be selected and packed inside our JAR is unclear for me right now.
Thank you very much.
The thing I don't understand is when we deliver our product(the Java program) to our clients, who are using the same version Red Hat linux machines asus, but don't have that C program installed(it's very painful to install that C program for us due to the fact that the Red Hat version was old and the dependency library files are either out-of-dated or just not there. It took us a great amount of effort to install that C program. So we cannot assume or require our clients to install that program)
I sort of know that no need to ask the clients to install the C program on their linux machine. We can wrap all the needed *.o library files in the delivered JAR files and in our Java code, use this code:
System.load("the_c_program")
and set environment variable "LD_LIBRARY_PATH" to point to the location of those *.o files within the JAR file
But I just feel unclear about this procedure. If you know this and willing to explain to me all this is doing, I will greatly appreciate it.
This C program has its library files and its library files needs other library files on the system. So, which library files needs to be selected and packed inside our JAR is unclear for me right now.
Thank you very much.