background

Know what? Know what? What to do? It is really cognition that determines action! I started to plant grass Mac notebooks in March. I placed an order in March without payment. One month later, the price rose by one thousand, so I shelved it. On 618, the price dropped again, so I put in an order and bought it. Until now, I have never touched it except for watching videos for several times.

Recently analyzed, why bought a new computer and do not want to use it? The perception is that you are familiar with the Windows development process, that the current computer is still running, that it is not a big deal to wait two minutes for it to respond slowly, that switching from Mac to Mac is too much trouble…

Little do they know, like warm water boiled frog, a little patience was consumed by the old computer. I asked myself three questions:

  1. Do you think Mac books are fast? To recognize.
  2. Do you know how to switch? I don’t know.
  3. What should I do? To learn.

It only took one day to complete the software configuration required for daily development on Windows, which was not as complicated as imagined. The general point is, like Linux, just switch to command thinking. This article summarizes the process of configuring the environment for Java development on the Mac.

Program listing

There is not much software for daily development:

software role Mac substitutes
SVN Version control SnailSVNLite
VPN Connecting to the Intranet Bring their own
SSH The remote connection Bring their own
IDEA The development of Have a Mac version
JDK The development of Have a Mac version
NodeJS The development of Have a Mac version
Navicat The MySQL client Have a Mac version
Maven Jar package management library Tar Decompress and configure environment variables

After the configuration of these several software, daily development work is enough, those Apache decompression version of the tool, similar to Linux, decompression with environment variables can be, such as Tomcat, Zookeeper and so on.

Basic Mac Configuration

Mac System basic usage:

  1. The shortcut keys are different from Windows. The shortcut keys of the CTRL series need to be replaced with Command.
  2. Right click, go to system configuration.
  3. Case switch: Press Chinese and English first to switch to English, hold Shift when uppercase is required.
  4. Command + space: a particularly useful search tool.

The SnailSVNLite file permission is incorrect

The SVN replacement software can be downloaded in the App Store. After the configuration is complete, an operation identifier of the SVN will be added in any directory.If SnailSVNLite SVN: E000013: “Can’t create directory Permission denied” is incorrect because the directory is restricted. You need to access the directory on the terminal and change the owner of the directory to the current user:

chown -R userName targetDir
Copy the code

IDEA2019.3.5 Crack configuration

When using jetBrains -agent.jar to Crack IDEA, modify the vm.options configuration and modify the workspace configuration after IDEA is opened. Rather than directly in the/Applications/IDEA/Contents/bin directory changes.Append configuration on the last line:

-javaagent:/Applications/IntelliJ IDEA.app/Contents/bin/jetbrains-agent.jar
Copy the code

Maven installation environment variable problem

After decompressing Maven, environment variables are configured in ~ /. Bash_profile and the source command is executed, the problem is reported again when the MVN command is used next time.

Cause: The default macOS configuration file is ~ /.zshrc.

Workaround: Add a configuration to the file:

source ~/.bash_profile
Copy the code

The IDEA of maven configuration

When importing maven project into IDEA, the repository configuration information is very important. Otherwise, the import project will be very slow. The configuration in IDEA exists in two places: maven configuration of the current project and configuration of other newly imported projects.

The first time a project is opened, the default configuration of IDEA is used and its Maven information must be reconfigured:Click on the wrench to see the Maven configuration and repository path used by the project.

Maven configuration for other projects:Find Maven in the Build tool:If the project fails to download a file from the repository directory, the current project is using a different path than the one you configured. You must open maven configuration to make sure the configuration is the same.

Java development hiccups

There are two small problems.

First, JDK 11 does not have a CORBA module:

Corba-related packages have been removed from JDK11. In JDK1.8, this package is in rt.jar. An error will be reported if this module is used in the current project. Therefore, it is important to make sure that the JDK version is consistent with the project version.

Second,The console output of IDEA is garbled. Mavenrunner: / / set vm parameters for MavenRunner: / / set vm parameters for MavenRunner:Restart IDEA and run the MVN install command. The output is normal:The “A” with A circle above it was in brackets!

The revelation of

Mac comes with VPN and SSH, can be directly used, other software can download Mac version, there is no alternative to the text editor EditPlus, VI is barely available, the project daily development needs of the environment are fully configured.

Finally, thanks to the Internet, every problem can be found a solution, there is no solution to the SnailSVNLite permission problem, according to their own judgment of the permission problem, analogous to the Linux SVN permission problem to be solved.

Driverless car services have been fully opened up in Beijing. Open your mind and embrace new things.