Solved

Java equivalent of DLL

Posted on 2008-10-13
2
1,315 Views
Last Modified: 2013-11-23
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.
0
Comment
Question by:studioEtc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 60

Expert Comment

by:Kevin Cross
ID: 22707665
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.
0
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 500 total points
ID: 22707668
Only expose the public interface and hide all the implementation classes through class scoping.  The sealing of the JAR will prevent from inheriting any of your implementation code directly.  You can further look into code obfuscation, but think this should do the trick for what you want.

Here is some more detail on this topic from Java/Sun site: http://java.sun.com/docs/books/tutorial/deployment/jar/index.html

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
Suggested Courses

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question