redhat enterprise 6.1 Linux compatible softwares - linux

I am planning to install my j2EE, spring rest based application on Red Hat Enterprise Linux 6.1. I want to know about the software version which is compatible. I am not sure whether all the new versions are compatible in REL 6.1.
The list of software's I need to install are
J2EE
Apache Tomcat
SpringRest
MySQL

The RHEL 6.1 can easily be updated for the latest versions of Java, Tomcat. For the latest MySQL, if there are dependencies not present in RHEL 6.1 then you could try either adding or updating them (using yum or building from source).
J2EE: Download from Oracle Java SDK download page [I believe you want JDK since the J2EE dependencies would be provided by Tomcat such as Servlet etc]
Apache Tomcat: Download the binaries from the tomcat apache website [http://tomcat.apache.org/]. That should be enough to get you started. If later on you would like to use openssl or apache portable runtime then that is easily setup as well. The tomcat documentation has useful documentation to set it up.
SpringRest: I believe you are referring to the java archives for it. You can use Maven to download the necessary dependencies or use Spring Boot (https://spring.io/guides/gs/rest-service/) or search Google for the many examples of bundling Spring dependencies with your application.
For MySQL: refer to http://dev.mysql.com/doc/mysql-repo-excerpt/5.6/en/linux-installation-yum-repo.html

Related

weblogic version which compatibility with log4j 2.17.1

what would be the compatible weblogic versions for the log-2.17.1. any Reference link is useful.
part of my research nowhere i found related solutions in the official sites
It would be more the java version that weblogic runs on. If it supports java 8 then you would be able to use log4j 2.17.1. I think weblogic 12.1.3 onwards supports java 8.

Is IBM Maximo 7.6 businessobject jar compiled in Java 1.8 compatible to run in java 1.7?

I have got jar compiled in java 1.8 from maximo dir and on my machine i have java 1.7 installed do i need to update my machine java before i run this jar. I can not run it before knowing this since it will get recorded in some logs and will update some server side files.
This is more of a Java question than a Maximo question, but no, it will not. You will get an "Unsupported major.minor version 52.0" if you do. This is not because of any features issue, this is simply because the bytecode is tagged as being from Java 8 and so earlier JREs will not run it.
Now this assumes you actually compiled the class files using Java 8, which probably only happened if you have custom code in there. If you are just using the out-of-the-box Maximo classes, those came pre-compiled (in I don't recall which version of Java) and so all you might have done was to bundle them into a jar, or more likely into the Maximo ear (since you don't run the businessobjects.jar). In that case, it doesn't matter what version of Java you used to created the jar/ear, it will run on any version of Java that is the same as or higher than whatever version IBM used to compile the code into classes.

JavaFX and OpenJDK

I'm trying to decide whether I could switch to JavaFX for the user interface of my Java application. Most of my users would be using the Oracle JRE, which has JavaFX integrated these days. However, some are using OpenJDK (on linux). This (old) question suggests that OpenJDK deals very badly with JavaFX. According to this question, the alternative OpenJFX will only be fully integrated into OpenJDK in version 9. So my question is twofold:
Is the JavaFX support in OpenJDK still so bad?
If so, are there any Linux distributions that already offer an OpenJFX package so users wouldn't have to build it themselves?
JavaFX is part of OpenJDK
The JavaFX project itself is open source and is part of the OpenJDK project.
However, the OpenJDK project includes many projects, including incubating projects and other projects, such as OpenJFX, whose source and implementation are not shipped as part of some JDK/JRE distributions (e.g. Oracle JDK 11+ implementations and many open-source JDK Linux package installations do not include JavaFX runtimes).
Modern JavaFX distributions are modules
JavaFX is not part of most JDK 11+ downloads, it is usually downloaded by developers as modules or a separate SDK.
Specifically for JavaFX 11+, as detailed on the https://openjfx.io site:
JavaFX runtime is available as a platform-specific SDK, or as a number of jmods, or as a set of artifacts in Maven Central.
This means that JavaFX can be used from any modern JDK running on a supported platform, by including the appropriate JavaFX modules (available from openjfx or Maven Central) on the runtime module path.
All JavaFX modules available from openjfx are open source implementations that contain no closed source code.
For distribution of JavaFX-based applications to end-users, it is advised to package a run-time image distribution based on the JDK and JavaFX modules + required dependent library code and application code. A full discussion of this packaging is out of scope for this answer, but one can create a distribution based purely on open-source JDK+JavaFX+library+application code if desired. See the openjfx.io documentation on run-time images for some more (though not comprehensive) information on this.
Update Sep 2021
Also, see the related question:
JavaFx in oracle JDK 8 is same as openjfx 8 versions or not? what is the relationship between javafx in oracle jdk 8 and openjfx8?
Which covers information regarding Java 8 and also some later versions.
Update Dec 2019
For current information on how to use Open Source JavaFX, visit https://openjfx.io. This includes instructions on using JavaFX as a modular library accessed from an existing JDK (such as an Open JDK installation).
The open source code repository for JavaFX is at https://github.com/openjdk/jfx.
At the source location linked, you can find license files for open JavaFX (currently this license matches the license for OpenJDK: GPL+classpath exception).
The wiki for the project is located at: https://wiki.openjdk.java.net/display/OpenJFX/Main
If you want a quick start to using open JavaFX, the Bellsoft's Liberica JDK distributions provide pre-built OpenJDK binaries that include OpenJFX for a variety of platforms.
For distribution as self-contained applications, Java 14 is scheduled to implement JEP 343: Packaging Tool, which "Supports native packaging formats to give end users a natural installation experience. These formats include msi and exe on Windows, pkg and dmg on macOS, and deb and rpm on Linux.", for deployment of OpenJFX based applications with native installers and no additional platform dependencies (such as a pre-installed JDK).
Older information that may become outdated over time
Building JavaFX from the OpenJDK repository
You can build an open version of OpenJDK (including JavaFX) completely from source which has no dependencies on the Oracle JDK or closed source code.
Update: Using a JavaFX distribution pre-built from OpenJDK sources
As noted in comments to this question and in another answer, the Debian Linux distributions offer a JavaFX binary distibution based upon OpenJDK:
https://packages.qa.debian.org/o/openjfx.html
Install via:
sudo apt-get install openjfx
(currently this only works for Java 8 as far as I know).
Differences between Open JDK and Oracle JDK with respect to JavaFX
The following information was provided for Java 8. As of Java 9, VP6 encoding is deprecated for JavaFX and the Oracle WebStart/Browser embedded application deployment technology is also deprecated. So future versions of JavaFX, even if they are distributed by Oracle, will likely not include any technology which is not open source.
Oracle JDK includes some software that is not usable from the OpenJDK. The components that relate to JavaFX:
The ON2 VP6 video codec, which is owned by Google and Google has not open sourced.
The Oracle WebStart/Browser Embedded application deployment technology.
This means that an open version of JavaFX cannot play VP6 FLV files. This is not a big loss as it is difficult to find VP6 encoders or media encoded in VP6.
Other more common video formats, such as H.264 will playback fine with an open version of JavaFX (as long as you have the appropriate codecs pre-installed on the target machine).
The lack of WebStart/Browser Embedded deployment technology is really something to do with OpenJDK itself rather than JavaFX specifically. This technology can be used to deploy non-JavaFX applications.
It would be great if the Open Source community developed a deployment technology for Java (and other software) which completely replaced WebStart and Browser Embedded deployment methods, allowing a nice light-weight, low impact user experience for application distribution. I believe there have been some projects started to serve such a goal, but they have not yet reached a high maturity and adoption level.
Personally, I feel that WebStart/Browser Embedded deployments are legacy technology and there are currently better ways to deploy many JavaFX applications (such as self-contained applications).
Update Dec, 2019:
An open source version of WebStart for JDK 11+ has been developed and is available at https://openwebstart.com.
Who needs to create Linux OpenJDK Distributions which include JavaFX
It is up to the people which create packages for Linux distributions based upon OpenJDK (e.g. Redhat, Ubuntu etc) to create RPMs for the JDK and JRE that include JavaFX. Those software distributors, then need to place the generated packages in their standard distribution code repositories (e.g. fedora/red hat network yum repositories). Currently this is not being done, but I would be quite surprised if Java 8 Linux packages did not include JavaFX when Java 8 is released in March 2014.
Update, Dec 2019:
Now that JavaFX has been separated from most binary JDK and JRE distributions (including Oracle's distribution) and is, instead, available as either a stand-alone SDK, set of jmods or as a library dependencies available from the central Maven repository (as outlined as https://openjfx.io), there is less of a need for standard Linux OpenJDK distributions to include JavaFX.
If you want a pre-built JDK which includes JavaFX, consider the Liberica JDK distributions, which are provided for a variety of platforms.
Advice on Deployment for Substantial Applications
I advise using Java's self-contained application deployment mode.
A description of this deployment mode is:
Application is installed on the local drive and runs as a standalone
program using a private copy of Java and JavaFX runtimes. The
application can be launched in the same way as other native
applications for that operating system, for example using a desktop
shortcut or menu entry.
You can build a self-contained application either from the Oracle JDK distribution or from an OpenJDK build which includes JavaFX. It currently easier to do so with an Oracle JDK.
As a version of Java is bundled with your application, you don't have to care about what version of Java may have been pre-installed on the machine, what capabilities it has and whether or not it is compatible with your program. Instead, you can test your application against an exact Java runtime version, and distribute that with your application. The user experience for deploying your application will be the same as installing a native application on their machine (e.g. a windows .exe or .msi installed, an OS X .dmg, a linux .rpm or .deb).
Note: The self-contained application feature was only available for Java 8 and 9, and not for Java 10-13. Java 14, via JEP 343: Packaging Tool, is scheduled to again provide support for this feature from OpenJDK distributions.
Update, April 2018: Information on Oracle's current policy towards future developments
The Future of JavaFX and Other Java Client Roadmap Updates by Donald Smith, Sr. Director of Product Management, Oracle.
Java Client Roadmap Update - March 2018 an Oracle White Paper.
For me this worked.
$ sudo apt-get install openjfx
As a quick solution you can copy the JavaFX runtime JAR file and those referenced from Oracle JRE(JDK) or any self-contained application that uses JavaFX(e.g. JavaFX Scene Builder 2.0):
cp <JRE_WITH_JAVAFX_HOME>/lib/ext/jfxrt.jar <JRE_HOME>/lib/ext/
cp <JRE_WITH_JAVAFX_HOME>/lib/javafx.properties <JRE_HOME>/lib/
cp <JRE_WITH_JAVAFX_HOME>/lib/amd64/libprism_* <JRE_HOME>/lib/amd64/
cp <JRE_WITH_JAVAFX_HOME>/lib/amd64/libglass.so <JRE_HOME>/lib/amd64/
cp <JRE_WITH_JAVAFX_HOME>/lib/amd64/libjavafx_* <JRE_HOME>/lib/amd64/
just make sure you have the gtk 2.18 or higher
Also answering this question:
Where can I get pre-built JavaFX libraries for OpenJDK (Windows)
On Linux its not really a problem, but on Windows its not that easy, especially if you want to distribute the JRE.
You can actually use OpenJFX with OpenJDK 8 on windows, you just have to assemble it yourself:
Download the OpenJDK from here: https://github.com/AdoptOpenJDK/openjdk8-releases/releases/tag/jdk8u172-b11
Download OpenJFX from here: https://github.com/SkyLandTW/OpenJFX-binary-windows/releases/tag/v8u172-b11
copy all the files from the OpenFX zip on top of the JDK, voila, you have an OpenJDK with JavaFX.
Update:
Fortunately from Azul there is now a OpenJDK+OpenJFX build which can be downloaded at their community page: https://www.azul.com/downloads/zulu-community/?&version=java-8-lts&os=windows&package=jdk-fx
Try obuildfactory.
There is need to modify these scripts (contains error and don't exactly do the "thing" required), i will upload mine scripts forked from obuildfactory in next few days. and so i will also update my answer accordingly.
Until then enjoy, sir :)
I needed to run a .jar in Windows which required Java FX. I also didn't need the JDK part.
Note: I didn't bother changing the PATH/JAVA_HOME variables because it wasn't needed in my case, for a more complete walkthrough see: How to install OpenJDK 11 on Windows?
Download OpenJDK and Java FX (jmods) (version 17.0.2 for this example)
https://jdk.java.net/17/
https://gluonhq.com/products/javafx/
Unzip the downloaded files. Copy/move the .jmod files from the Java FX directory to the OpenJDK dir (jmods subdirectory).
Create a JRE with jlink, use this web app to get the exact command line options:
https://justinmahar.github.io/easyjre/
PowerShell snippet:
$Version = '17.0.2'
$DownDir = 'path\to\dir\with\.zip'
$JdkDir = "jdk-${Version}"
$JavaFxDir = "javafx-jmods-${Version}"
$NewDir = "jre-${Version}+javafx"
$ProgramFilesDir = "$env:ProgramFiles\OpenJDK\${NewDir}"
Set-Location -Path $DownDir
# Unzip archives
Expand-Archive -Path "openjfx-${Version}_windows-x64_bin-jmods.zip" -Destination .
Expand-Archive -Path "openjdk-${Version}_windows-x64_bin.zip" -Destination .
# Create a custom runtime image using jlink, excluding all modules that start with 'jdk.'
Copy-Item -Path "${JavaFxDir}\*.jmod" -Destination "${JdkDir}\jmods"
$Mods = Get-Item -Path "$JdkDir\jmods\*.jmod" | ? { !($_.Name -like 'jdk.*') }
$Mods = $Mods.Name -replace '.jmod$' -join ','
& "${JdkDir}\bin\jlink.exe" --output $NewDir --compress=2 --no-header-files --no-man-pages --module-path "${JdkDir}\jmods" --add-modules $Mods
# (Optional) Delete unzipped directories
Remove-Item -Path $JdkDir,$JavaFxDir -Recurse
# Test if the .jar works
$jar = Get-Item "\path\to\.jar"
& "${NewDir}\bin\javaw.exe" -jar $jar
# (Optional) Copy the new directory to Program Files (requires admin privileges), zip it to distribute to other computers and delete it
Copy-Item -Path $NewDir -Destination $ProgramFilesDir -Recurse
Compress-Archive -Path $NewDir -DestinationPath "openjdk-${Version}_jre+javafx_windows-x64_bin.zip"
Remove-Item -Path $NewDir -Recurse
# (Optional) Create shortcut in Desktop
$Lnk = "$env:USERPROFILE\Desktop\Shortcut.lnk"
$WshShell = New-Object -ComObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut($Lnk)
$Shortcut.TargetPath = "${ProgramFilesDir}\bin\javaw.exe"
$Shortcut.WorkingDirectory = $jar.DirectoryName
$Shortcut.Arguments = '-jar "' + $jar.FullName + '"'
$Shortcut.Save()
According to Oracle integration of OpenJDK & javaFX will be on Q1-2014 ( see roadmap : http://www.oracle.com/technetwork/java/javafx/overview/roadmap-1446331.html ). So, for the 1st question the answer is that you have to wait until then. For the 2nd question there is no other way. So, for now go with java swing or start javaFX and wait
I used Amazon Coretto JDK. This had all FX Components I needed.

Building JavaFX 2.0 App on Mac, deploying on Windows

What are your strategies for building your JavaFX application on Mac and deploying on Windows ? I am currently having issues with how to bundle up my application so that it is double clickable on both platforms. I have tried using the ant-tools, but the jar file produced complain that JavaFX 2.1 needs to be installed on my Mac (how can I place the JavaFX 2.1 DP distribution so that the double-clickable Jar knows where to find it ?)
On the Windows side, Java7u3 is installed, which "comes with" Java FX 2.0.3. I need for the application to be able to execute as a double clickable JAR file here as well.
Any suggestions as to how this is set up ? I am using Maven to build my project. The more details you can provide the better.
Since 2.1 release the only (official) way to install JavaFX on Mac is cobundle installation with Java 7u4 (opposite to developers preview versions being published in zip archives).
If JavaFX on Mac was installed this way then jar with JavaFX can be run by double-click.
On Windows same jar by double-click will ask to install "JavaFX runtime" and will start if one is present already.
N.B.: in 2.2 release Mac/Linux would start to support jnlp (WebStart) run (already supported on Windows) which may suit you even better.

Building Hibernate 3.2.0 on Linux OS 64 bit

I need to build the jars for Hibernate 3.2.0 but I am having trouble finding directions. I am trying to follow along in the tutorial but it is wanting me to create classes and other files, is that really necessary just to compile the jars? I need to compile on a 64 bit Linux CentOS machine.
Also the directions in the tutorial are for 3.5 or 3.6 and they say to use maven but when I downloaded the source it came with a build.xml file, so am I supposed to use ant? and when I try ant it tells me I am missing antl/tools.
I am a brand new intern and I am just trying to figure this out so I can do what is asked of me. Any help would be greatly apprecited.
Thank You in advance.
For branch 3.2, you'll just need to run the run.sh (Linux) or run.bat (Windows). It should be enough. But keep in mind that 3.2 is an old branch. If you are developing a new application, consider using a newer version (3.6, for instance).
Binaries for Hibernate 3.2 can be downloaded from their SourceForge project page. Hibernate distributions typically contain hibernate3.jar, dependent jars, reference manuals and source files. The jars can be used on any JVM with version higher than 1.5 (or 1.4, I don't remember precisely) available on 64-bit CentOS.

Resources