Due to version differences in software components (whether versions are older or newer), issues may occur.
Since the Java version specified in the pom.xml file is 17,
-
The system environment variable
JAVA_HOMEmust also point to a Java installation directory of the same version.java -version
-
If running from IntelliJ IDEA Community Edition, follow the menu path below to select a Java version of
17:menü yoluIntelliJ IDEA File Project Structure Project Settings Project SDK
-
To clone the files from the repository, git must be installed. If it is installed, run the following command in the console from an empty folder.
git clone https://github.com/turkerozturk/SweetCherrySync.git -
Or, the files can be downloaded as an archive from https://github.com/turkerozturk/SweetCherrySync/archive/refs/heads/main.zip using a web browser, and the files extracted from the archive.
Open a console window in the SweetCherrySync folder. Run the following command.
mvnw.cmd clean package
./mvnw clean package
|
Note
|
This command will perform a clean build using the Maven version specified in the project’s .mvn/wrapper/maven-wrapper.properties file (if not found on the system, it will download it to the KULLANICININ EV DİZİNİ/.m2/wrapper/dists directory and then perform a clean build, removing any previous build folder).
|
|
Warning
|
On Linux, to allow the mvnw command to run, you must once run chmod +x mvnw to mark the file as executable.
|
As a result, the built project will be available as a JAR file in the target directory within the project directory.
The JAR file will be created with the name SweetCherrySync-1.0.0.jar.
|
Tip
|
You can proceed to the next section. If your application does not run, return to this section, check the port, adjust the application settings if necessary, and try again. |
You can find an unused port number by trial and error or with a console command. To check whether the default ports used by the application are free, run:
netstat -ano -p tcp | find "8081"If the command output shows:
TCP 0.0.0.0:{httpsportnumber} 0.0.0.0:0 LISTENING PID numarası
and
TCP 0.0.0.0:8081 0.0.0.0:0 LISTENING PID numarası
then the port is in use, and to run our application you need to either find and terminate the application using that port, or change the port number of our application.
|
Note
|
For Linux, the equivalent commands are: sudo netstat -ano -p tcp and ps -ef | grep PID numarası.
|
If you want to find which application is using a specific PID, use the following command:
tasklist | find "PID numarası"
This command will display the name of the process.
If it produces no output, the port is free, and our application should run without issues using that port.
You need to specify an unused port number in the application.yml file.
-
If the project is to be run from source code, the file is located at
PROJEKLASÖRÜ/src/main/resources/application.yml. -
If the project is to be run as a JAR file, create an
application.ymlfile in the same directory as the JAR file. The indentation from the line beginnings must be the same.
server:
port: 8081 # (1)-
HTTP port number
To run the uncompiled project, open a console window in the directory containing the mvnw file and run the following command:
mvnw.cmd spring-boot:run
./mvnw spring-boot:run
java -jar `SweetCherrySync-1.0.0.jar`|
Warning
|
When running the compiled JAR file, make sure to run it from the same directory where the file is located. Otherwise, after the application starts, you may encounter issues with the locations of required files and directories during use. |
Access the application via https://localhost:8081.
The web page only displays statistical information; it is not required for synchronization. The web server feature can be disabled.
spring:
main:
web-application-type: servlet # (1)-
The default value is
servlet; to disable it, set it tonone.