Maven to create linux suitable build in windows OS - linux

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?

Related

Build a Linux package of Postgresql from sources

I have a Java application using Postgres. The installer is created via Install4J for Windows and Linux.
The installer also handles the installation of Postgres on the system. So there's a Postgres package included in the installer resources. In the past EDB offered packages for Windows as well as Linux but they stopped offering the Linux packages after version 10.
Is there a way to create a package of a newer version from the sources? Should be in the style the old versions were packaged in. So that the package would work on all Linux distributions, e.g. Debian, CentOS...

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

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.

DNU publish to linux runtime from windows OS

I want to publish using dnu to run on linux from a windows machine. This is required to make docker images, I know the usual practice is to push the source to linux docker and do "dnu restore", but that sounds a lengthy process, and completely against the cross-compat that the DNXCore50 is trying to offer.
The latest dnx runtime now includes a "runtime" for unix/darwin related packages to target the other operating systems. But how to run a publish command that targets linux or rather if there is a way to pull the linux dnx core in a windows machine using dnvm install coreclr??

how to bind java setup with my application setup?

i am beginner in java. i have done one application using java swing. Now i want make a setup or installer of that application.
i have been trying install4j for .jar to .exe file and "inno setup compiler" for setup and it run successfully. but problem is that this setup run on machine where java is not installed but the application is not running and generate error for the java runtime environment is not installed.
how i can install java with my application on machine of the user of my system
In install4j you need to configure your installer either as static bundle or as a dynamic bundle. A static bundle will ship the JRE with the installer and the dynamic will download the JRE at installation time.
From the help page:
Static bundle
The selected JRE will be distributed in your media file.
Dynamic bundle
A dynamic bundle is downloaded on demand. If the user already has a suitable JRE installed, that JRE will be used. If there is no such JRE available on the target machine, the installer will download the dynamically bundled JRE from the URL that you specify in the text fields below.

Installing Recent Release of JDK Using Cygwin?

Can somebody tell me how to do this? Or, point me to a good link?
I want to install Jmeter but "./jmeter" tells me that:
Error: no server' JVM atC:\Program
Files\Java\jre1.6.0\bin\server\jvm.dll'.
So, I need to get the server JVM up and running.
I have been attempting to download and install the JDK from
http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u25-download-346242.html
And got a corrupted file error when I tried to install:
jdk-6u25-linux-ia64-rpm.bin
Should I be doing this via wget or apt-cyg? Or, how do i determine which installation
package I should be downloading from the oracle/sun downloads page?
Thanks in advance.
You are on Windows so you should try the Windows x86 version unless there is a particular reason why you want to do that with Cygwin. Or try this:
Copy 'server' folder from the JDK's JRE's bin folder (example: C:\Program Files\Java\jdk1.6.0\jre\bin\server)
Paste the 'server' folder to JRE's bin folder (example: C:\Program Files\Java\jre1.6.0\bin)
Cygwin aims for Linux source compatibility, but it does not provide Linux binary compatibility. This means that programs have to be built specifically for Cygwin and that Linux binaries such as the linux-ia64 JVM mentioned here will not run on Cygwin.
Perhaps it is possible to build the OpenJDK JVM for Cygwin, but it doesn't ship with Cygwin. The Cygwin Ports repository contains a package for the lightweight JamVM.
But in any case, JMeter was looking for the native Windows version of the JVM, so you probably just want to install that, as Jano already suggested.

Resources