As developer, sometimes, you need to know quickly if your environment is ready for a JDK after switch or something. Here I take a basic way to check in general, I think most of new developer always want that so I take my Windows environment as example. You need to check your JRE and JAVA_HOME…
Tag: Java Basic
Project created via the archtype and got error could not built mvn archetype:generate -DgroupId=com.dmsys.frmk -DartifactId=frmk -DarchetypeArtifactId=maven-archetype-quickstart -DinteractiveMode=false Java Maven Project, pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.dmsys.frmk</groupId> <artifactId>frmk</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>frmk</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> <dependency> <groupId>net.sf.ehcache</groupId> <artifactId>ehcache</artifactId> <version>2.5.0</version> <type>pom</type> </dependency> </dependencies> </project> Error Message: No compiler is provided in…
Here I would like to give some basic code conventions in Java that mostly we need in our daily programming life: Indentation Use 4 spaces for indentation. No tabs! If you are using Eclipse, you can configure this at With Eclipse 3.7: Window->Preferences->Java->Code Style->Formatter Edit on one selected convention, example: Java Conventions [built-in] and go…