Pretty basic question here. I learning programming with a Java course in school. We used DrJava as our IDE. I've been trying to get into the habit of using Eclipse instead since it seems to be much more common.
All the extra functionality is kind of overwhelming. Right now I'm not even sure how to run and compile code that's already been written. I started by creating a new project (something I never even had to think about in DrJava). The first file I started with ran just fine, but I downloaded some starter code from a course website and have no idea how to compile and run it. In DrJava I would just click the file i felt like editing over in the box to the left, hit compile, then run. Eclipse is asking me about run configurations, projects, and which main class I want. I tried copying the .java file I downloaded to the same src and bin folders I was working with before, but it won't show up as an option when I try to choose a main class to run.
I'm assuming I need to make a class file out of the one I'm trying to add but the only way I know to get a class file from a java file is through using DrJava. Since I'm trying not to be so reliant on it anymore I'm looking for another way.
Yeah, Eclipse is horrible. It's the equivalent of your government in an IDE: built by committee, does everything for everyone in 10 different ways, bloated, hard to find your way around and the documentation is incomplete, misleading and inscrutable, when it's not flat-out outdated. : ) Once you know your way around for what you want to do though, it gets the job done. And there are tons of cool plugins.
Sadly, your assessment is right when you say it's pretty common. Its main advantage is the huge community around it. So, it's a good idea to learn it. If you're a student, I recommend getting your hands on IntelliJ, it's the industry favorite. Never heard of DrJava.
Now for the matter at hand. What I do when I want to run a "quick test in Eclipse":
1. I start a Java project : File -> New -> Java Project
2. Type the name, etc.
3. Finish
3. Once the project is created, expand the project folder
4. Right-click on the src folder
5. Choose New... -> Class in the contextual menu
6. Give it a name.
7. Tick the box that says "Generate main method" or something like that.
8. Finish
9 Type your code in the main method of the class that has been generated.
10. When you're ready to run it, right-click in the editor window.
11. From the contextual menu, choose Run As... -> Java Application
12. If you have print outs (or exceptions!), they appear in the Console window below.