From: <ron...@ia...> - 2007-08-09 08:12:38
|
Hello Tiago, Tiago Lopes wrote: > I'm having difficulties do understand how do someone uses the wrapper on a java project. > Using the jTSS_0.1 I've found that some methods like " > context.registerKey()" are NOT implemented on jTSS_0.1, but they are on the wrapper_0.3. Yes, that's right. We are currently working on implementing persistent storage for jTSS. > So now I'm trying to work with this wrapper... I've compiled it and now I don't have a clue how to add this to my java project. Ok, if you can compile it you should have all required libraries etc. on your system. Of course, you need to have the TPM driver and TrouSerS up and running before you try any access! The best way to start is to try makefile run_tests with the newly built Wrapper. At this target in the makefile you can see which environment is needed to use the classes. Once this runs from the shell, you should configure your IDE. > I'm supposed to add the "iaik_jtss_tsp.jar" on the ext_libs folder, and the "iaik_jtss_wrapper.jar" on output/jar folder to my project? You will have to add the two created jars (as external jars) to your project to compile. iaik_jtss_wrapper.jar iaik_jtss_wrapper_swig.jar adding JUnit 3 might be useful, but is no requirement. To run your application, you need to add these jars to your classpath. Furthermore you have to extend the LD_LIBRARY_PATH environment variable path, to include outpub/lib with the libtspiwrapper.so In Eclipse you can do this by selecting the class that contains your main(), and then Run as.. > I have to make any alterations to my java code? Yes. You have to use class TcTssJniFactory (for wrapper) instead of TcTssLocalCallFactory (for jTSS) to instantiate your first factory. Regards, Ronald -- Ronald Toegl IAIK, TU Graz |