Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated installation instructions #120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
118 changes: 69 additions & 49 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,69 @@
## Install jnetpcap local repo

for linux, sudo is a prerequisite
```
//linux :at the pathtoproject/jnetpcap/linux/jnetpcap-1.4.r1425
//windows: at the pathtoproject/jnetpcap/win/jnetpcap-1.4.r1425
mvn install:install-file -Dfile=jnetpcap.jar -DgroupId=org.jnetpcap -DartifactId=jnetpcap -Dversion=1.4.1 -Dpackaging=jar
```

## Run
### IntelliJ IDEA
open a Terminal in the IDE
```
//linux:
$ sudo bash
$ ./gradlew execute

//windows:
$ gradlew execute
```
### Eclipse

Run eclipse with sudo
```
1. Right click App.java -> Run As -> Run Configurations -> Arguments -> VM arguments:
-Djava.library.path="pathtoproject/jnetpcap/linux/jnetpcap-1.4.r1425" -> Run

2. Right click App.java -> Run As -> Java Application

```

## Make package

### IntelliJ IDEA
open a Terminal in the IDE
```
//linux:
$ ./gradlew distZip
//window
$ gradlew distZip
```
the zip file will be in the pathtoproject/CICFlowMeter/build/distributions

### Eclipse
At the project root
```
mvn package
```
the jar file will be in the pathtoproject/CICFlowMeter/target
## CICFlowMeter v4.0 - Installation Instructions
> The official repository on github is : `https://github.com/ahlashkari/CICFlowMeter`

> To properly compile CICFlowMeter you need Eclipse or IntelliJ IDEA (The latter is recommended)

---

### Installation steps for Ubuntu 20.04 (As of 19.04.2021)

1. Installation of pre-requisites
- `sudo apt update`
- `sudo apt install maven openjdk-11-jdk -y`

2. Clone repository
- `git clone https://github.com/ahlashkari/CICFlowMeter`
- `cd CICFlowMeter`

3. Maven-install jnetpcap (included in the repository)
- `cd jnetpcap/linux/jnetpcap-1.4.r1425`
- `mvn install:install-file -Dfile=jnetpcap.jar -DgroupId=org.jnetpcap -DartifactId=jnetpcap -Dversion=1.4.1 -Dpackaging=jar`

4. IntelliJ IDEA
- Download and install IntelliJ IDEA.
- Open the git-cloned folder as a gradle project.
- Ignore the warnings and let it index the project.

5. Run the project
- Open a terminal inside IntelliJ IDEA
- `sudo bash`
- `./gradlew run`
- Press Ctrl+Enter to run the command and not just Enter !

6. Build the project for native use
- Open a terminal inside IntelliJ IDEA
- `sudo bash`
- `./gradlew distZip`
- Press Ctrl+Enter to run the command and not just Enter !
- The zip will be at ./build/distributions

---

### Installation steps for Windows 10 (As of 19.04.2021)

1. Download and install IntelliJ IDEA

2. Install any java version.

3. Clone repository

4. Open the CICFlowMeter folder as a gradle project

5. Ignore the warning and let it index the project

6. Open terminal in IntelliJ IDEA
- `mvn install:install-file -Dfile=jnetpcap.jar -DgroupId=org.jnetpcap -DartifactId=jnetpcap -Dversion=1.4.1 -Dpackaging=jar`
- Press Ctrl+Enter to run the command and not just Enter !

7. Run the project
- Right-Click at 'gradlew'
- Run
- Open a terminal in IntelliJ IDEA
- `gradlew run`
- Press Ctrl+Enter to run the command and not just Enter !

8. Build the project for native use
- Open a terminal
- `gradlew distZip`
- Press Ctrl+Enter to run the command and not just Enter !
- The zip will be at ./build/distributions
49 changes: 49 additions & 0 deletions README_old.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
## Install jnetpcap local repo

for linux, sudo is a prerequisite
```
//linux :at the pathtoproject/jnetpcap/linux/jnetpcap-1.4.r1425
//windows: at the pathtoproject/jnetpcap/win/jnetpcap-1.4.r1425
mvn install:install-file -Dfile=jnetpcap.jar -DgroupId=org.jnetpcap -DartifactId=jnetpcap -Dversion=1.4.1 -Dpackaging=jar
```

## Run
### IntelliJ IDEA
open a Terminal in the IDE
```
//linux:
$ sudo bash
$ ./gradlew execute

//windows:
$ gradlew execute
```
### Eclipse

Run eclipse with sudo
```
1. Right click App.java -> Run As -> Run Configurations -> Arguments -> VM arguments:
-Djava.library.path="pathtoproject/jnetpcap/linux/jnetpcap-1.4.r1425" -> Run

2. Right click App.java -> Run As -> Java Application

```

## Make package

### IntelliJ IDEA
open a Terminal in the IDE
```
//linux:
$ ./gradlew distZip
//window
$ gradlew distZip
```
the zip file will be in the pathtoproject/CICFlowMeter/build/distributions

### Eclipse
At the project root
```
mvn package
```
the jar file will be in the pathtoproject/CICFlowMeter/target