How to auto run jar file in Linux (fedora, ubuntu) such as service on Windows - linux

I made executable jar file for release to customers.
For Windows, I made .exe setup file.
if exe file executed, made jar file installed and auto run on service.
But, I don't know way for release linux like Windows.
I want to setup and then auto run in linux such as made for windows exe file.
Anyone know how to do this?
I found informations like packaging but, these things do not seem to be what I want.

You can create a custom RPM package which install your executable jar. You can also add steps for installing systemd unit file(init file if on older Linux system) which will run your jar as service.
These RPMs uses script which specifies what to do while installation. Just add the steps to copy jar to /bin directory and steps to create/install/enable systemd unit file onto system.

Related

Maven to create linux suitable build in windows OS

My development environment is windows. When I package a jar in my maven project, the variable {user.home} is being replaced with the appropriate windows path (C:\users\MyUsername\).
Then, before I distribute the jar to my linux server, I manually change the path to the linux equivalent.
Is there a way to force maven to build the jar suitable to linux deployment while I'm working on windows OS?

dotnet restore on linux does not include XML file from nuget package

I have a Visual Studio solution and am trying to build to run on a Linux installation of Docker. As part of the process I need to copy the XML documentation from one of the nuget packages for my Swagger documentation. On my windows development box, I am able to do this, but on Linux it is not working. The problem seems to be when I look at the lib folder for the nuget package on linux I see only a .dll while on Windows I see both .dll and .xml. Below is my restore command
RUN dotnet restore "src/Management/Management.csproj"
Why is the XML file not being extracted on linux?
On another note it seems like linux creates the directories using all lower case. So if I am extracting nuget package Test.MyPackage-3.4.3 it will be located on linux at /root/.nuget/.../test.mypackage/3.4.3. In my csproj file I am referencing the package using %(PackageReference.Identity) which returns the camel-case capitalization. Is there a work-around for this as well?
Not sure if it's still a relevant question.
There is an Env variable NUGET_XMLDOC_MODE which is set to skip in Docker image provided by Microsoft.
If you change it to ENV NUGET_XMLDOC_MODE=none in your Dockerfile it will fix the issue. However image build time will definitely increase so you can consider having dotnet restore as a separate step to enable caching.
More info can be found here
https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-environment-variables

Is separate set of selenium jar files needed for linux os?

I am using Selenium Webdriver(v 2.47.1) automation tool in windows operating system. I have created one automation script using Eclipse IDE and integrated script with Jenkins CI. In Jenkins I created new job with help of windows batch file. Jenkins job successfully completed.
I have uploaded same set of code(contains src, lib, bin directories..) to Linux server where Jenkins CI is installed and tried to create new work using Jenkins. In Linux OS I have used shell command to build the project. Project not builded successfully..
I don't know where the actual problem is..? Please help me on this
There is few things which can effects scripts in Linux environment
1st is batch file you are using
refer it to resolve it if exist in your case
http://stackoverflow.com/questions/32120102/bash-file-is-running-fine-in-windows-for-testng-but-it-is-not-working-in-linux-m
Another one is if your using chrome then you need to set chrome binary according to linux
http://chromedriver.storage.googleapis.com/index.html?path=2.16/
Hope it will help you :)
If still you are facing problem then please share the error your get on terminal/Jenkins jobs section

Configure file in Qt

I have downloaded 'qtxmlpatterns-opensource-src-5.4.1' for installing on Ubunta Linux. but I can not find configure file for writing ./configure.
which is a necessary step for installation process.
whether this file is available in this version or I should find it in another way?

Installing a .bundle file in Fedora linux

So I am using Ozone OS which is basically just fedora with a cool theme, and a lot less crap installed. I tried installing VMWare Horizon view client from here: https://my.vmware.com/web/vmware/details?downloadGroup=VIEWCLIENTS_LINUX_32&productId=421&rPId=7320
and then i renamed the file to vmware.bundle, when i make it runnable with:
chmod +x vmware.bundle
i ran the file using:
./vmware.bundle
this is what happens in my terminal
VMWare Horizon Client is an x86 application but you are trying to install it to an x64 Linux.
To run this installation, you may need to install 32-bit runtime libraries. Do you want to proceed? (yes/no)yes
Extracting VMware Installer...done.
but when i try going to the application menu, I can find VMware anywhere
There is really no such thing as ".bundle" files on Fedora. The only format for installable software on Fedora are RPM files.
All that this ".bundle" file appears to be, is the vendor's custom installation script, that's all. It's not any kind of a standard packaging format, of any kind.
You will be able to find a newly-installed application on your application menu only if the application correctly installed a .desktop file in the right location. If this installation script did not do so, you won't get anything in the application menu.
It is the application script's responsibility to install a .desktop file in order for the application to appear in the application menu.
try running /bin/vmware
that is the default install location

Resources