EJ / JAVA / 01
Java for teens
The language behind your Eclipse projects.
Open the syllabusUnited States · High school and college · Eclipse IDE
Eclipse is the IDE many American high schools and colleges still install in their Java labs, and it is a capable one. It is also easy to get lost in: a dozen panels, red markers in three places at once, a Run button that sometimes runs the wrong class, and error messages worded differently from the textbook. This guide covers the four things students get stuck on most often. Which download to pick, how to create and run a program, how to read what the Problems view and Quick Fix are telling you, and how to sort out a Java version or memory problem that stops Eclipse from starting at all.
Live teaching since 2020 · 10,000+ students · Java in Eclipse or any editor
In short
For school Java, install Eclipse IDE for Java Developers (the 2026-09 R installer now includes a Java runtime). Create a Java Project, add a class with a main method, then use Run As, Java Application. Errors appear in the Problems view; press Ctrl+1 on a red marker for Quick Fix proposals, and accept one only if you understand why it is right. Modern Age Coders teaches this live online for US students, in a batch or one to one, and the first class is free.
Learn it with a teacher
Your student shares their Eclipse window, and the lesson starts from the project already open.

EJ / 01
Ages 13 to 18. Projects, classes and a calm approach to the Problems view.
Open the syllabus →
EJ / 02
All four units, with practice written for the exam’s Bluebook format.
Open the syllabus →
EJ / 03
Intro CS Java in Eclipse, then larger multi-class programs.
Open the syllabus →Install the right thing
The Eclipse download page offers many packages, and choosing the wrong one is the first way students lose an afternoon. Here is what the Eclipse Foundation lists for the 2026-09 release.
| Package | Size listed | What the Eclipse Foundation says it contains | For a school Java class? |
|---|---|---|---|
| Eclipse IDE for Java Developers | 360 MB | “The essential tools for any Java developer, including a Java IDE, a Git client, XML Editor, Maven and Gradle integration” | Yes: this is the one |
| Eclipse IDE for Enterprise Java and Web Developers | 585 MB | A Java IDE plus tools for JavaScript, TypeScript, JavaServer Pages and Faces, web services and more | Only if your course asks for it |
| Eclipse Installer | Varies | “The Eclipse Installer 2026‑09 R now includes a JRE for macOS, Windows and Linux.” | Yes, as the way to install the Java package |
The bundled JRE is what Eclipse itself needs to start. Your programs are compiled by Eclipse’s own Java compiler and run on a Java runtime that Eclipse knows about, listed under Installed JREs in the preferences.
Most students never need to touch this. When it does matter, usually because a class requires a particular Java version, the Java versions section below shows where to look.
Lab machines are often locked down, so a student cannot install anything. In that case, check with the teacher which Eclipse release and Java version the lab runs, and match it at home so a project behaves the same in both places.
Eclipse publishes builds for Windows, macOS and Linux, each for both x86_64 and AArch64 processors, so a recent Mac with Apple silicon has a native download of its own.
Sources: Eclipse downloads and Eclipse IDE 2026-09 R packages, read 17 October 2026. Package sizes are as listed for that release and change with later ones. We are not connected with the Eclipse Foundation.
Create and run
The Eclipse documentation walks through these steps with a sample project. Here they are in the order a student needs them for a first assignment.
Every Run As creates a launch configuration. The Eclipse help explains that it derives most settings from your project and preferences, and that you can open Run, then Run Configurations, to change them.
The tabs that matter for students are Main (which class has the main method), Arguments (values passed to main, and to the virtual machine) and JRE (which Java runs the program).
If Java Application is missing from the Run As menu, look at the class first. It needs a correctly written public static void main(String[] args) method, and the file must be saved with no errors in it.
If the program waits forever, it is probably reading input. Click into the Console view and type the value it is waiting for, then press Enter.
Sources: Eclipse JDT user guide, Creating your first Java project and Creating a Java application launch configuration, read 17 October 2026.
The Problems view
Eclipse shows a single mistake in several places at once, which is helpful once you know it and alarming until you do. The documentation lists every place it appears.
| Where | What you see | What to do with it |
|---|---|---|
| Problems view | A list of every error and warning in the project | Select one and choose Go To from its menu to jump to the line |
| Editor ruler | A marker beside the affected line | Hover to read the message |
| Under the code | A squiggly line under the word that may have caused it | Hover for the message and quick fixes |
| Package Explorer | Problem ticks on the file and the folders above it | Shows which files still need attention |
| Editor tab | A marker on the tab of the open file | A reminder when several files are open |
| Light bulb | An icon in the marker bar | Correction proposals are available: click it or press Ctrl+1 |
The Eclipse help puts it this way: left click on the light bulb or invoking Ctrl+1 (Edit, then Quick Fix) brings up the proposals for the problem at the cursor position. Each proposal shows a preview before you choose it.
Some fixes can repair every problem of the same kind in the file at once; the documentation says to press Ctrl+Enter for that. Source, then Organize Imports adds all the import lines a file needs in one go.
The documentation itself suggests a trick for professionals: write a variable that does not exist yet and let Create local variable declare it. For a student, the same proposal is a trap, because it silences an error that was usually a typo.
So we teach a simple test. Accept a proposal only when you can say, in one sentence, why it is the right change. Adding a missing import passes almost every time; creating a field or variable to make red go away almost never does.
Sources: Eclipse JDT user guide, Identifying problems in your code and Quick Fix, read 17 October 2026.
Eclipse error messages
Eclipse compiles with its own compiler, not javac, so its messages are worded differently from what a textbook or a teacher using another editor shows. We wrote a small program with three problems and compiled it with the Eclipse Compiler for Java.
// Till.java (ours): compiles in neither javac nor Eclipse
import java.util.Scanner;
public class Till {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int total;
String item = in.nextLine();
if (item.equals("pen")) {
total = 2;
}
System.out.println(total);
Thread.sleep(500);
}
}Ours. Three separate problems: a Scanner never closed, a variable that only gets a value on one path, and a method that can throw without saying so.
Eclipse Compiler for Java (ecj 3.46.100), our run: 1. WARNING in Till.java (at line 5) Resource leak: 'in' is never closed 2. ERROR in Till.java (at line 11) The local variable total may not have been initialized 3. ERROR in Till.java (at line 12) Unhandled exception type InterruptedException 3 problems (2 errors, 1 warning)
Our run, ecj 3.46.100 with resource warnings switched on (-warn:+resource), 17 October 2026, trimmed to the message lines. Eclipse shows the same messages in the Problems view.
| Eclipse says | javac says | What it means and the fix |
|---|---|---|
| The local variable total may not have been initialized | variable total might not have been initialized | Some path reaches the line without giving total a value. Give it a starting value where you declare it. |
| Unhandled exception type InterruptedException | unreported exception InterruptedException; must be caught or declared to be thrown | Thread.sleep can throw a checked exception. Add throws InterruptedException to the method, or catch it. |
| Resource leak: 'in' is never closed | (no message by default) | A warning, not an error: the program still runs. Closing the Scanner, or using try with resources, clears it. |
| Type mismatch: cannot convert from double to int | incompatible types: possible lossy conversion from double to int | A decimal result is being stored in an int. Cast deliberately with (int), or use a double variable. |
| This method must return a result of type int | missing return statement | Some path through the method ends without a return. Add one for the case your if does not cover. |
| Cannot make a static reference to the non-static field stock | non-static variable stock cannot be referenced from a static context | main is static and stock belongs to an object. Create an object first, or make the field static if that is what you mean. |
| Syntax error, insert ";" to complete BlockStatements | ';' expected | A missing semicolon at the end of the line the marker points to. |
// Till.java, repaired (ours)
import java.util.Scanner;
public class Till {
public static void main(String[] args)
throws InterruptedException {
try (Scanner in = new Scanner(System.in)) {
int total = 0;
String item = in.nextLine();
if (item.equals("pen")) {
total = 2;
}
System.out.println(total);
Thread.sleep(500);
}
}
}
typed: pen
printed: 2Ours, compiled with ecj 3.46.100 with no problems reported, then run: typing pen printed 2. Each change answers one message: a starting value, a throws clause, and try with resources to close the Scanner.
The javac column is from our javac 22.0.1 runs on the same mistakes; the missing return row came from a separate one-method file, because javac stopped at two other errors in Shop.java first. If your class uses a different editor, our guide on how to debug code covers the general method.
Java versions and memory
Three settings decide which Java you are really using in Eclipse, and they are in three different places. Mixing them up causes most of the version errors students report.
| Setting | Where it lives | What it controls |
|---|---|---|
| Installed JREs | Preferences, Java, Installed JREs | The list of Java installations Eclipse knows, and which one is the workspace default |
| Compiler compliance level | Preferences, Java, Compiler | Which Java language version your code is compiled as. The default “Depends on default JRE” |
| The -vm line | The eclipse.ini file beside the Eclipse program | Which Java runs Eclipse itself, before any project opens |
-startup plugins/org.eclipse.equinox.launcher_(version).jar -vm C:\Program Files\Java\jdk-21\bin\javaw.exe -vmargs -Xms256m -Xmx2048m
The wiki’s rules: the -vm option and its value must be on separate lines; the value must be the full path to the Java executable, not just the Java home directory; -vm goes before -vmargs, because everything after -vmargs is passed to the virtual machine. The -Xmx line raises the maximum heap, the usual answer to a java heap space error inside Eclipse.
The Eclipse wiki is blunt about one mismatch: 32-bit Eclipse will not work with a 64-bit JVM, and the reverse also fails. Download the Eclipse and the Java built for the same processor type.
Keep a copy of eclipse.ini before you edit it. A single misplaced line can stop Eclipse from launching, and the copy gets you back in seconds.
If the out-of-memory message comes from your program rather than from Eclipse, eclipse.ini is the wrong place. The program’s memory is set in its own launch configuration, on the Arguments tab, as a virtual machine argument.
In student code, though, a heap error is usually a bug, typically a loop that keeps adding to a list and never stops. Fix the loop before you add memory.
Sources: Eclipse JDT user guide, Installed JREs and Java Compiler preferences; Eclipse wiki, Eclipse.ini. All read 17 October 2026.
Eclipse in a US Java course
Plenty of AP Computer Science A and college intro classes run on Eclipse. A few facts about how the tool fits the course, and about how we help with assignments.
College Board describes AP CSA as a fully digital exam taken in its Bluebook testing app. Eclipse is for learning and practice; on exam day you write code without the Problems view, so practice reading your own code before you compile it.
A yellow marker such as the resource leak warning still lets the program run. Teachers and autograders differ on whether warnings matter, so read your course rules rather than guessing.
A project zipped from a school machine may carry the lab’s Java settings. Re-check the project’s own compliance and JRE before assuming your code is wrong.
We never write or correct graded assignments for a student, and we do not supply answer keys. When a student brings an Eclipse project to class, the teacher asks them to read the Problems view aloud and explain each message, then the student makes the change.
That way the fix belongs to the student, and so does the understanding the assignment was set to test.
Our list for students: copy the exact message from the Problems view; note the file and line; say which Java version the project uses; and say what you already tried. With those four things a teacher can usually help in minutes.
For AP CSA planning, see our AP Computer Science A classes, and if you are choosing between the two AP courses, AP CSP or AP CSA first.
Source: AP Computer Science A Exam, AP Central, read 17 October 2026. AP is a trademark of College Board, which is not connected with us.
Getting comfortable
How students usually progress from first install to using the IDE with confidence.
| Stage | What it looks like |
|---|---|
| 1. Overwhelmed | Many panels open, unsure which file is running |
| 2. Running | Creates a project and class, uses Run As, reads the Console |
| 3. Reading | Uses the Problems view and hovers to understand each message |
| 4. In control | Manages JREs and compliance, uses Quick Fix only when it is right |
Eclipse looks complicated because it is built for professionals. Struggling with it in the first weeks says nothing about your child’s ability to program.
A short session with someone who knows the tool often saves hours of frustration.
Close the panels you do not use. The editor, Package Explorer, Problems and Console are enough for school.
Save often. Eclipse checks your code on every save, which is free feedback.
The catalogue
All live, all with a regular teacher, and all available in a group or one to one.
EJ / JAVA / 01
The language behind your Eclipse projects.
Open the syllabusEJ / JAVA / 02
Every unit, plus free-response practice.
Open the syllabusEJ / JAVA / 03
A close cousin of Java, closer to the machine.
Open the syllabusEJ / TOOL / 01
The Git client Eclipse ships with, explained.
Open the syllabusEJ / TOOL / 02
Plan the program before the IDE.
Open the syllabusEJ / TOOL / 03
A different language for the browser.
Open the syllabusEJ / PRO / 01
Core Java through to Spring Boot.
Open the syllabusEJ / PRO / 02
The second-year course, live.
Open the syllabusEJ / PRO / 03
Team projects without lost work.
Open the syllabusHow lessons run
Weekdays or weekends, flexible: choose your batch, or for a very personalised plan choose 1-on-1 at your convenience, weekend mornings or weekdays.
Weekdays
Evenings that work from Eastern to Pacific time.
Weekends
A regular slot for students with busy weekdays.
1-on-1
Fitted around labs, tests and project deadlines.
Someone who knows your project history.
We work in your own workspace.
Every lesson starts from the Problems view.
No graded answers, ever.
Online, from any state.
Fifteen to twenty in a batch, or one to one.
Student work
Programs by learners who started with the same IDE questions. See more on the student labs page.

