Installation of Eclipse and unit testing with VS

Source: Internet
Author: User

Eclipse is an open-source, Java-based, extensible development platform. I chose to install this software because I had already installed vs on my computer and recently programmed to use Eclipse.

First of all, you need to have this software. I was copied from the classmate of the compressed package, of course, you can also go to the official website to download, and to be placed on their own after the path found.

Then we need to download an essential thing to install eclipse, which is the JDK. We can download it from the official website (www.oracle.com). Find the interface, according to the actual situation of your computer to download. (The Green Line in the figure identifies the specific path to download the JDK)

Remember to keep it where you can find it when you download it well.

Now, we're going to unzip the previous eclipse.

You will see such a bunch of files after the decompression.

Open the Eclipse.exe file and you may see the prompt shown.

Now, the JDK we just downloaded comes in handy. Opening the JDK, this interface will appear:

Then, we want to choose the features we need.

Finally, we have to put this in our own clear place. (Be sure to remember this when you change the path, because it will be used later)

In this way, we have completed the installation of the JDK.

Now, the most important step in the entire installation process is to configure the environment. Let's take the Win7 system as an example to configure this environment.

First, open My Computer-right-click Properties and the following interface will appear.

Click the last advanced system setting in the left column.

Select the lower environment variable and find the path variable in the system variable.

Edit the path variable, write \ bin after the original value, then write a ";" and finally add the path that you changed after you just installed it.

Then we need to open the command prompt in start.

Enter "JAVA".

Shows how the configuration is completed.

Finally, we go to the folder where we first unzipped the Eclipse Tarball and open the Eclipse.exe to start running.

In the top left corner, click "File-New-java project"

Fill in the project name and place it where you want it.

For the project name "right button-new-Package", there will be a dialog box.

Fill in the name of the package and note the letter at the beginning.

Then, for the new package, right-new-class.

Fill in the Class name and select public static void Main (string[] args if you want to include the main function).

The following interface appears:

Let's Run "HELLO World" and try it out.

The following console shows "HELLO World", which indicates that it can be run.

Here, the Eclipse software is installed.

Because I'm not familiar with the language of Java, I chose to do unit testing on vs.

I am writing the maximum subarray and the algorithm, the specific code in Https://coding.net/u/A_RACHEL/p/maxarray1/git/blob/master/Maxarray

After the code is written, we begin to do unit testing.

First click on Tools-expand and Update, find Unit Test generator and download.

Then click Test--Window--Test explorer, and a window will appear on the left.

Click File--add--New project,:

The dialog box appears:

Select the native Unit test project.

Then, follow the right path to find the unit Test1.

Enter the code to be tested where you are prompted to enter the code.

Right-click the project name you just created (UNITTEST2)--add--reference.

The following dialog box appears:

Select Add New Reference.

Tick the items you need.

Finally, click Test Explorer--run all, and you'll see the results.

Installation of Eclipse and unit testing with VS

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.