How to create and run C# project

This post is just a reminder for me. So in order to find more details about dotnet CLI, follow the below link

Creating a C# Project

Creating a Console Project

dotnet new console -o console-demo1

Creating a WebApi Project

dotnet new webapi -o webapi-todo-demo1

1. Creating a C# Console Project

-o or –output is location to place for new generated project.

dotnet new console -o enum_demo4
Folder Structure
Generated Project
Continue reading

How to compile and run Java Projects with java and javac commands


-d is output directory for new generated class files.

How to compile single Java source file

javac -d ./target/classes src/main/java/com/extuni/enum_demo4/

How to compile multiple Java source files

javac -d ./target/classes 

How to compile multiple Java source files using wildcard

javac -d ./target/classes ./src/main/**/*.java

How to specify dependency jar file when compiling

Trying to compile ./src folder completely will throw exception due to junit.jar file dependency. So, it should be specified using -cp option which means –classpath as below.

javac -d ./target/classes -cp /Users/kenanhancer/.m2/repository/junit/junit/4.11/junit-4.11.jar ./src/**/*.java
Continue reading