UPDATE: Don't worry. User Error. Would delete the question but cant with answers.
I am trying to use eclipse to create a jar of packages, not a runnable jar, which I can import into another project.
So far I have done this:
The resultant .jar file has only one directory META-INF
, and three files .project
, .classpath
, and MyClass.class
.
If I try to import pkg.nme.with.dots.MyClass;
I get a package not found error, despite adding the full path of the jar to my CLASSPATH.
I tried adding the jar as an external lib in eclipse but it is still not recognised.
Obviously I have exported it into a format that can't be import
ed. How do I export it correctly?
@trideceth12 I just tested exporting a sample package in my eclipse. and my folder structure works fine. not sure why yours is not working properly. you should check all your export settings. here's what mine looks like, and it exports fine.
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