Commit 97c5c835 authored by Andrew Goodbody's avatar Andrew Goodbody
Browse files

Check for and use bundled JRE for jAlbum export if present

Add a check for the bundled Java Runtime Environment that is sometimes
shipped with jAlbum packages. This JRE will contain all required
dependencies for jAlbum when the system JRE may be missing some. If
found invoke jave from this bundled JRE.
If the bundled JRE cannot be found fallback to the system JRE which
was the behaviour before this commit.
parent ad503c2a
......@@ -226,6 +226,17 @@ void JAlbumWindow::slotNewAlbum()
QString javaExecutable;
QDir jrePath = QFileInfo(d->jalbum->jarPath().path()).dir();
if ("jre64/bin/")))
javaExecutable = jrePath.filePath(QString::fromLatin1("java"));
javaExecutable = QString::fromLatin1("java");
QStringList args;
......@@ -234,7 +245,7 @@ void JAlbumWindow::slotNewAlbum()
QProcess process;
process.startDetached(QString::fromLatin1("java"), args);
process.startDetached(javaExecutable, args);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment