Step 1: Create the Batch File
- Open a text editor (like Notepad) and add the following code, replacing the path with your Oracle ORDS directory:
@echo off
cd C:\Oracle\app\ords
java -jar ords.war
pause
- Save the file with a
.batextension (e.g.,start_ords.bat).
Step 2: Test the Batch File
-
Double-click the
.batfile to ensure it starts Oracle ORDS properly. -
Once confirmed, move the file to the ORDS installation directory (e.g.,
C:\Oracle\app\ords).
Step 3: Download NSSM
-
Go to the following link and download NSSM (Non-Sucking Service Manager) version 2.24:
-
Extract the contents of the ZIP file to a folder, then move the extracted folder to your C: drive.
Step 4: Install ORDS as a Service
-
Navigate to the folder where NSSM was extracted (
C:\nssm-2.24\win64). -
In the file explorer, hold
Shiftand right-click inside the folder. Select "Open command window here" or "Open PowerShell window here." -
In the command prompt, type:
nssm.exe install
Step 5: Configure the Service
- In the NSSM window that opens, browse to the
.batfile you created earlier. - Set the "Shutdown" option to "None."
- Provide a service name (e.g.,
ORDS_Service) and click "Install."
Step 6: Set the Service to Start Automatically
- Open the Services application (press
Windows + R, typeservices.msc, and hit Enter). - Find the service you just created (
ORDS_Service), right-click it, and select "Properties." - Set the "Startup type" to "Automatic" and click "OK."
That’s it! ORDS should now start automatically as a service whenever your system restarts.
Let me know if you need any more tweaks or further details!
No comments:
Post a Comment