[Idea] kafka & sbt + idea installation configuration and testing

A, IDEA installation

 

Download the Community version of the IDEA, Ultimate is a free trial version (equivalent to use later to give money)

ideaIC-2019.2.3.tar.gz

 

Decompression IDEA:

takes -zxvf ideaIC-2019.2.3.tar.gz

 

View catalog:

[hadoop@hadoop01 idea-IC-192.6817.14]$ ls -ll

total 52

drwxrwxr-x.  2 hadoop hadoop  4096 Oct  2 22:08 bin

-rw-r--r--.  1 hadoop hadoop    14 Sep 24 12:43 build.txt

-rw-r--r--.  1 hadoop hadoop  1914 Sep 24 12:43 Install-Linux-tar.txt

drwxrwxr-x.  7 hadoop hadoop    83 Oct  2 22:08 jbr

drwxrwxr-x.  4 hadoop hadoop  8192 Oct  2 22:08 lib

drwxrwxr-x.  2 hadoop hadoop  4096 Oct  2 22:08 license

-rw-r--r--.  1 hadoop hadoop 11352 Sep 24 12:43 LICENSE.txt

-rw-r--r--.  1 hadoop hadoop   128 Sep 24 12:43 NOTICE.txt

drwxrwxr-x. 43 hadoop hadoop  4096 Oct  2 22:08 plugins

-rw-r--r--.  1 hadoop hadoop   370 Sep 24 12:46 product-info.json

drwxrwxr-x.  2 hadoop hadoop    35 Oct  2 22:08 redist

 

Start iedea:

[hadoop@hadoop01 bin]$ ./idea.sh

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

 

Startup Error: Unable to detect graphics environment

报错:Unable to detect graphics environment

Workaround: Do not perform this command by remote start way out, to open the terminal in linux graphical interface to execute this command

 

Executed in linux terminal command to start idia:

[hadoop@hadoop01 ~]$ cd idea-IC-192.6817.14

[hadoop@hadoop01 idea-IC-192.6817.14]$ bin/idea.sh

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

 

Download and install the plug-scala

The scala-intellij-bin-2019.2.3.zip on the scala plugins folder in your home directory

Note: scala plug-in version must correspond with the idea, as I have is: scala-intellij-bin-2019.2.3.zip correspond ideaIC-2019.2.3.tar.gz

 

 

 To find setting inside the plugins, select install plugin from disk to start the idea of ​​...

 

 

 

Select the plug-in package

 

 

 

Finally restart the idea, you can.

 

Two, IDEA test

 

Create a new project scala

 

 

 

Note: Select the IDEA is to create a common Scala project (Note: Different versions of the IJ IDEA, IDEA here may appear as Scala, but this did not affect anything)

 

Basic engineering settings page:

 

among them:

project name: project name

project location: the project file Address

jdk: java version version used when not found, choose the installation directory of jdk

scala SDK: Use scala version is not found, the installation directory of their choice of scala

 

After clicking finish, into the design of the main page

 

 

 This time, the first time the system will set the index.

It should be noted, IDEA will take time for new projects index, depending on the length of the virtual machine configuration and set

 

In the right-src at the new-package, ready to create a package scala

 

 

 Package name :com.hadoop

 

Configuration engineering structure (project structure), in order to introduce spark dependencies

Select the main interface file-- project structure, in the pop-up dialog box, select librarie - + - java, select the virtual machine in all the jar packages under the jars directory has been installed at the spark

 

 

 After clicking OK, the system will be indexed again

 

 

 

Creating scala class

On the right bag com.hadoop new - scala class, following interface pops

 

 

 Enter sparkPi, and select the object

 

 

Guess you like

Origin www.cnblogs.com/CQ-LQJ/p/11618884.html