I have added an external library.

But I can only use it in src.I cannot use stdlib.jar(the external library) in com.jc.Searching. How to fix it?
detailed information:

According to your answer on my comment above. Usually, you need to provide an import statement in your ST class, which belong to com.ja.Searching package. Here you can read about it.
In your case, you can't do it, because a StdOut class is probably declared in default package within your external library and it's not possible in Java to import classes from unnamed package. Only way to get this class instance, is to try to use reflection, but obviously, that's not the way you need and even have to do.
It seems to me, you are using some lib, which doesn't provide any packages and all it's classes belong to the default one, that is why you don't need to make an import in your class within default package. It's not a good practice at all, but sometimes used in some tutorials to make a code snippets be more readable.
Classes in the default package can't be imported. So they can effectively be only used by classes in the default package as well.
It's a really, really bad practice to put classes in the default package, especially for a reusable library. Ask the author of the library to fix it, and use a proper package name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With