diff --git java/bazel/rules/java_stub_template.txt java/bazel/rules/java_stub_template.txt
index 115b46e..56d2ff7 100644
--- java/bazel/rules/java_stub_template.txt
+++ java/bazel/rules/java_stub_template.txt
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!@defaultBash@
 # Copyright 2014 The Bazel Authors. All rights reserved.
 #
 # Licensed under the Apache License, Version 2.0 (the "License");

