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
chantspelchantspel 

Packaging apex classes

Hi,

Sorry if this is a stupid question but can you not group your apex classes into packages like you can in Java?

I use the Eclipse IDE plugin and it allows you to create a folder under src/classes but I can't create any apex classes in the subfolder...

Best Answer chosen by Admin (Salesforce Developers) 
mikefmikef

Correct there is only the class level directory that all cls files need to go into.

 

Now you can create what are called Appexchange packages which are packages that can include Apex classes but are not limited to just classes.

These Appexchange packages will show up in your applications directory in eclipse and if you manage them they will be pulled from your classes directory. The process of managing an Appexchange package is a whole different thread.

 

What I do is name my classes like this, ProjectNameClassName.cls that it's easier to find the classes I am looking from in the classes directory.

All Answers

mikefmikef

Correct there is only the class level directory that all cls files need to go into.

 

Now you can create what are called Appexchange packages which are packages that can include Apex classes but are not limited to just classes.

These Appexchange packages will show up in your applications directory in eclipse and if you manage them they will be pulled from your classes directory. The process of managing an Appexchange package is a whole different thread.

 

What I do is name my classes like this, ProjectNameClassName.cls that it's easier to find the classes I am looking from in the classes directory.

This was selected as the best answer
chantspelchantspel

Thanks for the quick response and tip Mike.