gpt4 book ai didi

java - HelloGET 不适用于 GWT 2.7+NB

转载 作者:行者123 更新时间:2023-11-30 06:25:09 25 4
gpt4 key购买 nike

我正在尝试更新我的 GWT + NetBeans 框架,安装 GWT 2.7。我尝试的第一件事是运行 GWT4NB 向导创建的示例应用程序。
简单来说是行不通的。它编译正常,但是,当我运行该项目时,网页在任何浏览器中都显示为空。
同一个项目使用 GWT 2.5 可以完美运行。
运行浏览器的调试器我收到以下错误:
http://localhost:8080/WebApplication1/org.yournamehere.Main/org.yournamehere.Main.nocache.js 加载失败

我正在使用:GWT 2.7、java 1.8、NetBeans 8.0.2、Ubuntu 14-64

创建的welcomeGWT.html:

<html>
<head>
<meta name='gwt:module' content='org.yournamehere.Main=org.yournamehere.Main'>
<title>Main</title>
<script type="text/javascript" src="org.yournamehere.Main/org.yournamehere.Main.nocache.js"></script>
</head>
<body>
<iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
</body>

Main.gwt.xml:

<module>
<inherits name="com.google.gwt.user.User"/>

<!-- Inherit the default GWT style sheet. You can change -->
<!-- the theme of your GWT application by uncommenting -->
<!-- any one of the following lines. -->
<!-- <inherits name='com.google.gwt.user.theme.standard.Standard'/> -->
<!-- <inherits name="com.google.gwt.user.theme.chrome.Chrome"/> -->
<!-- <inherits name="com.google.gwt.user.theme.dark.Dark"/> -->

<entry-point class="org.yournamehere.client.MainEntryPoint"/>

<!-- Do not define servlets here, use web.xml -->

有什么想法吗?

最佳答案

我在使用 GWT4NB 向导时遇到了类似的问题,我必须移动一些东西才能使其正常工作(我从设置新项目的经验中知道这一点,并且还完全致力于几个项目)。您有几个选择,这些选择取决于以下几点:

  1. 您的构建工具很重要。使用该向导最终意味着 Ant 将成为您的构建工具。也许你应该考虑 Gradle 或 Maven。使用这些构建工具来设置 GWT 项目非常容易。

  2. 此外,我还使用 Eclipse 插件来让 GWT 项目正常工作。在 Eclipse 中创建完项目后,我将其导入 Netbeans 并继续工作。

干杯。

关于java - HelloGET 不适用于 GWT 2.7+NB,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47327179/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com