summaryrefslogtreecommitdiff
path: root/pdf-over-gui/src/main/java
diff options
context:
space:
mode:
authorAndreas Abraham <aabraham@iaik.tugraz.at>2018-03-21 16:35:44 +0100
committerAndreas Abraham <aabraham@iaik.tugraz.at>2018-03-21 16:35:44 +0100
commit823751ad89497eddc5ed2e76d3be63dcc0c357b8 (patch)
tree907530cb817a4ba085225583d3aec1d769980b2d /pdf-over-gui/src/main/java
parent6c0b2c9ed89f39f2d0606c113173645476de69b6 (diff)
downloadpdf-over-823751ad89497eddc5ed2e76d3be63dcc0c357b8.tar.gz
pdf-over-823751ad89497eddc5ed2e76d3be63dcc0c357b8.tar.bz2
pdf-over-823751ad89497eddc5ed2e76d3be63dcc0c357b8.zip
postinstall scripts changed, error message
Diffstat (limited to 'pdf-over-gui/src/main/java')
-rw-r--r--pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
index 31128423..9cf917bd 100644
--- a/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
+++ b/pdf-over-gui/src/main/java/at/asit/pdfover/gui/Main.java
@@ -20,10 +20,13 @@ import java.io.File;
import java.io.IOException;
import java.net.URL;
+import javax.swing.JOptionPane;
+
import org.apache.log4j.PropertyConfigurator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.asit.pdfover.gui.utils.Messages;
import at.asit.pdfover.gui.workflow.StateMachineImpl;
/**
@@ -54,6 +57,7 @@ public class Main {
// }
// log.info("===== Starting " + Constants.APP_NAME_VERSION + " ====="); //$NON-NLS-1$ //$NON-NLS-2$
+ try {
File configDir = new File(Constants.CONFIG_DIRECTORY);
if (!configDir.exists()) {
@@ -76,7 +80,15 @@ public class Main {
log.debug("Ended stateMachine ..."); //$NON-NLS-1$
-
+ }
+ catch (Throwable e) {
+
+ log.error("Error wrong Java Architecture, please re-install pdf-over "); //$NON-NLS-1$
+ log.error(e.getMessage());
+ JOptionPane.showMessageDialog(null,
+ "Invalid Java Architecture! Please re-install the latest version of PDF-Over", //$NON-NLS-1$
+ null, JOptionPane.ERROR_MESSAGE);
+ }
// Workaround for remaining AWT-Shutdown thread on OSX
System.exit(0);