Skip to content

LC32 - A versatile P2P LAN chat app with CLI, Swing UI, and web-based versions. Check other branches for UI versions.

Notifications You must be signed in to change notification settings

prathamreet/LC32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Chat Application



java -jar lc32.jar

sudo dpkg -i lc32.deb
lc32



Creating and Running a JAR File

Prerequisites

  • Java Development Kit (JDK) installed
  • A Java project with .java source files

Compiling Java Files

javac -d out src/*.java

Creating a Manifest File

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.

Creating the JAR File

jar cfm lc32.jar out/manifest.txt -C out .

Running the JAR File

java -jar lc32.jar

Running Without a JAR File (java Main Method)

If you want to run the program without packaging it into a JAR file, use:

java -cp out Main



Creating a .deb Package for the Chat Application

Prerequisites

  • A compiled chat.jar file
  • A Linux system with dpkg installed

Create the Folder Structure

mkdir -p lc32-deb/DEBIAN
mkdir -p lc32-deb/usr/bin
mkdir -p lc32-deb/usr/share/lc32

Move the JAR File

cp chat.jar lc32-deb/usr/share/lc32/

Create a Launcher Script

touch lc32-deb/usr/bin/lc32
chmod +x lc32-deb/usr/bin/lc32

Edit lc32-deb/usr/bin/lc32 and add the following content:

#!/bin/bash
java -jar /usr/share/lc32/chat.jar

Create the Control File

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

Set Correct Permissions

chmod 755 lc32-deb/usr/bin/lc32
chmod 755 lc32-deb/DEBIAN

Build the .deb Package

dpkg-deb --build lc32-deb

Install the .deb Package

sudo dpkg -i lc32-deb.deb

If you encounter dependency issues, fix them by running:

sudo apt --fix-broken install

Run the Application

lc32



About

LC32 - A versatile P2P LAN chat app with CLI, Swing UI, and web-based versions. Check other branches for UI versions.

Topics

Resources

Stars

Watchers

Forks

Languages