Java run commandline a package

Try this


Maven, What is Maven? , What is Maven doing?

Convention over configuration (also known as coding by convention) is a software design paradigm which seeks to decrease the number of decisions that developers need to make, gaining simplicity, but not necessarily losing flexibility.

The phrase essentially means a developer only needs to specify unconventional aspects of the application. For example, if there is a class Sale in the model, the corresponding table in the database is called “sales” by default. It is only if one deviates from this convention, such as calling the table “product sales”, that one needs to write code regarding these names.

When the convention implemented by the tool matches the desired behavior, it behaves as expected without having to write configuration files. Only when the desired behavior deviates from the implemented convention is explicit configuration required.






Aspect oriented programming (AOP)

In computing, aspect-oriented programming (AOP) is a patented[1] programming paradigm that aims to increase modularity by allowing the separation of cross-cutting concerns. It does so by adding additional behavior to existing code (an advice) without modifying the code itself, instead separately specifying which code is modified via a “pointcut” specification, such as “log all function calls when the function’s name begins with ‘set'”. This allows behaviors that are not central to the business logic (such as logging) to be added to a program without cluttering the code core to the functionality. AOP forms a basis for aspect-oriented software development.

AOP includes programming methods and tools that support the modularization of concerns at the level of the source code, while “aspect-oriented software development” refers to a whole engineering discipline.

Aspect-oriented programming entails breaking down program logic into distinct parts (so-called concerns, cohesive areas of functionality). Nearly all programming paradigms support some level of grouping and encapsulation of concerns into separate, independent entities by providing abstractions (e.g., functions, procedures, modules, classes, methods) that can be used for implementing, abstracting and composing these concerns. Some concerns “cut across” multiple abstractions in a program, and defy these forms of implementation. These concerns are called cross-cutting concerns.

Logging exemplifies a crosscutting concern because a logging strategy necessarily affects every logged part of the system. Logging thereby crosscuts all logged classes and methods.

All AOP implementations have some crosscutting expressions that encapsulate each concern in one place. The difference between implementations lies in the power, safety, and usability of the constructs provided. For example, interceptors that specify the methods to intercept express a limited form of crosscutting, without much support for type-safety or debugging. AspectJ has a number of such expressions and encapsulates them in a special class, an aspect. For example, an aspect can alter the behavior of the base code (the non-aspect part of a program) by applying advice (additional behavior) at various join points (points in a program) specified in a quantification or query called a pointcut (that detects whether a given join point matches). An aspect can also make binary-compatible structural changes to other classes, like adding members or parents.


void transfer(Account fromAcc, Account toAcc, int amount, User user,
    Logger logger) throws Exception {"Transferring money…");
  if (!isUserAuthorised(user, fromAcc)) {"User has no permission.");
    throw new UnauthorisedUserException();
  if (fromAcc.getBalance() < amount) {"Insufficient funds.");
    throw new InsufficientFundsException();
  database.commitChanges();  // Atomic operation."Transaction successful.");



Windows command line, BAT file Compile java

1- Very important.

To create a similar batch file, you should verify the full paths to any directories that you want to

add to your system PATH variable. Then you can make any necessary changes to this
example code, and save it as a batch file on your system.
You can download a copy of my batch file using this URL:


How to Run,


How to compile java over terminal, command line , Run java file

1. You need to check, java version with this command

2. Compile the code

3. Run The compiled

How to compile java over terminal, command line , Run java file

1. You need to check, java version with this command

$ java -version


2. Compile the code

$ javac …… …


3. Run The compiled

$ java -jar compiled.jar