More information would be great, are you trying to deploy with native packaging, are you using webstart, etc..
Anyhow, based on your question, I'd suggest you take a look at letting Netbeans help you with the signing etc.
I prefer creating an FXML based application, that way the code & interface stays separate. In this case I'm just throwing in some HTML directly.
I've deployed a number of JavaFX applications using WebView with no problem. If you're deploying locally, I wouldn't worry about the certificate expiring at this point, unless you're using webstart.
Here's some sample code that works fine, it uses a WebView & accesses the internet to get jQuery.
The main class:
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
/**
*
* @author Sam
*/
public class WebViewTestJDK8 extends Application {
@Override
public void start(Stage stage) throws Exception {
Parent root = FXMLLoader.load(getClass().getResource("FXMLDocument.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
launch(args);
}
}
The controller:
import java.net.URL;
import java.util.ResourceBundle;
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.web.WebEngine;
import javafx.scene.web.WebView;
public class FXMLDocumentController implements Initializable {
@FXML
private WebView webView;
@Override
public void initialize(URL url, ResourceBundle rb) {
Platform.runLater(new Runnable() {
@Override
public void run() {
String html = "<html>\n"
+ "<head>\n"
+ "<title>jQuery Hello World</title>\n"
+ " \n"
+ "<script type=\"text/javascript\" src=\"http://code.jquery.com/jquery-1.2.6.min.js\"></script>\n"
+ " \n"
+ "</head>\n"
+ " \n"
+ "<body>\n"
+ " \n"
+ "<script type=\"text/javascript\">\n"
+ " \n"
+ "$(document).ready(function(){\n"
+ " $(\"#msgid\").html(\"Hello World by JQuery\");\n"
+ "});\n"
+ " \n"
+ "</script>\n"
+ " \n"
+ "Hello World by HTML\n"
+ " \n"
+ "<div id=\"msgid\">\n"
+ "</div>\n"
+ " \n"
+ "</body>\n"
+ "</html>";
webView.getEngine().loadContent(html);
}
});
}
}
The FXML:
<?xml version="1.0" encoding="UTF-8"?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.web.*?>
<AnchorPane id="AnchorPane" fx:id="pane" prefHeight="367.0" prefWidth="446.0" xmlns:fx="http://javafx.com/fxml" fx:controller="webviewtest.jdk8.FXMLDocumentController">
<children>
<WebView fx:id="webView" prefHeight="367.0" prefWidth="446.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
Hope it helps!