cisco-system-traffic-generator / trex-stateless-gui

TRex stateless GUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

4.5.6, .tar.gz, where is the .jar file?

davehouser1 opened this issue · comments

I dont know Java, so sorry if this is something I should know.
I downloaded the latest 4.5.6.tar.gz version, untared, cd'ed into the directory and ran the jar command but get this error

$ java -jar trex-stateless-gui.jar
Error: Unable to access jarfile trex-stateless-gui.jar

I assume there needs to be a .jar file for me to run, where is the .jar file? Are there other steps I need to follow before I can run this command, like compiling the .java files into a .jar, can you share commands needed to accomplish this please?

For Mac and Windows there are automatic installers with Java bundled inside. To install on Linux, you'll have to download Java manually(it is not automatic as requires to login and accept licence agreement)

You can find trex-stateless-gui.jar file inside any *.tgz files on Releases page of the TRex project

Oracle Java 8 can be downloaded here: https://java.com/en/download/
just download it and unpack, set JRE_PATH, add java executable to $PATH env var and then run the jar from trex tgz

Here is an example how to do it:

# download java manually(may require login on Oracle).
# install jre to /opt or any other directory you want, for example $HOME/.local/jre
cd /opt ;  sudo tar xf jre-8u281-linux-x64.tar.gz
#
export JRE_PATH=/opt/jre1.8.0_281/
# download TRex from releases page and unpack
mkdir -p ~/trex-gui
cd ~/trex-gui
wget https://github.com/cisco-system-traffic-generator/trex-stateless-gui/releases/download/v4.5.6/trex-stateless-gui-v4.5.6.tgz
tar xf trex-stateless-gui-v4.5.6.tgz
# run trex with Oracle Java
$JRE_PATH/bin/java -jar trex-stateless-gui.jar

if Oracle java is the default java on Linux and included to $PATH - you will be also able to run `java -jar trex-stateless-gui.jar` or `./trex-stateless-gui`

Woops, I git cloned the repo, instead of downloading the release. All good now.