Best practice is to use Locale, which uses a comma as a separator, for example, French:
double d = NumberFormat.getNumberInstance(Locale.FRENCH).parse("37,78584").doubleValue();
The quickest approach is to simply replace any commas with periods.
double d = String.parseDouble("37,78584".replace(",","."));
source share