ubuntu 怎么创建idea的idea快捷方式式阿

Ubuntu添加Intellij IDEA启动器_小组_ThinkSAAS
Ubuntu添加Intellij IDEA启动器
Ubuntu添加Intellij IDEA启动器
1. 创建/usr/share/applications/idea.desktop文件。
2.idea.desktop文件内容如下:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Name=IntelliJ IDEA
GenericName=Java IDE
Comment=IntelliJ IDEA is a code-centric IDE focused on developer productivity. The editor deeply understands your code and knows its way around the codebase, makes great suggestions right when you need them, and is always ready to help you shape your code.
Exec=/usr/local/lib/idea/bin/idea.sh
Icon=/usr/local/lib/idea/bin/idea.png
Terminal=false
Type=Application
Categories=DIDE
3. 更复杂的例子可以参照目录/usr/share/applications/下的其他desktop文件。
PHP开发框架
开发工具/编程工具
服务器环境
ThinkSAAS商业授权:
ThinkSAAS为用户提供有偿个性定制开发服务
ThinkSAAS将为商业授权用户提供二次开发指导和技术支持
官方1群:【已满】
让ThinkSAAS更好,把建议拿来。
关注微信,更好学习如何在Linux的桌面上创建快捷方式或启动器
评论: &收藏: &&&&
如果在Linux桌面系统中你经常使用一个程序,你可能想去创建一个&桌面快捷方式&,以便于你在桌面只要点击一下快捷方式就可以启动它。虽然不少带有图形界面的程序会在安装时自动在桌面上创建快捷方式,还有一些图形界面程序或者命令行程序可能需要你手动创建快捷方式。
在这个教程里,我将告诉你如何在不同的Linux桌面上添加桌面快捷方式。(译注:其实除了作者所述的这些方法外,各种桌面上也还有更简便的方法,大家可以评论分享自己的经验)
一个桌面快捷方式是由内含该APP元信息(例如,app的名字,启动命令或者图标位置等)的.desktop文件所表示的。桌面快捷方式文件放置于/usr/share/applications或者~/.local/share/applications处。前一个目录存储的桌面快捷方式每个用户都可以使用,而后一个目录则含有仅仅为特定用户创建的快捷方式。
使用命令行创建桌面快捷方式
要为特定程序或命令创建桌面快捷方式,你可以使用任意文本编辑器创建一个.desktop文件,然后把它放到/usr/share/applications或者~/.local/share/applications处。一个典型的.desktop文件如下图所示。
[Desktop Entry]
Encoding=UTF-8
Version=1.0
#version of an app.
Name[en_US]=yEd
#name of an app.
GenericName=GUI Port Scanner
#longer name of an app.
Exec=java -jar /opt/yed-3.11.1/yed.jar
#command used to launch an app.
Terminal=false
#whether an app requires to be run in a terminal
Icon[en_US]=/opt/yed-3.11.1/icons/yicon32.png
#location of icon file.
Type=Application
Categories=ANS
#categories in which this app should be listed.
Comment[en_US]=yEd Graph Editor
#comment which appears as a tooltip.
除了手动创建.desktop文件之外,依据你的系统所采用的桌面环境的不同有不同的创建应用快捷方式的方法,接下来的教程我将为你讲解。
在GNOME桌面下创建快捷方式
在GNOME桌面环境下,你可以使用gnome-desktop-item-edit轻松创建创建一个桌面快捷方式。
$ gonme-desktop-item-edit ~/.local/share/applications --create-new
在这个例子中,gnome-desktop-item-edit会在目录~/.local/share/applications中自动创建一个桌面启动器文件。若是想自定义快捷方式图标或者其它信息,你可以手动编辑.desktop文件。
如果在你的系统上,gnome-desktop-item-edit不可用(例如,在Ubuntu上),你可以依照下面方式安装:
$ sudo apt-get install --no-install-recommends gnome-panel
在KDE桌面创建快捷方式
kickoff是KDE桌面默认的应用启动器。可以直接在kickoff里添加新的应用启动快捷方式。
首先右击位于你桌面左下角处的kickoff图标,然后选择菜单&编辑应用&。
在你要创建快捷方式的合适分类处(例如, "Utilities")右击,点击位于顶部的&新条目&按钮,键入应用的名字。
最后,填上使用快捷方式启动app时所需的元信息即可。
在xfce桌面上创建快捷方式
假如你使用xfce桌面,在桌面空白处右击,选择&创建启动器&按钮。然后填上快捷方式的详细信息就可以了。
在Cinnamon桌面上创建快捷方式
假如使用的是Linux Mint的Cinnamon桌面,你可以在桌面空白处右击鼠标,选择菜单&创建启动器&而创建一个应用启动器。
在LXDE桌面上创建快捷方式
在LXDE桌面,你只需在桌面空白处右击一下鼠标,然后选择&创建新快捷方式&就可以咯。
译者: 校对:
原创翻译, 荣誉推出
上一篇:下一篇:
: 对于rhel还好说,可以直接在桌面右击-创建启动器,ubuntu中右键都取消了这一选项,还得去于/usr/share/applications下创建,真心不方便,不知道开发人员怎么想的。
分享到微信朋友圈
打开微信,点击底部的“发现”,
使用“扫一扫”将网页分享至朋友圈。30分钟groovy快速入门并掌握(ubuntu 14.04+IntelliJ 13) - Linux服务器 - 次元立方网 - 电脑知识与技术互动交流平台
30分钟groovy快速入门并掌握(ubuntu 14.04+IntelliJ 13)
本文适合于不熟悉 Groovy,但想快速轻松地了解其基础知识的 Java开发人员。了解 Groovy 对 Java 语法的简化变形,学习 Groovy 的核心功能,例如本地集合、内置正则表达式和闭包。编写第一个 Groovy 类,然后学习如何使用 JUnit 轻松地进行测试。借助功能完善的 Groovy 开发环境和使用技能,您将轻松完成本教程的学习。最重要的是,您将学会如何在日常 Java 应用程序开发中联合使用 Groovy 和 Java 代码。
阅读本文的前提条件:为了从本教程得到最大收获,您应该熟悉 Java 语法和在 Java 平台上进行面向对象开发的基本概念。如果熟悉C#的话,基本上也能很快上手。
本文预计时长:30分钟
一、groovy简介和环境搭建
本机环境:
ubuntu 14.04 64bit
JDK 1.7.67
IDE : intellij& idea &13.1
1、groovy简介
其官方介绍为,Groovy...
is an agile and&dynamic language&for the&Java Virtual Machine builds upon the strengths of Java but has&additional power features&inspired by languages like Python,
and Smalltalk makes&modern programming features&available to Java developers with&almost-zero learning curve provides the ability to&statically type check&and&statically compile&your code for robustness and performance supports&Domain-Specific Languages&and other compact syntax so your code becomes&easy to read and maintain makes writing shell and build scripts easy with its&powerful processing primitives, OO abilities and an Ant DSL increases developer productivity by&reducing scaffolding code&when developing web, GUI, database or console applications simplifies testing&by supporting unit testing and mocking out-of-the-box seamlessly&integrates with all existing Java classes and libraries compiles straight to Java bytecode so you can use it anywhere you can use Java
简单说来:Groovy是一种运行在JVM上的动态语言,它吸取了Python,和Smalltalk等语言的优点,在Java语言的基础之上增加了许多特色功能;对于Java开发人员来说掌握Groovy是没有什么太大障碍的;相比 Java 而言,语法更易懂,更易上手,更易调试;无缝的集成了Java 的类和库;编译后的.groovy也是以class的形式出现的。
2、groovy下载
网址:http://groovy.codehaus.org/Download
目前最新稳定版为Groovy 2.3 ()
这里下载 :
Download zip:&Binary Release&:groovy-binary-2.3.6.zip
Download documentation:&JavaDoc and zipped online documentation&:groovy-docs-2.3.6.zip
3、groovy环境配置和Hello World!
1)首先解压:
unzip groovy-binary-2.3.6.zip #解压groovy
unzip groovy-docs-2.3.6.zip #解压docs
2) 进入到Groovy Shell命令界面:
amosli@amosli-ThinkPad:~/developsoft/language/groovy/groovy-2.3.6/bin$ ./groovysh
Groovy Shell (2.3.6, JVM: 1.7.0_67)
Type ':help' or ':h' for help.
-------------------------------------------------------------------------------
groovy:000& println 'hello world!'
hello world!
groovy:000& :h
在Groovy Shell里不必定义class可以直接写代码,如下面进行一个for循环:
groovy:000& for(i=0;i&10;i++){
groovy:001& println('i:'+i);}
注意这里,你可以发现i是没有指定int类型的,这里也是写法上也是比较随意的。
3)、将groovy加入到环境变量(可选)
将解压后的groovy拷到/usr/local/groovy 目录下:
root@amosli-ThinkPad:/usr/local/groovy# cp -r
/home/amosli/developsoft/language/groovy/groovy-2.3.6 .
将groovy路径拷到/etc/profile里:
gedit /etc/profile
#使用gedit打开profile,也可以使用vi等工具
将下面内容拷到profile里最后位置:
export GROOVY_HOME=/usr/local/groovy/groovy-2.3.6
export PATH=$GROOVY_HOME/bin:$PATH:.
export GROOVY_HOME
export PATH
全部的profile内容:
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
if [ '$PS1' ]; then
if [ '$BASH' ] && [ '$BASH' != '/bin/sh' ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='h:w$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
if [ '`id -u`' -eq 0 ]; then
PS1='# '
PS1='$ '
# The default umask is now handled by pam_umask.
# See pam_umask(8) and /etc/login.defs.
if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*. do
if [ -r $i ]; then
JAVA_HOME=/usr/local/java/jdk1.7.0_67
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH
export GROOVY_HOME=/usr/local/groovy/groovy-2.3.6
export PATH=$GROOVY_HOME/bin:$PATH:.
export GROOVY_HOME
export PATH
更新环境变量:
source /etc/profile
验证是否成功:
# groovy -version
Groovy Version: 2.3.6 JVM: 1.7.0_67 Vendor: Oracle Corporation OS:
打开groovyConsole:
4)、使用IDE进行开发(这里以Intellij idea 13.1为例)
1. Enable the plugin
Before you create your first Groovy application make sure Groovy plugin is enabled in&Settings&&&Plugins.
2. Create a new project
Open&Project Wizard&and select Scala template. Since Groovy requires Java you have to specify the&Project SDK.
If you create a Groovy project for the first time IntelliJ IDEA will offer you to create Groovy SDK library. Press&Create&button and choose directory with a Groovy SDK.
The IDE will create an empty project.
3. Create a new class
The easiest way to create Groovy class or script is to use&Ctrl&+&N&shortcut from&Project View&or&Navigation Bar.
Choose between class, interface, enum and annotation with&Up&and&Down&arrows.
Let's create a class with a method returning&'Hello, world!'&string.
4. Create a new script
Now we can create a script file via&Ctrl&+&N&shortcut.
Choose between script and GroovyDSL script with&Up&and&Down&arrows.
Now we can create an instance of our class and invoke&hello&method.
5. Run the project
In order to run the application you can manually create a Run configuration via&Run&&&Edit configurations&or run the active script automatically by pressing&Ctrl&+&Shift&+&F10&shortcut.
&使用Groovy Shell :
打开Tools--&Groovy Shell...
使用Groovy Console :
打开Tools--&Groovy Console...
二、Groovy初探
1、Groovy和Java对比
Groovy 的松散的 Java 语法允许省略分号和修改符。 除非另行指定,Groovy 的所有内容都为&public。 Groovy 允许定义简单脚本,同时无需定义正规的&class&对象。 Groovy 在普通的常用 Java 对象上增加了一些独特的方法和快捷方式,使得它们更容易使用。 Groovy 语法还允许省略变量类型。
延伸阅读:
1 前言Ansible是自动化运维的工具,基于Python开发,...
本教程为 李华明 编著的iOS-Cocos2d游戏开发系列教程:教程涵盖关于i......
专题主要学习DirectX的初级编程入门学习,对Directx11的入门及初学者有......
&面向对象的JavaScript&这一说法多少有些冗余,因为JavaScript 语言本......
Windows7系统专题 无论是升级操作系统、资料备份、加强资料的安全及管......

我要回帖

更多关于 idea创建类快捷键 的文章

 

随机推荐