function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Vaibhav ShettiVaibhav Shetti 

Batch Apex save error in Eclipse Neon with IDE

I am trying to demonstrate batch apex in Eclipse Neon with IDE. Following is the code -

global class BatchApexDemoClass1 implements Database.Batchable<Sobject> {
 global Database.QueryLocator start(Database.BatchableContext bc) {
    return Database.getQueryLocator([Select LeadSource From Lead]);

 global void execute(Database.BatchableContext bc, List<Lead> scope) {
    for (Lead Leads : scope) {
        Leads.LeadSource = 'Dreamforce';
    update scope;

 global void finish(Database.BatchableContext bc) { 
    System.debug('Batch apex execution complete.');

However, when I save the code, I get the following errors-
- Save error: Class BatchApexDemoClass1 must implement the method: void Database.Batchable.finish(Database.BatchableContext)
- Save error: Class BatchApexDemoClass1 must implement the method: void Database.Batchable.execute(Database.BatchableContext, List)
- Offline Mode. File only saved locally, not to server
- Save error: Class BatchApexDemoClass1 must implement the method: System.Iterable Database.Batchable.start(Database.BatchableContext)

I don't know what am I missing in the code.
NagendraNagendra (Salesforce Developers) 
Hi Vaibhav,

Your code saves correctly when creating via Setup > Apex Class. But the Offline Mode is an issue within Eclipse. A quick Google search turns up this developer guide page

By default, the IDE creates projects in offline mode. When you work in offline mode, you avoid compiling your org’s Apex code each time you save your files. If, however, you have a stable Internet connection and a small- to the medium-sized code base, consider toggling your projects to online mode.

Toggle Between Offline and Online Modes Right-click your project in the Package Explorer and choose, and then select the mode in which you want to work.

Hope this helps.

Vaibhav ShettiVaibhav Shetti
Hi Nagendra,
I have tried this. But still same error 

Batch apex save error in Eclipse neon with IDE

What about the other errors? Are they also related to Offline mode?