Reputation: 221
I have two files
In project1 have a file named test.java:
public class test {
public static void main(String[] args) {
sayHello();
}
public static void sayHello() {
System.out.println("MyTest says hello!");
}}
In project2 have a file named test2.java:
public class test2
{
public static void main(String[] args)
{
sayHello();
}
public static void sayHello() {
System.out.println("MyTest2 says hello!");
}}
Here i need to link up the class file of test(which is in project 1) to test2(which is my project2) without using maven. how do i proceed?
Upvotes: 1
Views: 48
Reputation: 2488
if you are using eclipse then right click on project2>properties>java build path>projects>
add project 1.
Upvotes: 1