I am trying to package a Java SE project with Netbeans Native Packaging. While there are plenty of instructions for doing this on Windows, I cannot find the required packages for doing so on Ubuntu with a Debian package.
What do I need to install on my system to make this work?
if you're free to choose a buildsystem there're rpm and deb packaging plugins for gradle, maven and even ant tasks for deb and rpm.
The resulted packages are somewhat limited, but if you don't something special like precise file permissions control, or rpm install triggers etc, they may help you.
Related
I recently found the library Libsodium and was glad that there are also Bindings for Java. Unfortunately, the libraries don't appear to work with Windows because they were developed for other systems.
How can I use the libraries under Windows (if possible)?
Are there any alternative libraries for Java?
On that page for other bindings, you find the Java binding is called Kalium. You'll see it requires Apache Maven. So I went and got that (at the bottom it explains how to install maven, but basically you just add some environment variables).
Now on to kalium, I got it from their abstract on github. I needed mvn clean install from the directory in order to install it in Maven. After changing directory to the unzipped Kalium folder I ran the specified command (which is telling Maven to get the files and install Kalium). This will handle the rest of the set-up.
Then it's just a matter of adding it as a dependency in your Maven projects as per the Kalium readme. As for libsodium: it is a library that works with MinGW, and VisualStudio in Windows. So if you want to do C/C++ coding you can use that instead. But for the Java binding it seems you'll have deploy it using Maven.
In order to compile gnu.mail.provider and gnu.mail.treeutil into gnumail-providers.jar what are the dependencies and what are the packages which should be compiled?
More importantly, are those the packages which go into this JAR? And, what needs to be on the classpath to build this JAR correctly?
Below follows what I think GNU is doing. GNU makes all their projects build from make, so for classpathx the instructions are:
svn co svn://svn.savannah.gnu.org/classpathx/trunk classpathx cd
classpathx/activation ./configure && make && sudo make install cd
../inetlib ./configure && make && sudo make install cd ../mail ./configure
&& make && sudo make install
1.) what are the JAR dependencies for building gnumail-providers.jar?
2.) which source code package(s) should be compiled to build gnumail-providers.jar?
Looking at what Ubuntu does, apt-get install libgnuinet-java libgnujaf-java libgnumail-java installs:
/usr/share/java/inetlib.jar
/usr/share/java/activation.jar
/usr/share/java/gnumail-providers.jar
/usr/share/java/gnumail.jar
It's a little bit odd because libgnumail-java installs both gnumail.jar and gnumail-providers.jar, and I'm not quite sure why those are separate, and what the dependencies are.
jar -tf /usr/share/java/gnumail.jar shows packages gnu.mail as well as javax.mail, so that JAR is limited to the source code for those packages, at most?
Alternately,
jar -tf /usr/share/java/gnumail-providers.jar is more specific, with gnu.mail.providers and gnu.mail.treeutil, which all seems a bit odd.
Why are some, but not all, gnu.mail packages built into a seperate JAR from the main JAR?
The over-ridden (if that's the correct term) javax.mail is packaged in the same JAR as gnu.mail, but why?
That gnu.mail is split and packaged into two separate JAR's seems unusual, as does the way javax.mail ends up with gnu.mail and not in a JAR of its own.
In a larger way, is this a normal way of packaging JAR's?
In the more practical sense, in order to compile gnu.mail.provider and gnu.mail.treeutil into gnumail-providers.jar what are the dependencies and what are the packages which should be compiled?
It seems odd that a subset of a package hierarchy is compiled into a JAR to sit alongside its brethren, but is that what's happening?
Ok, I found the source code here:
http://svn.sv.gnu.org/viewvc/trunk/activation/?root=classpathx
Then read the installation instructions and ANT is not supported by this build:
Ant build
A simple Ant buildfile is included for platforms where GNU Make is not
installed. This buildfile is not officially supported and may not provide
options available during the standard autotools-based installation.
I took a peek and the build file is only responsible for building the "activation.jar" file.
do you know a highly configurable maven plugin for creating MS Windows installers?
The artifacts of my project are processed through a Maven Launch4j plugin, therefore I already have an executable (*.exe) file, but I need to install the other dependencies and resources as well: *.dll, images, the executable and so on. I also like to install the jre (if required), set some environment variables and so on.
Can you recomend a plugin?
Best regards.
I think you are looking for the nsis-maven-plugin
The nsis-maven-plugin enables Maven integration with the NSIS tools so
that Windows and Linux build machines can create Windows Installer
EXEs.
Java newbie here. I'm trying to run the latest version of MWDumper, which is a command-line utility that imports wiki databases. The page said I should build it from its source. I've downloaded the source-code. They've got a makefile and a build.xml. How do I build this?
You need to install ANT and run ANT in the folder containing the build.xml.
If you're on linux or mac it's pretty easy - you just [package manager name here] install ant;
You then just cd to the appropriate folder and type in ant. It should build your app.
You also need to make sure that you have the Java Development Kit installed for the ANT to use. Ant doesn't actually do any compiling, it's just a tool that reads build instructions and calls various applications and compilers to output the end executable (or similar product).
You should be able to install 'jdk' from your package manager, or from their site (http://www.oracle.com/technetwork/java/javase/downloads/index.html).
If you're on Windows, you can install the JDK from the same link, and you can follow the following link as a guide to install ant for windows: http://ant.apache.org/manual/install.html
Don't forget to add the path to ant to your environment 'PATH' variable! :) (more details in the link above)
Use Apache Ant.
cd <dir>
ant <target>
Also you can use Apache Maven.
cd <dir>
mvn install
Lets say you created a little Java Desktop app with a jar and some dependencies and possibly a license text file. I know there are plenty of Ant tasks that can generate installers, executables and proper Mac OS X applications including packaging them as ".dmg" files. Examples would be JarBundler and Launch4j
Does similar things exist for Maven?
Thanks
OSX appbundle plugin
I also think launch4j has a maven plugin
To generate a windows executable in a maven build, you can use the launch4j-maven-plugin. I just answered a related question, Trying to integrate Launch4j in a Maven project using Alakai plugin, showing how to accomplish that. It's very easy, more than JSmooth, which always had a maven plugin.
Hope it helps!