aboutsummaryrefslogtreecommitdiffstats
path: root/find_java/find_java.h
diff options
context:
space:
mode:
authorRaphael <raphael@google.com>2012-01-24 15:06:56 -0800
committerRaphael <raphael@google.com>2012-01-25 10:16:18 -0800
commitd2d6999d779fffe976c55db04bf523907a8743ed (patch)
tree5a5ea7db3cac33e6f8403992ad47b1111c71c3f4 /find_java/find_java.h
parent22fd3c107616214d2a6baecb64fe1354686cb470 (diff)
downloadsdk-d2d6999d779fffe976c55db04bf523907a8743ed.zip
sdk-d2d6999d779fffe976c55db04bf523907a8743ed.tar.gz
sdk-d2d6999d779fffe976c55db04bf523907a8743ed.tar.bz2
Windows: "find_java" exe and lib for android.bat
This adds a "find_java.exe" that will be packages in SDK/tools/lib. It will be used by android.bat and the other launchers to locate the best version of java to use for our tools (currently we have a find_java.bat that uses DOS commands to achieve something similar but more limited). In addition this creates a static "findjavalib" that is used by the NSIS installer to locate java and get its version (to complain in case we only find a Java 1.4 or lesser). The goal is for the installer to use the same logic as the tools will use to locate the java binary. Change-Id: Ic2efb388135087bab9687c3332882047fd041b1c
Diffstat (limited to 'find_java/find_java.h')
-rwxr-xr-xfind_java/find_java.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/find_java/find_java.h b/find_java/find_java.h
new file mode 100755
index 0000000..b578903
--- /dev/null
+++ b/find_java/find_java.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2011 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _H_FIND_JAVA
+#define _H_FIND_JAVA
+
+#ifdef _WIN32
+
+#include "utils.h"
+
+bool findJavaInEnvPath(CPath *outJavaPath);
+bool findJavaInRegistry(CPath *outJavaPath);
+bool findJavaInProgramFiles(CPath *outJavaPath);
+bool getJavaVersion(CPath &javaPath, CString *version);
+
+#endif /* _WIN32 */
+#endif /* _H_FIND_JAVA */