Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ The Java development environment to build under Ubuntu 14.04     - What is a logical partition management LVM, how to use in Ubuntu (Linux)

- Ubuntu installed Gimp 2.6.11 (stable version) with PPA (Linux)

- HTTPS and SSH and use the difference between the way: Git User's Manual (Linux)

- Linux --- manual release system cache (Linux)

- Install the Red Hat Container Development Kit on OSX (Server)

- Linux Open coredump (Linux)

- Github Getting Started Basic Course (Linux)

- Achieve camera preview by ffplay (Linux)

- Introduction to Linux system process monitoring tools (Linux)

- Install the latest ATI / Nvidia graphics driver on Ubuntu (Linux)

- Safety testing Unix and Linux server entry succinctly (Linux)

- CentOS 6.5 three ways to configure the IP address (Linux)

- Give your photos Instagram style filters plus program in ubuntu (Linux)

- Oracle Database asynchronous IO cause slow query response (Database)

- Oracle RMAN repair logical bad blocks (Database)

- Computer black magic: tail recursion (Programming)

- Python implementation Bursa transition model (Programming)

- How to choose the first programming language based on the life you want (Programming)

- CoreOS quick installation to get started on a PC (Linux)

- Shell Scripting Interview Questions (Programming)

  The Java development environment to build under Ubuntu 14.04
  Add Date : 2017-04-13      
  Description: The following are my personal experience, contacts, Ubuntu 10.04 system from the start, has gone four years between the twinkling of an eye, frequently visit all relevant forums, I found that from the beginning of the foundation to the present, there are a lot of people in the forum ask questions about the JAVA environment configuration. So I summarize my personal experience as hereinafter provided for reference novice, veterans bypass!

Start Here.

First, java development environment includes some basic elements:

1.jdk install ---- jdk-6u45-linux-x64.bin

2.eclipse install ---- eclipse-jee-kepler-SR2-linux-gtk-x86_64.tar.gz

3.tomcat install ---- apache-tomcat-6.0.39.tar.gz

4. Install Database

JDK installation start talking.

  In fact, the installation JDK summed up on two points unpack and configure the environment variables

  First, a suitable place to decompress jdk-6u45-linux-x64.bin, as follows:

cd / opt # enter the / opt directory
sudo mkdir DevelopTools # New DevelopTools directory
cd DevelopTools
sudo mkdir jvm
cd jvm
sudo cp / home / home / download /jdk-6u45-linux-x64.bin / opt / DevelopTools / jvm
sudo chmod a + x jdk-6u45-linux-x64.bin
sudo sh jdk-6u45-linux-x64.bin
Obtained after extracting the folder #
linuxhost @ ubuntu: / opt / DevelopTools / jvm $ ls -l
The total amount of 4
drwxr-xr-x 8 root root 4096 3 Yue 27 2013 jdk1.6.0_45
  A few steps from the above, JDK has been unpacked completed, in fact, write the steps are simple, there is nothing more to say.

  The following configuration environment variable to say is, this step is to make many novice depressed, and often there is a problem here, or the system can not log in normally (after entering the password phenomenon is recycled back to the login page)

  To configure the environment variables need of points,

The first is the symbol clearly in ubuntu or any other linux distributions, the split symbols when configuring environment variable is [:] instead of [;]

The second configuration is in front, to make a backup file, which is actually a good habit. Once the error can be immediately restored.

    Here we go, began to configure the environment variables, the first thing you want good, you want to configure the system all accounts can all be applied JDK or just the current users? In fact, nothing here, is to configure the environment variables

File may vary.

I will make all JDK to configure user example configuration environment variable.

Backup file you want to edit

sudo cp / etc / profile /etc/profile.old
Edit File

sudo gedit / etc / profile
In the final document by adding the following

export JAVA_HOME = / opt / DevelopTools / jvm / jdk1.6.0_45
export JRE_HOME = / opt / DevelopTools / jvm / jdk1.6.0_45 / jre
export CLASSPATH =:. $ JAVA_HOME / lib: $ JRE_HOME / lib: $ CLASSPATH
export PATH = $ JAVA_HOME / bin: $ JRE_HOME / bin: $ PATH
The following is a description of the above add content

