Java 如何开始在 Ubuntu Linux 上使用和开发?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/793071/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to start using and developing on Ubuntu Linux?
提问by Amr Elgarhy
I am a newbie Linux user who came from 10 years using windows OS, and developing in Microsoft languages.
I want to have a good experience in Linux world and developing on it.
First, I want to learn how to use this new OS, then how to start developing on it, I am interested in web applications, specially using Java/PHP because I have some experience in both and it will be a good start.
Second, I want to learn how to develop on it.
Are there any video tutorials to give me a good starting push?
any recommended books or references?
我是一名 Linux 新手,使用 Windows 操作系统已有 10 年,并使用 Microsoft 语言进行开发。
我想在 Linux 世界中拥有良好的经验并在其上进行开发。
首先,我想学习如何使用这个新操作系统,然后如何开始在它上面开发,我对 Web 应用程序感兴趣,特别是使用 Java/PHP,因为我在这两个方面都有一些经验,这将是一个好的开始。
其次,我想学习如何开发它。
有没有视频教程可以给我一个很好的入门推动?
有什么推荐的书籍或参考资料吗?
采纳答案by Elijah
Suggestions
建议
Environment Setup
环境设置
I would recommend you install a the JDK if you are doing Java development. Look herefor instructions on using apt to install the sun JRE.
Then, get yourself a decent IDE setup. Try Netbeansor Eclipse- both can be configured to work with php as well.
Also make sure you install php and Apache, here are some instructions.
Since it sounds like you are going for the classic LAMPsetup, you may as well install PostgreSQLor MySQL.
如果您正在进行 Java 开发,我建议您安装 JDK。看这里了解如何使用易安装太阳JRE的说明。
还要确保您安装了 php 和 Apache,这里有一些说明。
由于听起来您要使用经典的LAMP设置,您不妨安装PostgreSQL或MySQL。
That should get you running far enough to make videos, etc useful.
这应该能让你跑得足够远,让视频等有用。
Development Resources
开发资源
IDE Resources
IDE资源
Java
爪哇
- Java Antipatterns- Learn what not to do in Java.
- Apache Commons- Get libraries for common tasks in Java.
- Java Antipatterns- 了解在 Java 中不该做什么。
- Apache Commons- 获取 Java 中常见任务的库。
PHP
PHP
回答by EricSchaefer
Ubuntu Kung Fumight be a good start.
Ubuntu Kung Fu可能是一个好的开始。
回答by Skurmedel
Java development is something you can do with ease using Eclipse on Linux. PHP development is more or less the same as on Windows. Use a good text editor to write the PHP scripts.
Java 开发是您可以在 Linux 上使用 Eclipse 轻松完成的事情。PHP 开发或多或少与在 Windows 上相同。使用好的文本编辑器来编写 PHP 脚本。
Installing the required tools might differ from how it's done on Windows, but both PHP and Eclipse are available as packages in Ubuntu.
安装所需的工具可能与在 Windows 上的安装方式不同,但 PHP 和 Eclipse 在 Ubuntu 中都可以作为软件包使用。
回答by antik
Eclipse should run fine in Ubuntu.
Eclipse 应该在 Ubuntu 中运行良好。
Try some Java development in it to get yourself started.
尝试在其中进行一些 Java 开发以开始使用。
回答by vezult
Since both Java and PHP are cross platform, it seems your biggest task would be to familiarize yourself with GNU/Linux and tools related to web development, apache web server in particular. Here are a few things google gave me:
由于 Java 和 PHP 都是跨平台的,因此您最大的任务似乎是熟悉 GNU/Linux 和与 Web 开发相关的工具,尤其是 apache Web 服务器。以下是谷歌给我的一些东西:
http://www.micahcarrick.com/09-28-2007/web-development-linux.html
http://www.micahcarrick.com/09-28-2007/web-development-linux.html
Have fun.
玩得开心。
回答by WayneC
If you want to get your lamp setup pretty easily, you can take a look at Zend Server Community Edition. http://www.zend.com/products/server/downloads-all
如果您想轻松设置灯泡,可以查看 Zend Server Community Edition。http://www.zend.com/products/server/downloads-all
For development eclipse (as suggested above) with PDT (Php development tools) is pretty good http://www.eclipse.org/pdt/. I prefer Netbeans though. You could also use gedit with some plugins see this
对于带有 PDT(Php 开发工具)的开发 eclipse(如上所述)非常好http://www.eclipse.org/pdt/。不过我更喜欢 Netbeans。您还可以将 gedit 与某些插件一起使用,请参阅此
回答by troelskn
If I was to recommend one thing, it would be that you must learn to love the shell. It takes time to feel at home in, but it's well worth it.
如果我要推荐一件事,那就是你必须学会爱外壳。感觉像在家里一样需要时间,但这是非常值得的。
On a related theme - You might want to consider using emacs or vim as your editor, but that's more of a personal preference thing. Some people just like IDE's better.
在相关主题上 - 您可能想考虑使用 emacs 或 vim 作为您的编辑器,但这更多是个人喜好。有些人只是喜欢 IDE 更好。
You should probably focus on PHP, rather than Java. It's easier to get started with and it's much more true to the Linux tradition (Whatever that means) than Java is.
您可能应该专注于 PHP,而不是 Java。它更容易上手,而且比 Java 更符合 Linux 传统(无论这意味着什么)。
回答by Nazar
Another option is Lazarus,which is based on Free Pascal, which itself is based on Delphi.
另一种选择是Lazarus,它基于Free Pascal,它本身基于Delphi。
Lazarus allows you to develop using Object Oriented Pascal, across Linux, Windows and MacOSX and produces natively compiled executables on each target platform.
Lazarus 允许您使用面向对象的 Pascal 进行开发,跨 Linux、Windows 和 MacOSX,并在每个目标平台上生成本地编译的可执行文件。
Natively compiled executables are generally much faster than interpreter based apps (i.e. Java, C#, PHP).
本机编译的可执行文件通常比基于解释器的应用程序(即 Java、C#、PHP)快得多。
Lazarus use a component and event based approach to development which allows you to design GUI by dragging and dropping components on a Form Designer, which then are hooked through events.
Lazarus 使用基于组件和事件的开发方法,它允许您通过在表单设计器上拖放组件来设计 GUI,然后通过事件挂钩。
Good luck with your programming adventures!
祝你的编程冒险好运!
回答by Nathan Long
Ubuntu Pocket Guide
Ubuntu 袖珍指南
If you're new to Linux, I'd suggest you look at the Ubuntu Pocket Guide. It goes through basic stuff that any user would want to know - window management, system configuration, etc, as well as some historical background on Linux and Ubuntu. You can skim through that and learn a bit.
如果您不熟悉 Linux,我建议您查看Ubuntu Pocket Guide。它介绍了任何用户都想知道的基本内容 - 窗口管理、系统配置等,以及 Linux 和 Ubuntu 的一些历史背景。你可以略读一下并学习一些。
Bash Basics
Bash 基础
Towards the end, it also explains the basics of bash, which is the Linux command line. That part is interesting - you can do a lot more in bash than you can do in the Windows command line. For example, you may be familiar with this Windows idiom:
最后,它还解释了bash的基础知识,它是 Linux 命令行。这部分很有趣——你可以在 bash 中做比在 Windows 命令行中做的更多的事情。例如,您可能熟悉这个 Windows 习语:
dir > directorylist.txt
...which means, "list the contents of this folder, and instead of showing the output, put it in this file."
...这意味着,“列出这个文件夹的内容,而不是显示输出,把它放在这个文件中。”
In Linux, you can do that, and you can also do piping, where you direct the output of one command into another. For example:
在 Linux 中,您可以这样做,也可以执行管道操作,将一个命令的输出定向到另一个命令。例如:
ls | grep foo
means "list the contents of this folder, and search through the output for the regular expression foo." You can add as many pipes as you want and use a variety of commands.
表示“列出此文件夹的内容,并在输出中搜索正则表达式 foo。” 您可以根据需要添加任意数量的管道并使用各种命令。
You can also use brace expansion to run multiple commands in sequence. For example,
您还可以使用大括号扩展来依次运行多个命令。例如,
mkdir photos_{france,spain,italy}
will create directories called photos_france, photos_spain, and photos_italy.
将创建名为 photos_france、photos_spain 和 photos_italy 的目录。
If you're going to be developing in Linux, you should invest the time to read some tutorials on bash to take full advantage of it.
如果您打算在 Linux 中进行开发,您应该花时间阅读一些有关 bash 的教程以充分利用它。