How to let Eclipse import two identical projects at the same time? Eclipse imports two projects

Source: Internet
Author: User

How to let Eclipse import two identical projects at the same time? Eclipse imports two projects

Recently, I thought about importing two identical projects in Eclipse at the same time. If I find that the project name cannot be imported after the change, I will prompt that Eclipse has already imported the project, after discussion with colleagues, jiadu Niang Google, finally OK, haha, actually very simple, there is a project. open the project file with the editing tool,


Do you see <name> testAndroid </name>? Change the name and then import the package. Haha, isn't it easy!


How to run two java

Create a project in eclipse, place the two java files under a folder, and drag them to the eclipse project.

Set one of the classes as the primary class. For example, the main function is written in SocketServer. java, and then instantiate the SocketClient class in the main function, you can call the methods in the two classes, that is, run multiple java classes at the same time.

According to your situation, I think you two programs can be set to two threads.
Public class SocketServer
{
Static Thread s = new Thread (new Runnable (){
Public void run (){
// The method for putting the server here
}
});
Public static void main (String [] args ){
SocketServer. s. start ();
SocketClient. c. start ();
}
}
Public class SocketClient
{
Static Thread c = new Thread (new Runnable (){
Public void run (){
// Put the Client method here
}
});
}

How to import existing files to eclipse

There are currently three ways to add existing files to a project: the first is to Import files to the project using the Import function in the File menu of IDE, just like in IVJ. This is also recommended. The second is to drag files from the Windows Resource Manager to the project. The third is to directly copy the file to the project folder, select a project or folder in the Eclipse resource browsing window, and execute the Refresh from locate function ). It should be noted that the project folder can be placed anywhere on the computer, and the project path can be specified to an existing project folder by creating a project in Eclipse, then refresh in Eclipse. Note that any project folder can be created or specified only in Eclipse, even if you create a folder under the workspace path of the default storage project folder, you cannot change it into a project in the Eclipse environment. That is to say, this folder is invisible to Eclipse.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.