eclipse+spket+Extjs4.2.1开发环境搭建
一、开发工具配置
1、http://www.eclipse.org/downloads/下载Eclipse,解压。
2、http://spket.com/download.html下载Plugin,解压后覆盖到Eclipse的目录。
3、启动Eclipse,选择window→proference→spket→javascriptprofiles→new (输入Ext JS4.2.1)
4、Add libary(选择ExtJS)。
5、Add file(选择ext-all-dev.js),注意整个路径不能出现中文。
6、选中Ext JS 4.2.1,设置默认。
7、将 js默认打开方式设为 spket。(如果不成功,请重复检查上面的步骤,重点检查第6步,设置默认成功之后字体明显变黑)
8、重启Eclipse。
9、新建javascript文件,输入Ext+. 则会出现自动提示
如果没有出现自动提示则右击你的JS文件,有个Open with - 选择spket JavaScript Editor。 如果仍旧没有出现提示则可以通过在项目文件上点击右键,选择“Reload Javascript Profiles”菜单,对javascript文件重新加载。
二、ExtJS开发环境搭建:
(1) 下载Ext开发包,下载地址:http://extjs.org.cn/
(2) 将Ext开发包copy到eclipse项目的/WebRoot目录下
注意:不需要整个Ext开发包全部导入,这样很容易造成eclipse卡死,因为eclipse会自动检测js的合法性,会占用大量的检测时间、cpu和内存。通常普通的开发只需要用到\extjs-4.2.1\resources文件包、\extjs-4.2.1\ext-all.js这两个资源就可以,需要中文化再导入\extjs-4.2.1\locale\ext-lang-zh_CN.js 就可以了
(3) 在web页面中通过<script>标签引入ext的库文件。(注意引入顺序)
Extjs4.0开始比以往有些变化,用起来麻烦不小。与以前的引入三个文件不同,现在的4.0只要引用两个文件就行了。
- <link rel="stylesheet" type="text/css" href="extjs-4.2.1/resources/css/ext-all.css"> // 引入样式文件
- <script type="text/javascript" src="extjs-4.2.1/bootstrap.js" ></script>
- <script type="text/javascript" src="ext-4.2.1/locale/ext-lang-zh_CN.js"></script> // 中文化
(4) 调用Ext.onReady()初始化组件
<script>
Ext.onReady(function(){
…///在这里面创建及使用ext控件
});
</script>
三、hello word 实例
hellowrod.js
- (function()
- {
- Ext.onReady(function()
- {
- Ext.Msg.alert("hello wrod!"); //弹出hellowrod对话框 (实例化组件) } })();
html代码
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Insert title here</title>
- <link rel="stylesheet" type="text/css" href="./css/test.css">
- <link rel="stylesheet" type="text/css" href="./js/ext-4.2.1-gpl/resources/css/ext-all.css">//资源样式文件
- <script type="text/javascript" src="./js/ext-4.2.1-gpl/bootstrap.js"></script>
- <script type="text/javascript" src="./js/ext-4.2.1-gpl/locale/ext-lang-zh_CN.js"></script>//中文化
- <script type="text/javascript" src="./js/helloword.js"></script>
- </head>
- <body>
- </body>
- </html>
- <pre code_snippet_id="170450" snippet_file_name="blog_20140125_1_6261797"></pre>
- <pre></pre>
- <pre></pre>
- <pre></pre>
eclipse+spket+Extjs4.2.1开发环境搭建的更多相关文章
- spark-windows(含eclipse配置)下本地开发环境搭建
spark-windows(含eclipse配置)下本地开发环境搭建 >>>>>>注意:这里忽略JDK的安装,JDK要求是1.8及以上版本,请通过 java ...
- Hadoop项目开发环境搭建(Eclipse\MyEclipse + Maven)
写在前面的话 可详细参考,一定得去看 HBase 开发环境搭建(Eclipse\MyEclipse + Maven) Zookeeper项目开发环境搭建(Eclipse\MyEclipse + Mav ...
- [转]MonkeyRunner在Windows下的Eclipse开发环境搭建步骤(兼解决网上Jython配置出错的问题)
MonkeyRunner在Windows下的Eclipse开发环境搭建步骤(兼解决网上Jython配置出错的问题) 网上有一篇shangdong_chu网友写的文章介绍如何在Eclipse上配置M ...
- 转载 Elasticsearch开发环境搭建(Eclipse\MyEclipse + Maven)
概要: 1.使用Eclipse搭建Elasticsearch详情参考下面链接 2.Java Elasticsearch 配置 3.ElasticSearch Java Api(一) -添加数据创建索引 ...
- Elasticsearch开发环境搭建(Eclipse\MyEclipse + Maven)
前提是, Elasticsearch 编程API入门系列---说在前面的话 Eclipse下Maven新建项目.自动打依赖jar包(包含普通项目和Web项目) setting.xml配置文件 如何在M ...
- ExtJS4.x 开发环境搭建
需要的资源 ExtJS4.2 eclipse 开发环境搭建 在项目中国需要引用的文件: eclipse中有报错.需要处理的是ext-lang-zh_CN.js,中文编码不能识别.右键->属性-& ...
- Eclipse中Python开发环境搭建
Eclipse中Python开发环境搭建 目 录 1.背景介绍 2.Python安装 3.插件PyDev安装 4.测试Demo演示 一.背景介绍 Eclipse是一款基于Java的可扩展开发平台. ...
- Eclipse swt开发环境搭建
原料: eclipse swt.下载链接为: Eclipse 4.6.2 Release Build: 4.6.2 配置说明: Developing SWT applications using Ec ...
- Win7+Eclipse+Hadoop2.6.4开发环境搭建
Hadoop开发环境搭建 感谢参考网站:http://www.cnblogs.com/huligong1234/p/4137133.html 一.软件准备 JDK:jdk-7u80-windows-x ...
随机推荐
- 运行html代码
<html> <head> <meta http-equiv="Content-Type" content="text/html; char ...
- Exploratory Undersampling for Class-Imbalance Learning
Abstract - Undersampling is a popular method in dealing with class-imbalance problems, which uses on ...
- 如何用vs2010打开vs2013的项目?
众所周知,用vs2013打开vs2010十分简单,无须做什么. 从VS2010开始,不再制作专有的文件格式,这只是一个xml格式的文本文件,其中决定了解决方案的平台工具集和VS版本. 既然.sln只是 ...
- java语法基本知识3--this
this一般是出现在class中的方法中.同过new产生了一个对象,this就指向这个对象.
- 调试 zeromq 发现 accept 死循环
起因:在群里一个同学说使用 zeromq 的时候出了点儿问题,问题描述如下“router连接十几万客户端后,然后把router杀死,重启,这时候zeromq的某个线程99%的cpu,卡死了,再也接受不 ...
- jsp中的正则表达式
sp中${}----是EL表达式的常规表示方式目的是为了获取{}中指定的对象(参数.对象等)的值如:${user.name}<====>User user = (User)request( ...
- Your build settings specify a provisioning profile with the UUID, no provisioning profile
在Archive项目时,出现了“Your build settings specify a provisioning profile with the UUID “”, however, no suc ...
- initcall调用顺序
在解释initcall调用顺序, 先要理一下编译链接的知识. 每个.o文件都有自己的代码段, 数据段(存放初始化的全局变量), bss段(即未初始化的数据段) 在ld链接器将各.o文件的代码段和数据段 ...
- ubuntu下avd创建和文件传输
进入安卓官网下载安卓sdk并解压到指定路径 在命令行模式下进入安卓文件的toos文件夹下 android avd #在弹出的对话框中新建虚拟机 adb install ~/targetPath/hel ...
- 【LeetCode OJ】Maximum Depth of Binary Tree
Problem Link: https://oj.leetcode.com/problems/maximum-depth-of-binary-tree/ Simply BFS from root an ...