-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
; Script generated by the Inno Setup Script Wizard. | ||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||
|
||
#define MyAppName "JDK-Selector" | ||
#define MyAppVersion "1.0.0" | ||
#define MyAppPublisher "Nishant Singh" | ||
#define MyAppURL "https://github.com/Rjnishant530/JDK-Selector" | ||
#define MyAppExeName "JDK-Selector.exe" | ||
|
||
[Setup] | ||
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. | ||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) | ||
AppId={{4B02E55A-904B-41B0-8E51-C3389B5E30FD} | ||
AppName={#MyAppName} | ||
AppVersion={#MyAppVersion} | ||
;AppVerName={#MyAppName} {#MyAppVersion} | ||
AppPublisher={#MyAppPublisher} | ||
AppPublisherURL={#MyAppURL} | ||
AppSupportURL={#MyAppURL} | ||
AppUpdatesURL={#MyAppURL} | ||
DefaultDirName={autopf}\{#MyAppName} | ||
DisableProgramGroupPage=yes | ||
LicenseFile=E:\PythonProjects\JavaSelector\dist\JDK-Selector\LICENSE | ||
; Uncomment the following line to run in non administrative install mode (install for current user only.) | ||
;PrivilegesRequired=lowest | ||
OutputDir=E:\PythonProjects\JavaSelector\dist | ||
OutputBaseFilename=JDK-Selector | ||
SetupIconFile=E:\PythonProjects\JavaSelector\java.ico | ||
Compression=lzma | ||
SolidCompression=yes | ||
WizardStyle=modern | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
|
||
[Tasks] | ||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked | ||
|
||
[Files] | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\_bz2.pyd"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\_decimal.pyd"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\_hashlib.pyd"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\_lzma.pyd"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\_socket.pyd"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\_ssl.pyd"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\_tkinter.pyd"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-console-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-datetime-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-debug-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-errorhandling-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-file-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-file-l1-2-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-file-l2-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-handle-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-heap-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-interlocked-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-libraryloader-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-localization-l1-2-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-memory-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-namedpipe-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-processenvironment-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-processthreads-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-processthreads-l1-1-1.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-profile-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-rtlsupport-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-string-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-synch-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-synch-l1-2-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-sysinfo-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-timezone-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-core-util-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-conio-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-convert-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-environment-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-filesystem-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-heap-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-locale-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-math-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-process-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-runtime-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-stdio-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-string-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-time-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\api-ms-win-crt-utility-l1-1-0.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\base_library.zip"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\JDK-Selector.exe"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\libcrypto-1_1.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\libssl-1_1.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\LICENSE"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\python311.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\select.pyd"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\tcl86t.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\tk86t.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\ucrtbase.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\unicodedata.pyd"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\VCRUNTIME140.dll"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\tcl\*"; DestDir: "{app}\tcl"; Flags: ignoreversion recursesubdirs createallsubdirs | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\tcl8\*"; DestDir: "{autocf}\tcl8"; Flags: ignoreversion recursesubdirs createallsubdirs | ||
Source: "E:\PythonProjects\JavaSelector\dist\JDK-Selector\tk\*"; DestDir: "{app}\tk"; Flags: ignoreversion recursesubdirs createallsubdirs | ||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files | ||
|
||
[Icons] | ||
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" | ||
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,21 @@ | ||
# JDK-Selector | ||
JDK Selector is a user-friendly program that allows users to select and set different versions of Java JDK. With its easy-to-use interface, users can quickly switch between JDK versions to suit their development needs. | ||
|
||
**Currently _Only_ works with Amazon corretto** | ||
## Features | ||
- Select and set different versions of Java JDK | ||
- Easy-to-use interface | ||
- Quick switching between JDK versions | ||
## Requirements | ||
- Java Development Kit (JDK) installed on the system | ||
## Getting Started | ||
1. Recommended to Download the Binary or installer from releases | ||
2. | ||
1. Clone this repo | ||
2. pip install pyinstaller | ||
3. install UPX (optional) | ||
4. run `pyinstaller JDK-Selector.spec` | ||
## Contributing | ||
If you find a bug or would like to suggest an enhancement, please open an issue on this repository. Pull requests are most welcome! | ||
## Attributes | ||
- [Icon](https://www.flaticon.com/free-icons/java) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import PyInstaller.__main__ | ||
|
||
PyInstaller.__main__.run([ | ||
'my_script.py', | ||
# '--onefile', | ||
'--windowed', | ||
'-i "java.ico"' | ||
]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import tkinter as tk | ||
import os | ||
from tkinter import ttk | ||
|
||
|
||
# Get a list of all Java versions installed on the system | ||
java_versions = [f for f in os.listdir("C:\Program Files\Amazon Corretto") if f.startswith("jdk")] | ||
|
||
# Create a new Tkinter window | ||
window = tk.Tk() | ||
window.geometry("400x200") | ||
window.resizable(False, False) | ||
window.title("Select Java Version") | ||
|
||
# Create a label widget to display instructions | ||
label = tk.Label(text="Select a Java Version",font=("Arial", 14), padx=10, pady=10) | ||
|
||
label.pack(pady=10) | ||
|
||
# Create a StringVar to store the selected Java version | ||
selected_version = tk.StringVar() | ||
|
||
# Create a dropdown menu to display all Java versions | ||
dropdown_frame = tk.Frame(window) | ||
dropdown_frame.pack() | ||
dropdown_label = tk.Label(dropdown_frame, text="Select Java Version:", font=("Arial", 12)) | ||
dropdown_label.pack(side=tk.LEFT, padx=10) | ||
|
||
style = ttk.Style() | ||
style.map("TCombobox", fieldbackground=[("readonly", "white")]) | ||
|
||
dropdown = ttk.Combobox(dropdown_frame, textvariable=selected_version, state='readonly', values=java_versions) | ||
dropdown.config(font=("Arial", 12), width=15) | ||
dropdown.pack(side=tk.LEFT, padx=10) | ||
|
||
|
||
# Define a function to apply the selected Java version as the JAVA_HOME environment variable | ||
def apply_version(): | ||
version = selected_version.get() | ||
java_home = f"C:\Program Files\Amazon Corretto\{version}" | ||
os.environ["JAVA_HOME"] = java_home | ||
os.system(f'setx JAVA_HOME "{java_home}" /M') | ||
message = f"Java version {version} applied as JAVA_HOME" | ||
result_label.config(text=message) | ||
|
||
button_frame = tk.Frame(window) | ||
button_frame.pack(pady=10) | ||
apply_button = tk.Button(button_frame, text="Apply", font=("Arial", 12), command=apply_version) | ||
apply_button.pack(side=tk.LEFT, padx=10) | ||
exit_button = tk.Button(button_frame, text="Exit", font=("Arial", 12), command=window.quit) | ||
exit_button.pack(side=tk.LEFT, padx=10) | ||
|
||
# Create a label widget to display the result of the action | ||
result_label = tk.Label(window, font=("Arial", 12), pady=10) | ||
result_label.pack() | ||
|
||
# Start the main loop of the window | ||
window.mainloop() |