Most common spices -- cinnamon, nutmeg, cloves, black pepper -- come from exotic tropical regions, but a few are native to colder climates. One of those is juniper berries, a treasured ingredient in European cookery, but are relatively uncommon in American recipes. They can be difficult to find in some parts of the U.S., but a number of substitutes can lend your foods a similarly earthy flavor.
Juniper berries are sold in dried form. They're a dark purple-blue in color, almost black, and look rather leathery and shriveled. They bring a sharp, pungent, slightly bitter note to food, reminiscent of evergreen forests. European chefs frequently use them in game dishes, reinforcing the forest theme, and juniper berries are also widely used in cabbage or sauerkraut dishes.
One noteworthy use of juniper berries is in the production of gin, where their sharp flavor gives the spirit its clean, astringent character. Gin is often suggested as a substitute for juniper berries, but you'll need to choose your brand carefully. Many brands, especially premium brands, use a variety of other aromatic ingredients to make their gin stand out from its competitors. In this usage, an inexpensive "bar brand" gin is often a better choice. Ask local bartenders or liquor-store staff to name a good option, from the brands available in your area. To use the gin as a substitute, add a tablespoon or two to braised meats or sauerkraut dishes midway through their cooking time. Its flavor will be similar, though milder.
Fresh rosemary plays the same role in Mediterranean cooking that juniper berries play in Scandinavia and Northern Europe, imparting a similarly "pine-like" flavor. Rosemary itself is a smaller shrub than the tree-like juniper, and its needles go directly into the dish. It's less bitter and more aromatic, a fine substitute in dishes centered around game or other red meats. It's especially suitable for meats marinated in red wine. It's not a good option for cabbage dishes or sauerkraut, or for sauerbraten with its tangy marinade.
Mince a small sprig of rosemary in lieu of each juniper berry called for in the recipe, or simply add a larger sprig to the dish and remove it when the flavor is strong enough.
For cabbage and sauerkraut dishes, bay leaves and caraway seeds are often used in place of juniper berries, either individually or together. This is less a substitution than an alternative, since the flavors aren't direct equivalents. Bay leaves add a mildly aromatic flavor that enhances cabbage or sauerkraut without overpowering them; while caraway seeds add a pleasantly licorice-y note and a hint of bitterness. Juniper and caraway are equally traditional in these dishes, so substitute to your heart's content. For a teaspoon of crushed juniper berries, substitute the same quantity of caraway seeds or half caraway, half crushed bay leaves.
A less common alternative to juniper berries comes from far-off India. Cardamoms, sold either ground or in their pods, have a fine, pine-like flavor with hints of sweetness, bitterness and citrus. Substitute one crushed pod of green or white cardamom for each juniper berry, or extract the seeds from the pods and grind them separately, The pods do add a slight flavor of their own, but they're woody and inedible, so if you put them into your dish you must also take them back out before serving it. Cardamoms can be used in place of juniper berries in any dish, providing a similar though not identical final result.