Windows: download JAR ⬇️
java -jar lc32.jar
Linux: download DEB ⬇️
sudo dpkg -i lc32.deb
lc32
- Java Development Kit (JDK) installed
- A Java project with
.java
source files
javac -d out src/*.java
To specify the entry point, create a manifest.txt
file inside the out/
directory with the following content:
Main-Class: Main
Note: Ensure there is an empty newline at the end of the file to avoid errors.
jar cfm lc32.jar out/manifest.txt -C out .
java -jar lc32.jar
If you want to run the program without packaging it into a JAR file, use:
java -cp out Main
- A compiled
chat.jar
file - A Linux system with
dpkg
installed
mkdir -p lc32-deb/DEBIAN
mkdir -p lc32-deb/usr/bin
mkdir -p lc32-deb/usr/share/lc32
cp chat.jar lc32-deb/usr/share/lc32/
touch lc32-deb/usr/bin/lc32
chmod +x lc32-deb/usr/bin/lc32
#!/bin/bash
java -jar /usr/share/lc32/chat.jar
nano lc32-deb/DEBIAN/control
Add the following content:
Package: lc32
Version: 1.0
Architecture: all
Maintainer: Your Name <your.email@example.com>
Depends: default-jre
Description: A simple LAN chat application
chmod 755 lc32-deb/usr/bin/lc32
chmod 755 lc32-deb/DEBIAN
dpkg-deb --build lc32-deb
sudo dpkg -i lc32-deb.deb
If you encounter dependency issues, fix them by running:
sudo apt --fix-broken install
lc32