/**
- This class is intended to start application as AWT application before initializing
- JavaFX application. JavaFX does not support dock-icon-less application so we are
- creating JavaFX application from AWT application so that we can achieve the desired
- functionality.
- */
public class AWTMain {
public static void main(String[] args) {
// This is awt property which enables dock-icon-less
// applications
System.setProperty("apple.awt.UIElement", "true");
java.awt.Toolkit.getDefaultToolkit();
// This is a call to JavaFX application main method.
// From now on we are transferring control to FX application.
FXMain.main(args);
}
}
B4JPackager11 Version 1.15
Exe name: progwhizpdfviewer.exe
InputJar: E:\b4jProducts\ShowPDFinB4J\Objects\progwhizpdfviewer.jar
Running: E:\B4JPRO~1\B4JPAC~1\B4JPAC~1\Objects\temp\FindDosPath.exe
Running: C:\java11\jdk-11.0.1\bin\jar
main._appstart (java line: 114)
java.lang.RuntimeException: java.lang.IllegalStateException: No match found
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:120)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at anywheresoftware.b4a.keywords.Common$3.run(Common.java:1086)
at anywheresoftware.b4a.keywords.SimpleMessageLoop.runMessageLoop(SimpleMessageLoop.java:30)
at anywheresoftware.b4a.StandardBA.startMessageLoop(StandardBA.java:26)
at anywheresoftware.b4a.keywords.Common.StartMessageLoop(Common.java:153)
at com.progwhiz.b4jpackager.main._appstart(main.java:114)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:91)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:78)
at com.progwhiz.b4jpackager.main.main(main.java:28)
Caused by: java.lang.IllegalStateException: No match found
at java.base/java.util.regex.Matcher.group(Matcher.java:645)
at anywheresoftware.b4a.keywords.Regex$MatcherWrapper.Group(Regex.java:154)
at com.progwhiz.b4jpackager.main$ResumableSub_FindPackageName.resume(main.java:527)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:136)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:85)
... 13 more
package com.progwhiz.pdfmacviewer;
import anywheresoftware.b4a.BA;
public class main extends javafx.application.Application{
public static main mostCurrent = new main();
public static BA ba;
static {
ba = new anywheresoftware.b4j.objects.FxBA("com.progwhiz.pdfmacviewer", "com.progwhiz.pdfmacviewer.main", null);
ba.loadHtSubs(main.class);
if (ba.getClass().getName().endsWith("ShellBA")) {
ba.raiseEvent2(null, true, "SHELL", false);
ba.raiseEvent2(null, true, "CREATE", true, "com.progwhiz.pdfmacviewer.main", ba);
}
}
public static Class<?> getObject() {
return main.class;
}
public static void main(String[] args) {
launch(args);
}
public void start (javafx.stage.Stage stage) {
try {
if (!false)
System.setProperty("apple.awt.UIElement", "true");
System.setProperty("prism.lcdtext", "false");
anywheresoftware.b4j.objects.FxBA.application = this;
anywheresoftware.b4a.keywords.Common.setDensity(javafx.stage.Screen.getPrimary().getDpi());
anywheresoftware.b4a.keywords.Common.LogDebug("Program started.");
initializeProcessGlobals();
anywheresoftware.b4j.objects.Form frm = new anywheresoftware.b4j.objects.Form();
frm.initWithStage(ba, stage, 600, 400);
ba.raiseEvent(null, "appstart", frm, (String[])getParameters().getRaw().toArray(new String[0]));
} catch (Throwable t) {
BA.printException(t, true);
System.exit(1);
}
}
Interface
None
Windowless application that provides no graphical feedback. All script output is redirected to STDERR.
Special Options
Runs in background: If selected, the application registers itself as a User Interface Element (LSUIElement) and will not appear in the Dock when launched.
Remain running after completion: This option tells the application to remain open after the script has executed.
java -Dapple.awt.UIElement=true -Dapple.awt.headless=true -Djava.awt.headless=true -jar YourJar.jar
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?