Project

General

Profile

Compile binary files`

Ehsan Mozaffari
Added over 3 years ago

Hi guys

my name is ehsan and I am new to Tigase server so I need some help to brush up my knowledge.

Having a problem caused many problem, the binary files in windows OS can not compile as same as linux.

At this moment all I wanted to know is how can I make a single jar file from tigase-server-7.0.2-b3821-dist-max.zip

thus, I want to do this in windows OS.

Another problem is after compiling the source and export tigase-server.jar I am not be able to run this app by CMD by this command= java -jar tigase-server.jar

Many thanks.


Replies (4)

Added by Daniel Wisnewski IoT 1 Cloud over 3 years ago

Hello Ehsan,

A few things to consider.

If you want to compile a build of Tigase, you will need to download Git or similar program to get it from our repository

See http://docs.tigase.org/tigase-server/7.0.0/Administration_Guide/html/#_tigase_server_binary_updates for some details.

In addition to downloading that, you need Java Development Kit installed, and have your path variables set in the Environment Variables section of windows

https://www.java.com/en/download/help/path.xml so you can run java commands from the command prompt.

The alternative is you can use one of the installer programs from our files page where you got the tigase-server-7.0.2-b3821-dist-max.zip from.

The EXE https://projects.tigase.org/attachments/download/2662/tigase-server-7.0.2-b3821.exe is an installer program as well as the https://projects.tigase.org/attachments/download/2663/tigase-server-7.0.2-b3821.jar jar file both of which are recommended forms of installing Tigase.

Added by Ehsan Mozaffari over 3 years ago

I really appreciated for answering me rapidly.

I can run java files in CMD. However, If I have done the compilation, I'd run the single java file like tigase-server-7.0.2-b3821.jar.

I am not only face the no main manifest attribute but also the whole java package in the binary files. In other words, I don't have any instructions in windows in order to how can I be able to convert this whole package plus my own accompanied java file ( tigase-server.jar ) with these available tools ( eclipse+maven compiler and CMD ) on windows 8 OS.

Another of my problems is, when I run the run.bat file as administrator the command prompt disappeared, moreover, the InstallTigaseService.bat runs successfully but its service cannot execute from services.msc because of the error 1067: the process terminated unexpectedly

and if this problem is solved the other problem is stop.bat file.

The most important thing is build the final package.jar with those tools step by step.

I'd really thrilled for your time in advance.

Screenshot (4).png (159 KB) Screenshot (4).png build file with maven
Screenshot (5).png (149 KB) Screenshot (5).png Lifecycle jar:jar

Added by Wojciech Kapcia TigaseTeam over 3 years ago

Ehsan Mozaffari wrote:

I really appreciated for answering me rapidly.

I can run java files in CMD. However, If I have done the compilation, I'd run the single java file like tigase-server-7.0.2-b3821.jar.

I am not only face the no main manifest attribute but also the whole java package in the binary files. In other words, I don't have any instructions in windows in order to how can I be able to convert this whole package plus my own accompanied java file ( tigase-server.jar ) with these available tools ( eclipse+maven compiler and CMD ) on windows 8 OS.

This has been described here: Building Server and Generating Packages

If you run simple maven build in the main directory you'll build the main tigase-server binary. If you want to create the complete package you should run maven build for the master module (@modules/master/pom.xml@) and in addition enable dist maven profile (from main tigase-server directory):

mvn -Pdist -f modules/master/pom.xml clean install

Another of my problems is, when I run the run.bat file as administrator the command prompt disappeared, moreover, the InstallTigaseService.bat runs successfully but its service cannot execute from services.msc because of the error 1067: the process terminated unexpectedly

and if this problem is solved the other problem is stop.bat file.

You can run all those files directly from the command line, i.e. first open CMD and then execute the file - it will prevent window from closing automatically - it shouldn't close by itself but it will help debug the issue. Most likely the problem stems from the problem in the configuration and/or missing schema.

Added by Ehsan Mozaffari over 3 years ago

I do really appreciate.

Brilliant.

thousand thanks.

    (1-4/4)