AI and ML
An AI nutrition coach that reads what you eat and works you toward a target.

AI and ML
A chatbot that answers mathematics and programming questions, built and deployed by a student.

AI and ML
An assistant that helps a young person recognise unsafe situations online.

Web app
A weather forecasting site with live conditions for any location.
Fees
Eclipse and Java are free. Our fee covers live teaching only, charged monthly and shown in US dollars; there is no term commitment, and stopping after any month costs nothing extra.
Free first class
USD 0
no card required
Group batch
USD 100
a month, billed in US dollars
One to one
USD 150
a month, billed in US dollars
What families say
Reviews left on Google by families we teach, unedited.
★★★★★
"The one step solution for my son. Modern Age Coders make learning coding so simple that kids love it. The teachers explain complex concepts clearly with practical exercises and interactive content."
Ria Mukherjee
Parent
★★★★★
"Modern Age Coders has been a game-changer for me. I struggled to grasp IT concepts and coding before joining, but their classes transformed everything. I can now confidently write complex programs with ease."
Samriddha Mondal
Student
★★★★★
"One of the most wonderful education centres out there. Education is not limited to school syllabus but focuses on skill development."
Vansh Agarwal
Student
★★★★★
"My child Dhairya is really enjoying the Modern Age Coders classes. This is his first online class and he eagerly looks forward to it. I can already see his improvement, and the teachers are very cooperative."
Sonam Oswal
Parent of Dhairya
★★★★★
"Modern Age Coders have wonderful teachers who teach in a clear, easy and practical way. The teacher boosts students' confidence and inspires them to learn without hesitation."
Sonu Goyal
Parent
★★★★★
"I highly recommend this computer coding class! The teachers are incredibly knowledgeable and passionate about coding."
Ritu Kedia
Parent
Questions from students
Eclipse IDE for Java Developers. The Eclipse Foundation describes it as the essential tools for any Java developer, including a Java IDE, a Git client, an XML editor and Maven and Gradle integration. The Enterprise package is larger and only needed if your course asks for it.
For starting Eclipse, usually not any more: the Eclipse download page says the 2026-09 R installer now includes a JRE for macOS, Windows and Linux. Your course may still ask for a particular JDK version, which you add under Installed JREs in the preferences.
Open the class that contains the main method, then choose Run, then Run As, then Java Application. The output appears in the Console view. The green Run button repeats the last launch, so use Run As again when you switch to another class.
It opens Quick Fix, the list of correction proposals for the problem under the cursor. You can also click the light bulb in the margin. Each proposal shows a preview before you accept it.
Eclipse uses its own compiler. In our tests the same mistake appeared as variable total might not have been initialized in javac and as The local variable total may not have been initialized in Eclipse. The meaning is the same; only the words differ.
It is a warning that a resource such as a Scanner was opened and never closed. Your program still runs. Closing it, or creating it in a try with resources statement, removes the warning.
Add the Java you need under Preferences, Java, Installed JREs, then set the compiler compliance level on the Java, Compiler page to match. Check the project's own properties too, because a project can override the workspace settings.
If Eclipse itself runs out of memory, raise the -Xmx value after -vmargs in eclipse.ini. If your own program runs out, set the memory in its launch configuration instead, and first check for a loop that never stops adding data.
We do not write or correct graded assignments, and we do not provide answer keys. A teacher will work through the messages with you and teach the idea behind each one, so you can make the fix and explain it.
Weekdays or weekends, flexible. Choose your batch, or for a very personalised plan choose 1-on-1 at your convenience, weekend mornings or weekdays.
The first lesson is free. After that, teaching is paid one month at a time, and the fees section of this page shows the monthly amount in US dollars.
Elsewhere on this site
More help for US students writing Java.
The full set of our pages for American students.
A general method for finding mistakes.
Our teen Java course in detail.
Live preparation for the AP exam.
Starting Java from zero.
Practice programs to run in Eclipse.
IntelliJ IDEA and PyCharm for students: free core, student license, setup fixes.
Set up VS Code for Python and Java, and fix the errors students hit.
GitHub Classroom retired on August 28, 2026: what students need to know.
Start here
Tell us which course you are in and what Eclipse is doing that you did not expect. The teacher opens your workspace with you and starts from there.
To see what a class involves before you book, read how we teach, or browse all courses and their syllabi.
WhatsApp us · +91 91233 66161 · connect@modernagecoders.com
Our teachers are based in India and teach entirely online, so lessons happen over video rather than at a local office. WhatsApp gets the quickest answer from us.
A priority demo is a full class of about 45 to 60 minutes. After the class the mentor sends a written skill report and a personal learning roadmap on WhatsApp. If you enrol, the demo fee is adjusted against your first month's fee. Share your demo Order ID with us on WhatsApp and we take it off.
Book a priority demo