The content of this article is about how to build a working environment on Ubuntu during the Java development process. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.
Text editing tools: wps, notepad, vim
- ##Development tool installation: jdk, maven | tomcat, eclipse, mysql, navicat
- Virtual machine: virtualbox, vmware
- Daily use software: Screen recording tool SimpleScreenRecorder, File transfer tool filezilla
:
ls*.tar.gz | xargs -n1 tar xzvf
cd Go to the directory with the
zip
package
--->
Extract all
zip packages to the current directory:
ls*.zip | xargs -n1 unzip -o -P infected
2, Install jdk, maven
Unzip the tar package of jdk, the tar package of maven, configure environment variables: Edit ~/.bashrc file(orSystem environment configuration file:/etc/profile )
Add the following content at the end: Installation pathexport JAVA_HOME=/soft/jdk1.8 export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib export M2_HOME=/home/apache-maven-3.2.3 export PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin:$M2_HOME/bin:$PATHEffective environment variables, verify the installation
source ~/.bashrc java -version && mvn -version3, install notepad, Office suite wps: Download wps-office_10.1.0.6634_amd64.deb installation package
sudo dpkg -i wps-office_10.1.0.6634_amd64.deb
#安装notepad
sudo add-apt-repository ppa:notepadqq-team/notepadqq
sudo apt-get update
sudo apt-get install notepadqq
4, Install eclipse : Unzip the tar package, Create a desktop icon
Step one: cd ~/Desktop; vi eclipse.desktop, Enter the following content in the file[DesktopEntry] Encoding=UTF-8 Name=Eclipse Comment=EclipseIDE Exec=/java/eclipse/eclipse Icon=/java/eclipse/icon.xpm Terminal=false StartupNotify=true Type=Application Categories=Application;Development;Step two: Grant execution permissions to the file:
chmod a+x /usr/share/applications/eclipse.desktop(If prompted that jdk or jre is not installed: Enter the eclipse decompression directory: create a soft link pointing to the JRE path)
ln -sf /home/daitoue/pack_unzip/jdk1.8/jre jre
5, Installationvmware, virtualbox #安装vmware
chmoda+x Vmware-Workstation-Full-11.0.0-2305329.x86_64.bundle
sudo ./Vmware-Workstation-Full-11.0.0-2305329.x86_64.bundle
#卸载vmware
sudovmware-installer -u vmware-workstation
#安装virtualbox
sudodpkg -i virtualbox-4.3_4.3.18-96516~Ubuntu~raring_amd64.deb
Dependency package problem, use the following command to solve: apt-get-f install
6, Installmysql wget http://dev.mysql.com/get/mysql-apt-config_0.6.0-1_all.deb
sudo dpkg-i mysql-apt-config_0.6.0-1_all.deb
sudo apt-get update
sudoapt-get install mysql-server mysql-common
After installation, the following directory will be created: Database directory:/var/lib/mysql/ Configuration file:/usr/share/mysql (command and configuration file), /etc/mysql (such as: my.cnf) Startup script: /etc/init.d/mysql (directory of startup script file mysql)
#启动: sudo service mysql start #停止: sudo service mysql stop #查看状态: sudo service mysql status7,
Installationnavicatfor mysql ##1. Download navicat112_premium_cs_x64.tar.gz File
2. After downloading, decompress the tar file: tar -zxvf /home/wilbur/download/navicat112_premium_cs_x64.tar.gz3. After decompression, enter the decompressed directory and run the command : ./start_navicat
Create Navicat shortcut, cdusr/share/applications, sudovim navicat.desktop
(Same operation as: eclipse)Chinese after connecting to the database The data is garbled. If the Chinese version is used, the interface will also be garbled. The character set needs to be modified. Modification method: 1. Open the start_navicat file and you will see exportLANG="en_US.UTF-8" Change this sentence to exportLANG="zh_CN.UTF-8"
2. Check the character set supported by the system: locale -a
3. Modify the character set: export LANG=zh_CN.utf8
(Note: The sentence returned by the start_navicat file and the terminal locale command: export LANG=zh_CN.utf8 must be consistent)
4. The database character set also needs to be modified. vim opens the mysqld.cnf file under the /etc/mysql/mysql.conf.d path
sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf, #在[mysqld]段落中添加如下两行: character-set-server=utf8 collation-server=utf8_general_ci #退出vi, 重启MySQL /etc/init.d/mysql restart
Enter the password to log in: mysql -u root -p, and then check the database character set setting:
mysql> show variables like 'character_set_%'; #修改之前的数据库和表:字符编码--------- alter database java default character set utf8; alter table person default character set utf8; //alter table person convert to character set utf8;8, Installtomcat
Unzip the tar package, vim /bin/catalina.sh ----> Add: export JAVA_HOME=/home/daitoue/pack_unzip/jdk1.8
export JRE_HOME=/home/daitoue/pack_unzip/jdk1.8/jre
9 , File transfer tool: filezilla (FTP tool)
sudo apt-get install filezilla sudo apt-get install filezilla-locales
10, Install screen recording software: SimpleScreenRecorder
#添加源,更新源 sudo add-apt-repository ppa:maarten-baert/simplescreenrecorder sudo apt-get update #安装 sudo apt-get install simplescreenrecorder
11, Install qq
Download the installation package: #Baidu Cloud Link : https://pan.baidu.com/s/1i4XwtgD Password: e8k8
sudo add-apt-repository ppa:wine/wine-builds sudo apt-get update sudo apt-get install winehq-devel #解压安装包后, 在左侧顶端搜索qq, 点击app即可进入安装使用 tar xvf wineQQ8.9_19990.tar.xz -C ~/12, vi, vim editor
sudo apt-get install vim [文件编辑] 在行首插入: I [insert] 行尾插入: A [append] 另起下一行插入: o 另起上一行插入: O 撤销修改: u 恢复修改: ctrl + r [行级: 快速定位] 跳转到行首: 数字0 //// ^ 行尾: $ 文件头:gg 文件尾:G 文件n行:3G, 6G....... [翻页] 下一页: ctrl + f [forward] 上一页: ctrl+ b [back] [行号] 显示文件行号 :set number 取消行号显示 :set nonumber [字符搜索] 查找字符---> /aaa ?aaa (n 下一个 ; N上一个) 当前行--查找字符并替换---> :s /old/new 整个文件--查找字符并替换---> :%s /old/new/g
The above is the detailed content of How to set up a working environment on ubuntu during java development. For more information, please follow other related articles on the PHP Chinese website!

The article discusses using Maven and Gradle for Java project management, build automation, and dependency resolution, comparing their approaches and optimization strategies.

The article discusses creating and using custom Java libraries (JAR files) with proper versioning and dependency management, using tools like Maven and Gradle.

The article discusses implementing multi-level caching in Java using Caffeine and Guava Cache to enhance application performance. It covers setup, integration, and performance benefits, along with configuration and eviction policy management best pra

The article discusses using JPA for object-relational mapping with advanced features like caching and lazy loading. It covers setup, entity mapping, and best practices for optimizing performance while highlighting potential pitfalls.[159 characters]

Java's classloading involves loading, linking, and initializing classes using a hierarchical system with Bootstrap, Extension, and Application classloaders. The parent delegation model ensures core classes are loaded first, affecting custom class loa


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

Dreamweaver Mac version
Visual web development tools

Zend Studio 13.0.1
Powerful PHP integrated development environment

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft