简体   繁体   English

Java Vaadin IntelliJ想法

[英]Java Vaadin IntelliJ Idea

I use vaadin framework in Java. 我在Java中使用vaadin框架。 When I use addComonent to Window(window.addComponent()) , program doesn't see method addComponent . 当我将addComonent用于Window(window.addComponent()) ,程序看不到方法addComponent What is problem? 怎么了

Try including the JAR via Project Structure settings ( tab Libraries ). 尝试通过“项目结构”设置(选项卡“库”)包含JAR。 If that doesn't help you try checking this step by step guide how to set up Vaadin with IDEA: 如果这样做没有帮助,请尝试逐步检查此指南,以了解如何使用IDEA设置Vaadin:

1) Download the Vaadin JAR 1)下载Vaadin JAR

2) If not already done, install a Tomcat server 2)如果尚未完成,请安装Tomcat服务器

3) Start IntelliJ and create new project from scratch ( all steps below are performed with IntelliJ 9 ) 3)启动IntelliJ并从头开始创建新项目(以下所有步骤均使用IntelliJ 9执行)

4) Type of project is Java Module and as desired technology you select Web Application. 4)项目类型为Java模块,并根据需要选择Web应用程序。 This will create the web folder, including the WEB-INF dir and a web.xml file 这将创建Web文件夹,包括WEB-INF目录和web.xml文件。

5) Create a web/WEB-INF/lib folder and place the Vaadin JAR into that folder 5)创建一个web / WEB-INF / lib文件夹,并将Vaadin JAR放入该文件夹

6) Goto Project Structure | 6)转到项目结构| Modules and let your module depend on the Vaadin JAR. 模块,让您的模块依赖Vaadin JAR。 Mark it as export 将其标记为导出

7) Create a HelloWorld class and adjust your web.xml file, as described in the book of Vaadin 7)创建一个HelloWorld类,并调整您的web.xml文件,如Vaadin书中所述

8) To run/debug, create a new "Tomcat Server" configuration. 8)要运行/调试,请创建一个新的“ Tomcat服务器”配置。 If not yet present, configure a Tomcat server by providing the link to the installation dir of your Tomcat server 如果尚不存在,请通过提供指向Tomcat服务器安装目录的链接来配置Tomcat服务器

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM