Link to home
Start Free TrialLog in
Avatar of Jim Singelis
Jim Singelis

asked on

Java equivalent of DLL

We have a DLL that performs some proprietary calculations on data passed to it.  A new client wants the same calculations, but in Java.  I think I can manage to write the code (read comma delimited file, make calcs for each row, output results to a file).   Do I just compile it as a class?  If I want to test it how do I access it's methods and properties from another class that incudes Main().

Also, is it possible/difficult for the client to decompile the class and get to our proprietary calculations.
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

You could compile to class and then export/seal classes inside a JAR file which is a Java ARchive (Library).

You could then from client code, instantiate your proprietary class and execute methods that way like:

MyType myType = new MyType();
myType.calc(param);

Hope that helps.
ASKER CERTIFIED SOLUTION
Avatar of Kevin Cross
Kevin Cross
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial