score:36
You don't have to create any library, if you use the same workspace.
Option 1: Just use the source
In the properties of the project which has the dependencies you can add another source-folder:
Properties > Java Build Path > Tab: Source > Add Folder...
In the Project Tab you can "add" the whole project to the other project, too. There are many ways to achieve your goal.
Option 2: Create and add the library to the Build-Path
Adding an existing Jar (your own library):
If it is in the workspace:
Properties > Java Build Path > Tab: Libraries > Add JARs...
If it is somewhere on the drive:
Properties > Java Build Path > Tab: Libraries > Add External JARs...
Exporting a source folder as a library:
Context Menu of Source Folder > Export > Jar File
There are two types: Executable Jars and "normal" Jars. You don't need an executable Jar.
score:7
A Java library is basically a set of JAR files. So what you can do is generate a JAR based on your source code and add it as a external JAR to the Java build path of your Android and non-Android projects.
Source: stackoverflow.com
Related Query
- How do I make a Java library with Eclipse?
- How to make Eclipse compile with Java 1.5 in Mac OS X Leopard (10.5)?
- How to make eclipse treat a file with no extension like a java file?
- How to Export Java Project in Eclipse with Image Library as a jar file
- How to make Eclipse RUN patched JRE modules on JDK9+ with the —patch-module java option
- How do I make the Eclipse AST parser work with Java 9?
- How to configure Prometheus Client Library for Java in Eclipse project with Maven
- How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9
- How to add native library to "java.library.path" with Eclipse launch (instead of overriding it)
- How to run Eclipse with different Java version?
- How to create the pom.xml for a Java project with Eclipse
- How to configure opencv in Eclipse for Java developers with plugin CDT?
- How can I download Java Servlet documentation and attach with eclipse
- How can I prevent Eclipse from stepping into Java library code
- How to make Eclipse break String literal with + operator in next line?
- How to make code completion for Java 8 lambda parameters in Eclipse work?
- How do you make Eclipse recognize Java EE jar files so Servlets can compile?
- How can I use Java 7 with Eclipse Indigo 3.7.1
- How to run JSR269 annotaion processor in Eclipse Kepler with Java 7 & Maven
- How to use Robot Framework with Java using Eclipse as IDE
- How to make Eclipse with PDT work with registered Joomla namespace aliases?
- How do I use Glass fish server with eclipse luna for Java EE?
- How to deal with 'Incompatible Java Versions running 0' in Eclipse Window Builder?
- How can we make SonarLint startup faster in Eclipse with lots of projects?
- How to integrate Eclipse Portable with Java Portable?
- How to import class into existing Java project, with Eclipse
- Eclipse Java Enum indents past the opening bracket. How to make it look more normal?
- How to make a Java project the default in Eclipse
- How can I make Eclipse work with `perlbrew`?
- How to make Eclipse pick up Java 9 options from POM?
More Query from same tag
- ADMOB: The following classes could not be instantiated: - com.google.android.gms.ads.AdView
- Show liferay input editor
- SSL keystore path in eclipse
- What does the new NDK plugins do?
- git and eclipse
- Eclipse Ganymede Code Indenting of HTML?
- ReportNG Report with TestNG is not generated using WebDriver
- Apache CXF and Magento runs in Eclipse but not on commandline
- Fixing module {a} does not "opens {package}" to module {B} in Eclipse
- Missing file in res>layout
- Google Plus Profile Picture Google Play Game Services
- No grammar constraints (DTD or XML schema) detected for the document (Android)
- Develop Android app on Android os
- Python Submodule is not getting imported
- eclipse monitoring network traffic of android
- ECLIPSE: How to export the smallest jar file
- How to pause game when user turn off screen
- spring mvc no setter found for property 'yyyx' in class 'yyyx'
- Disable Androids image-crunch in eclipse (run as) builds
- SecurityException: Unable to find field for dex.jar
- Use Ant to build junit test with initializationError: java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
- Eclipse edit java files and run under original folder
- searching for MethodInvocation through eclipse AST
- Undefined reference to Boost Thread
- Eclipse Decorators update very slow (3.7.1)
- Supporting toggle between new file-types in eclipse or eclipse CDT
- How do I change the working directory for an Eclipse run configuration?
- configure.h file and assembbler error in FFT from FFMPEG
- Maven test - java.lang.ClassNotFoundException: org.testng.AssertJUnit
- Scala Eclipse Autocomplete Broken?