0

I'm currently programming a java programm in eclipse and have a java class file that can read Strings. The file is not a system file and I'm looking for a solution to import that file without copying it into the project directory. Is there a posibility to do that in Java or in eclipse?

Leon
  • 9
  • 1
  • Does this answer your question? [Can we call another project java class from our project in eclipse](https://stackoverflow.com/questions/21255265/can-we-call-another-project-java-class-from-our-project-in-eclipse) – Robert P Jan 28 '20 at 21:23

1 Answers1

2

You can make that class a dependency using something like Maven: https://maven.apache.org/

OR

You can make a Jar from that class and add it to the classpath manually

rhowell
  • 1,165
  • 8
  • 21
  • 1
    Thank you very much! I will try it! – Leon Jan 17 '20 at 20:53
  • 1
    This post answers your question in more detail, good luck! https://stackoverflow.com/questions/21255265/can-we-call-another-project-java-class-from-our-project-in-eclipse – rhowell Jan 17 '20 at 20:54