Why can I not add .jar to eclipse git repo?

I am using Eclipse Kepler for Java. Normally you can add internal/external .jars to a Java project in the build path located in the properties. Why, when I clone a git repo and import it into my projects, do I lose that ability? I don’t understand. I kinda need to do that.

  • Gitblit certificate import
  • Something missed in maven packaging? (with Guice)
  • How to Specify subfolder for Maven in Jenkins?
  • How to find who last changed a file with JGit
  • Android Library Projects on Windows and Mac
  • Issues with Eclipse using packages
  • How do I create a github release on every commit?
  • Android Studio: Github commit warning - Access can be package-private
  • 2 Solutions collect form web for “Why can I not add .jar to eclipse git repo?”

    This is probably because the .gitignore has been configured to ignore .jar

    Open the .gitignore file and remove the line *.jar, you should be able to add it.

    ======

    As an aside – usually, for Java projects .jar files are not committed to repository (as they are large & it can slow down repository cloning), instead maven or gradle is used to configure dependencies. Example – http://www.mkyong.com/maven/how-to-create-a-java-project-with-maven/

    Then when you want to work with eclipse just run mvn eclipse:eclipse to generate the necessary files. .gitgnore is usually set up to ignore *.class, *.jar, .project, .settings, .classpath

    I found that if you open the run configurations and go to the Classpath tab that you can add internal/external .jars. The run configuration can be accessed by clicking Run > Run configurations. I added my .jar to the user entries. The bootstrap entry caused a null pointer.

    Git Baby is a git and github fan, let's start git clone.