Can't create(save) new class

salesforce

#1

Error message: “no such file”


#2

I know this thread is very old, and hopefully you have solved this out, but if you have not, here is the solution:

  • When you create a Class (new), your usual Salesforce IDE will create 2 files within Salesforce, a “.cls” file and a “.cls-meta.xml” file, which needs to have certain metadata about the new class.

Cloud9 does not automatically do this, so you have to (assuming your class name is “Test”):

  • Create 2 files, “Test.cls” and “Test.cls-meta.xml” and save them in the “Classes” folder.
  • Put this into the “Test.cls-meta.xml” file:

(Sorry for the not copyable image, the forum editor does not like XML tags and wasn’t showing properly)
Then save both files, and sync them together into Salesforce, that did the trick for me :).

Cheers!,
Nahuel.