Tag Archives: eclipse

IntelliJ idea / eclipse automatically generate author annotation signature

The signature of the author’s comments is as follows:

/**
* @ author E-mail:[email protected]
* @ version created on June 20, 2016 at 04:58:52 PM*/

Eclipse automatically generates the author annotation signature
file

Window – & gt; preference – & gt; Java – & gt; code style – & gt; code template when you select this movie, you will see a box on the right showing the option of code. You can click this option, click New java files under it, and then you can click Edit button to change its content to yours: (for example)

${filecomment}
${package_ Declaration}
/ *
* @ author E-mail:[email protected]
* @ version creation time: ${date} ${time}
* /
${aspect}
${type}_ declaration}

Finally, apply — & gt; OK..

In addition, I need to add that there is a “insert variable” button in the bottom left foot of the edit window that pops up after I click Edit. When I click it, it will display the variables that can be referenced in the current template, so I won’t look for the definition of variables everywhere like I do.

IntelliJ idea ﹣ automatically generates author annotation signature

1. Open file — & gt; setting
2. Find editor — & gt; file and code templates
3. Find includes
4. Change ${user} to a user-defined user name

/**
* created by name on ${date}.
*/

How to solve the problem of “version 11 or greater is required” in eclipse 2020

After I installed Eclipse 2020, I opened it directly and said “Version 11 or greater is required”, so I installed JDK11 following its instructions, but I still reported the same error after I installed Eclipse 2020. After searching on the Internet, I found that this should be the solution:
Find the eclipse in the file directory. The ini file:

at the beginning of the ini file to add this two lines:

the first line – vm, the second line of the JDK package javaw. Exe open path. Save it and you’ll be able to open Eclipse 2020 normally.

Solution to the error of @ resource annotation in eclipse spring

The @Resource annotation in Eclipse-Spring is used to report an error

1. Problems arise


2. The cause of the problem
@ the Resource is equivalent to the applicationContext. GetBean method, is the annotation – API. The class in the jar package, only support is jdk1.6 annotations, and their default is jdk1.5 (pictured) of the project, so the JDK version because the project is too low, there is an error.

3. Solutions
1. Place the cursor on the project — right click — find Build Path — and then go to Configure Build Path (select)

.
> Find the Java Bulib Path — Libraries — Select the default JRE System Library[J2SE-1.5] — double-click — check Workspace Default JRE (JRE 1.8.0_121)* (this will work if you change to the latest)*.
the default format:
to this format:

4, successfully solved the
modification is done, another to write @ Resource annotation automatically prompts, and there is no error

Solution of project error reporting in eclipse

I. The project has a Red Cross:

Target runtime MyEclipse Tomcat V7.0 Unknown Faceted Project Problem
br> Target runtime MyEclipse Tomcat V7.0 Unknown Faceted Project Problem

2. To find the project directory. Mon. Under the Settings of org.eclipse.wst.com project. Facet. XML core.

3. Will & lt; The runtime name = “MyEclipse Tomcat v7.0″/& gt; Delete, and then right-click the project and refresh.

Second, the projects have a red exclamation point
right click – buildPath – see each TAB to see if there is failure jars or path error
Three, didn’t find the sessionFactory project appear this error:
the solution: (need SRC and res) in both directory to compile project right – buildPath – source – addFolder – check the res and SRC – ok

Right-click on the project –buildPath–Libraries– select JRE System Library–Edit– select Workspace Default JRE


Five, the project after import the captcha code error:
import com. Sun.. Image codec. Jpeg. JPEGCodec; .
import com. Sun. Image codec. Jpeg. JPEGImageEncoder;
Access: The type JPEGCodec is not accessible due to restriction on required library D:\eclipse\JDK7x64\jre\lib\rt.jar
br bb0 Access: restriction: The type JPEGCodec is not accessible due to restriction on required library D:\eclipse\JDK7x64\jre\lib\rt.jar Warning: Forbidden References (Access Rules) from the Deprecated and Restricted API in Windows-Preferences-Java-Complicer-Errors/Warnings.
2, [Project] ->; Properties -> Java Build Path -> Libraries -> Delete JRE System Library
and Add: Add Library ->; JRE System Library -> Click OK
3, [Project] -> Properties -> Java Build Path -> Libraries -> Double-click the JRE System Library and change it to “Workspace Default JRE”

Six, because of the relationship between work, Eclipse development of Java projects to copy, sometimes report a very strange error. Java Compiler Level does not match the version of the installed Java project facet “Java Compiler Level does not match the version of the installed Java project facet” when the source code is identical.
it is very easy to solve, actually under the resource manager, find the project directory, in. Settings subdirectories inside, use a text editor open org.eclipse.wst.com mon. Project. Facet. Core. The XML configuration file
content is as follows:
& lt; ?The XML version = “1.0” encoding = “utf-8”?>
& lt; faceted-project>
& lt; runtime name=”com.genuitec.runtime.generic.jee70″/>
& lt; fixed facet=”jst.web”/>
& lt; fixed facet=”wst.jsdt.web”/>
& lt; fixed facet=”java”/>
& lt; Installed facet = “Java” version = “1.7”/& gt;
& lt; Installed facet = “JST. Web” version = “3.1”/& gt;
& lt; Installed facet = “JST. Web. JSTL” version = “1.2.2”/& gt;
& lt; Installed facet = “WST. JSDT. Web” version = “1.0”/& gt;
& lt; /faceted-project>

