Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Trying to set up a JUnit project, following the documentation
Trying to set up a JUnit project, following the documentation [message #1831718] Thu, 27 August 2020 12:38
Kristian Fougner is currently offline Kristian FougnerFriend
Messages: 1
Registered: August 2020
Junior Member

TL;DR: I'm having trouble setting up Eclipse as described in the documentation:

Would be nice with some help, so that I can continue the tutorial.

I'm on a Mac, reading the "Java development user guide" in the Eclipse Documentation, and having trouble with the section "Creating your first Java project":

I am failing (for several reasons) at importing the Junit source code, and I have a few questions/issues:

1) The docs says early on that you should "Click here to download the Junit source code", and that that file is supposed to be a .jar-file. How ever, what I get is a folder containing all the source code. This makes it impossible for me to choose that folder later on when we're trying to import the content into the src-folder of the project.

I guess I'm asking if I have missed something here? Or is the tutorial actually "not working" if you just (as I am) follow the steps exactly? And if this is the case - can I (kindly) "report" this somewhere?

2) Next, I thought "Ok, I need the folder in a .jar-format if this is going to work", so i downloaded the file junit-4.10.jar from SourceForge and tried to use that instead. I then followed steps 3-8 and then...
The packages are put in the src-folder, but they are all empty. If I open junit.framework in Finder, the .class-files are there, but in Eclipse I see nothing. Why is this?

3) Also, in step 2 you're supposed to "select "J2SE-1.4" in the Use an execution environment JRE field.", but on my machine the option is automatically sat to JavaSE-13. Does this matter?

4) After doing some research I figured out that Eclipse actually comes with Junit pre installed (?) and that during the Create Java Project-wizard you can just "Add library" and choose Junit. I tried this as well, but still ended up without any Junit-classes in the project's src-folder.
I maybe think this has something to do with the fact that when I'm adding the Junit-library, it says "Source location: Not found". Is this the case?

This is my first question (or in fact several...) on the forum. I apologize in advance for my English and for the short commings of my post. I am greatful for all kinds of help and constructive criticism.
Previous Topic:Eclipse freezes when trying to complete search results
Next Topic:Migrate or Port Netbeans Platform Application to Eclipse
Goto Forum:

Current Time: Mon Jan 25 02:21:37 GMT 2021

Powered by FUDForum. Page generated in 0.02877 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top