You do not need to import anything.
Jar files are not imported; they are added to the classpath.
In the screenshot that you posted, we see that the myJar.jar file myJar.jar included in your path to the eclipse path, so thereโs nothing more to do.
Classes are imported if they are in another package.
Your Examplew class is in the default package. BMIcalculator also in the default package. Since they are the same package, it does not need to be imported.
You should be able to simply reference the BMIcalculator within Examplew . Just give it a try.
Try compiling this code - it should work:
public class Examplew { private BMIcalculator calc = new BMIcalculator(); }
You may receive warnings about an unused private field, but this time you can ignore it.
If this does not work for you, send an error message because it does not seem to be a problem with your import (or your class)
source share