Package to jar in eclipse
eclipse, jar, java, package
Solution
@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.
Problem
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: - Create a new project - Create a package in that project (pkg.nme.with.dots) - Create a class in that package - Export -> Java -> Jar 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?