& lt; Installed facet = “Java” version = “1.7”/& gt;
:
:
:
:
the right mouse button to select the project, click Properties, select the Java Compiler, you can see on the right side window to the Compiler version
check the Enable project specific Settings
check Use default the compliance Settings
the selection of the corresponding version into in accordance with the version = “1.7”

Error in the project tag in the POM file of Maven project: failure to transfer

Question:
The Maven project was detected from SVN today, and the project label of the POM file after it was imported into ECLISE reported an error. The error content was very long, and the initial content was roughly Failure to Transfer…. + the version of a JAR package +…..
Solution:
Select the error report item, right-click on the item –>; Maven – & gt; Update Project, Force Updateo of Snapshots/Releases:

 
Just wait for the execution to finish, at least that’s how my error was resolved.
 
 
 

@Solution to override error

Sometimes the Java Eclipse project will always report an error with @Override when compiled on a different computer. It is fine to remove the @Override, but it cannot fundamentally solve the problem, because sometimes there are too many places for @Override.
This is an issue with the JDK, where @Override is JDK5, but does not support an implementation of the interface. JDK6 fixes this Bug by adding @Override to methods of parent classes and implementations of interfaces.
To fix this, first make sure you have JDK version 1.6 or higher installed on your machine (mine had JDK 1.7 installed),

Then, select the Eclipse menu Windows->; Preferences–> java-> Compiler–> Compiler Compliance Level Select 1.7, refresh the project, and recompile.
If the problem is not resolved, right-click on the project that reported the error and select Properties–>; Java Compiler–> Select 1.7 in Compiler Compliance Level to refresh the project and recompile.
Source of the original article: Click to open the article

How to solve the error after Java importing project

1. Right-click the project and select Preferences ->; Search project called Facets – & gt; Go to Java and select compile environment 1.7, enter Runtime, select a Tomcat, and click New:

Select Tomcat7, click Apply, and click OK:

Click Configuration, select the Tomcat you just selected, when done, click Apply, and click OK:

Then select the project and right-click ->; Select Build Path ->; Select Configure build path:

Select libraries – & gt; Select the JRE System Library ->; Click Edit to change the compile environment:

Select the default build environment, mine is JDK 1.8, and click Finish:

””Device not found” error causes and Solutions

This is a common error you may encounter when using SQLite in Android development.
See this in conjunction with my other article, “ADB is not an internal or external command, nor is it an executable application.”
Executing ADB shell under CMD. It is likely that your ADB version is low. (You can view your version of ADB with the adb version command.)
Here’s how to solve this problem.
Open the Android SDK Manager in Eclipse, upgrade the SDK Platform, and download the Google USB Driver. As shown in the figure below:


At this point, the problem is solved by executing adb.exe again.

Solution of server startup timeout in eclipse

Eclipse Server boot timeout solution
Server Tomcat V8.5 at localhost was unable to start within 45 seconds. If the Server requires more time, try increasing the timeout in the Server editor. Server Tomcat V8.5 at localhost was unable to start within 45 seconds
Solution:

    double-click the server
    find Timeouts – start, set up the server startup time restart the server is ok
    Welcome to scan the code and follow our QQ group or log in bilibili. Follow Bing Cola and share and communicate with us about front-end, back-end and big data development

Solution to garbled code problem after importing project in eclipse

Eclipse garbled words after importing the project solutions
after importing the project in Eclipse, if the project code in Chinese, may produce Chinese garbled question, take a look at how to solve below
1. Right-click on the project name and select Properties.

. In the right side of the Resource item, find Text File Encoding. By default, Inherited from Container (GBK) is selected, and select Other.

Using jmh in eclipse

1.Eclipse installs the M2E-APT tool

2. Import projects and add dependencies to POM files

<!-- https://mvnrepository.com/artifact/org.openjdk.jmh/jmh-core -->
<dependency>
    <groupId>org.openjdk.jmh</groupId>
    <artifactId>jmh-core</artifactId>
    <version>1.23</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.openjdk.jmh/jmh-generator-annprocess -->
<dependency>
    <groupId>org.openjdk.jmh</groupId>
	<artifactId>jmh-generator-annprocess</artifactId>
	<version>1.23</version>
	<!-- <scope>test</scope> -->
	<scope>provided</scope>
</dependency>

3. Before execution, the project needs to run MVn-clean-install before running the benchmark test

Vscode configuration connection server docker write code

The configuration steps
2. Local Docker service 3. Vscode configuration 4. use

1. Generate SSH key pairs
Ssh-keygen
all the way enter, default sound generated two files:
id_rsa
id_rsa.pub
transfer to the server, copy into a file: ~/.ssh/authorized_keys
if there is, add to the following
cat id_rsa.pud > > ~/.ssh/authorized_keys
2. Local Docker service
Docker “host= SSH ://@”
docker context create –docker “host= SSH :// @”
switch to this context:
docker context use
test :
docker info
3. Vscode configuration
Install plug-in
remote developement
docker
Use 4.
Attach Remote Host Container
server run docker
open vscode, hold shift+ CTRL +p, run docker contexts use
press shift+ CTRL +p, run remot-containers :Attach to Running Containers… , select the docker container running
and successfully press shift+k to open the docker container directory