小编use*_*778的帖子

如何在DesktopApp中使用JavaFX WebView和本地文件?

当我在eclipse中使用它时,我的webview就像魅力一样,但只要我将应用程序打包到一个jar文件中就会抛出以下错误:

This page contains the following errors:
error on line 33 at column 26: StartTag: invalid element name
Below is a rendering of the page up to the first error.
Run Code Online (Sandbox Code Playgroud)

这是HTML文件

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="EN">
    <head>
    <style>
        html,body {
            height: 99%;
            width: 99%;
        }
        #map {
            width: 100%;
            height: 100%;
            border: 1px solid black;
        }   
    </style>
    <script src='http://openlayers.org/api/OpenLayers.js'></script>
    </head>
    <body>
        <div id='map'></div>
        <script type="text/javascript">
            var map = new OpenLayers.Map("map",{projection:"EPSG:3857"});
            var …
Run Code Online (Sandbox Code Playgroud)

desktop-application executable-jar webview

6
推荐指数
1
解决办法
1万
查看次数