export JAVA_HOME = / opt / DevelopTools / jvm / jdk1.6.0_45 # tell the system JAVA_HOME in /opt/DevelopTools/jvm/jdk1.6.0_45 (this is the extract from the above that path)
export JRE_HOME = / opt / DevelopTools / jvm / jdk1.6.0_45 / jre # tell the system JRE_HOME in opt / DevelopTools / jvm / jdk1.6.0_45 / jre
export CLASSPATH =:. $ JAVA_HOME / lib: $ JRE_HOME / lib: $ CLASSPATH
# Set the CLASSPATH if you have experience in windows configuration, there must be well understood
# [.] Will be added to the current directory CLASSPATH
# [$ JAVA_HOME / lib] will be added under the lib directory JAVA_HOME CLASSPATH
# [$ JRE_HOME / lib] will be added under the lib directory JRE_HOME CLASSPATH
# [$ CLASSPATH] will come in additional original CLASSPATH
# Symbol of the instructions that appear on the above [:] pretty and windows under the [;], [$ JAVA_HOME / lib] such wording is at winodws% JAVA_HOME% \ lib
export PATH = $ JAVA_HOME / bin: $ JRE_HOME / bin: $ PATH
# Configure PATH [$ JAVA_HOME / bin] and [$ JRE_HOME / bin:] was actually the bin JAVA_HOME and PATH added under JRE_HOME
# $ PATH appends the original PATH
  Save / etc / profile after the environment variable configuration finished, here is the need to pay special attention here PATH configuration,

The most common mistake is


export PATH = $ JAVA_HOME / bin: $ JRE_HOME / bin: $ PATH

export PATH = $ JAVA_HOME / bin: $ JRE_HOME / bin
This will lead to progress you reboot the system, and why. Because you write, comparable to the re-assignment to PATH JDK instead of additional relevant content. So there will be some unexpected errors

Many beginners can not modify the file, or do not know the right modification, or not configured properly look after the restart through javac -version to judge.

In fact, you can avoid the mistakes to verify profile modified files are no problem.

Open a terminal


 source / etc / profile
If you do not have any tips, please continue to enter java -version If the output appears similar to the following to prove you are successful, rest assured restart it.

linuxhost @ ubuntu: ~ $ java -version
java version "1.6.0_45"
Java (TM) SE Runtime Environment (build 1.6.0_45-b06)
Java HotSpot (TM) 64-Bit Server VM (build 20.45-b01, mixed mode)
linuxhost @ ubuntu: ~ $ javac -version
javac 1.6.0_45
Yes forgot to say configured only for JDK environment variables of the current user, / etc / profile is global, necessarily want to configure the current user, modify the $ HOME / .profile file.

Let's install Eclipse!

Install Eclipse premise is that you have the JDK installed successfully

Well, to start the installation.

First, extract the eclipse-jee-kepler-SR2-linux-gtk-x86_64.tar.gz in the right place

cd / opt / DevelopTools / ide /
sudo cp / home / home / download /eclipse-jee-kepler-SR2-linux-gtk-x86_64.tar.gz / opt / DevelopTools / ide
sudo tar-zxvf eclipse-jee-kepler-SR2-linux-gtk-x86_64.tar.gz
After extracting obtained eclipse folder #
tone @ Ubuntu: / opt / DevelopTools / ide $ ls
Directly run on it

cd / eclipse
This time will be able to see the familiar eclipse the start page

In order to facilitate the start, we can create a startup icon,

In fact, in order to later in a simple command line to start eclipse, we can create a startup script.

cd / usr / local / bin /
sudo vim eclipse
# Adding the following:
echo 'go eclipse home ...'
cd / opt / DevelopTools / ide / eclipse
echo 'start eclispe ...'
nohup ./eclipse> / dev / null 2> & 1
exit 0
#Esc: Wq
# Authorization
sudo chmod a + x eclipse
Create a startup icon
cd / usr / share / applications /
sudo vim Eclipse.desktop
# Add the following text
Name = Eclipse
Comment = A Java Development Tool
Exec = / usr / local / bin / eclipse # This is the startup script created earlier
Terminal = false
Type = Application
Icon = / opt / DevelopTools / ide / eclipse / icon.xpm
MimeType =
Categories = GTK; Java; Development;
#Esc: Wq

So far eclipse the simple installation is complete.
- Ubuntu users how to install the latest Nvidia graphics drivers (Linux)
- NGINX Plus now fully supports HTTP / 2 (Server)
- Why do I prefer Git (Linux)
- To install OwnCloud 7.0.4 under Ubuntu (Linux)
- MariaDB phpMyAdmin installation and configuration issues to resolve under CentOS7 (Database)
- Gitblit adopted Ticket collaborative development model (Linux)
- Jetty JNDI Development combat (Linux)
- Terminal fun: 6 interesting Linux command-line tools (Linux)
- To build PHP environment (Nginx + MariaDB + PHP7) under CentOS 6.5 (Server)
- MySQL full-index scan bug (Database)
- PHP parsing algorithm of the interview questions (Programming)
- Flask deploy applications using Nginx on Ubuntu (Server)
- Using VMware vSphere Client Linux virtual machine installation CentOS6.4 system (Linux)
- Linux shell script under the use of randomly generated passwords (Programming)
- Java generate two-dimensional code by Zxing (Programming)
- Linux file system (inode and block) (Linux)
- DataGuard a hardware issue warnings found (Database)
- Analysis of MySQL Dockerfile 5.6 (Database)
- The Concept and Semantics of Java Memory Model (Programming)
- CentOS 6.5 x86_64 system customized automated deployment (Linux)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.