Beispiel #1
0
    def set_java_exe(self):
        system_java_exe = find_system_java_exe()

        if system_java_exe:
            confirm = tkMessageBox.askquestion(
                "Configure Java",
                "CoilSnake has detected Java at the following location:\n\n" +
                system_java_exe + "\n\n" +
                "To use this installation of Java, select \"Yes\".\n\n" +
                "To override and instead use a different version of Java, select \"No\".",
                icon="question")
            if confirm == "yes":
                self.preferences["java"] = None
                self.preferences.save()
                return

        tkMessageBox.showinfo(
            "Select the Java Executable",
            "Select a Java executable for CoilSnake to use.\n\n"
            "On Windows, it might be called \"javaw.exe\" or \"java.exe\".")

        java_exe = tkFileDialog.askopenfilename(
            parent=self.root,
            title="Select the Java Executable",
            initialfile=(self.preferences["java"] or system_java_exe))
        if java_exe:
            self.preferences["java"] = java_exe
            self.preferences.save()
Beispiel #2
0
    def set_java_exe(self):
        system_java_exe = find_system_java_exe()

        if system_java_exe:
            confirm = tkMessageBox.askquestion(
                "Configure Java",
                "CoilSnake has detected Java at the following location:\n\n"
                + system_java_exe + "\n\n"
                + "To use this installation of Java, select \"Yes\".\n\n"
                + "To override and instead use a different version of Java, select \"No\".",
                icon="question"
            )
            if confirm == "yes":
                self.preferences["java"] = None
                self.preferences.save()
                return

        tkMessageBox.showinfo(
            "Select the Java Executable",
            "Select a Java executable for CoilSnake to use.\n\n"
            "On Windows, it might be called \"javaw.exe\" or \"java.exe\"."
        )

        java_exe = tkFileDialog.askopenfilename(
            parent=self.root,
            title="Select the Java Executable",
            initialfile=(self.preferences["java"] or system_java_exe))
        if java_exe:
            self.preferences["java"] = java_exe
            self.preferences.save()
Beispiel #3
0
 def get_java_exe(self):
     return self.preferences["java"] or find_system_java_exe()
Beispiel #4
0
 def get_java_exe(self):
     return self.preferences["java"] or find_system_java_exe()