JAR files can be created using the following method, which I said
Example:
step1: Create one project and name it as Project1
step2: Create another project and name it as Project2
step3: Creating packages for two projects
step4: Creating classes for projects
step5: Right-click on Project1, go to the export, in which select Java, to go to the jar files select Project1, then click ok and ok.
step6: Right-click Project2, create one folder in which you copy the jar file that we created for project1.
step7: Right-click on project2, go to properties, select buildpath, then click on libraries, then click ok, then ok.
step 8: then enter the import package in Project2
Your jar file is ready.
source share