Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

How to install NetBeans Java IDE with Terminal on Kali Linux

Trabla : How to install NetBeans Java IDE with Terminal on Kali Linux

How to install NetBeans Java IDE with Terminal on Kali Linux

NetBeans is an integrated development environment (IDE) for Java. NetBeans allows applications to be developed from a set of modular software components called modules. NetBeans runs on Microsoft Windows, macOS, Linux and Solaris. In addition to Java development, it has extensions for other languages like PHP, C, C++ and HTML5., Javadoc and Javascript. Applications based on NetBeans, including the NetBeans IDE, can be extended by third party developers.

The NetBeans Team actively supports the product and seeks feature suggestions from the wider community. Every release is preceded by a time for Community testing and feedback.

Solving:



How to install Java openjdk 9.0.1 on Kali Linux

Trabla : How to install Java openjdk 9.0.1 on Kali Linux


How to install Java openjdk 9.0.1 on Kali Linux

OpenJDK (Open Java Development Kit) is a free and open source implementation of the Java Platform, Standard Edition (Java SE).

OpenJDK Official Site - http://openjdk.java.net/

Solving:


How to implement Prototype design pattern in Java

Trabla: How to implement Prototype design pattern in Java


How to implement Prototype design pattern in Java

Prototype pattern refers to creating duplicate object while keeping performance in mind. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object.

This pattern involves implementing a prototype interface which tells to create a clone of the current object. This pattern is used when creation of object directly is costly. For example, an object is to be created after a costly database operation. We can cache the object, returns its clone on next request and update the database as and when needed thus reducing database calls.


Solving:



Install Netbeans 8.2 (2017) on Windows 7 - free opensource Java EE IDE

Trabla: Install Netbeans 8.2 (2017) on Windows 7 - free opensource Java EE IDE

Install Netbeans 8.2 (2017) on Windows 7 - free opensource Java EE IDE

NetBeans is a software development platform written in Java. The NetBeans Platform allows applications to be developed from a set of modular software components called modules. Applications based on the NetBeans Platform, including the NetBeans integrated development environment (IDE), can be extended by third party developers.
The NetBeans IDE is primarily intended for development in Java, but also supports other languages, in particular PHP, C/C++ and HTML5.
NetBeans is cross-platform and runs on Microsoft Windows, Mac OS X, Linux, Solaris and other platforms supporting a compatible JVM.
The editor supports many languages from Java, C/C++, XML and HTML, to PHP, Groovy, Javadoc, JavaScript and JSP. Because the editor is extensible, you can plug in support for many other languages.
The NetBeans Team actively supports the product and seeks feature suggestions from the wider community. Every release is preceded by a time for Community testing and feedback. Over 18 million downloads of the NetBeans IDE to date, and over 800,000 participating developers, the NetBeans project is thriving and continues to grow.
A new version was released 8.2/october 3,2016.NetBeans IDE is the official IDE for Java 8. With its editors, code analyzers, and converters, you can quickly and smoothly upgrade your applications to use new Java 8 language constructs, such as lambdas, functional operations, and method references.

NetBeans IDE Official Site - https://netbeans.org/

Solving


How to install Eclipse Oxygen R 2017 32bit with Java JDK 8u144 x32 on Windows 7 x64

Trabla: How to install Eclipse Oxygen R 2017 32bit with Java JDK 8u144 x32 on Windows 7 x64

How to install Eclipse Oxygen R 2017 32bit with Java JDK 8u144 x32 on Windows 7 x64

Eclipse is famous for our Java Integrated Development Environment (IDE). Eclipse is an integrated development environment (IDE) used in computer programming, and is the most widely used Java IDE. It contains a base workspace and an extensible plug-in system for customizing the environment. Eclipse is written mostly in Java and its primary use is for developing Java applications, but it may also be used to develop applications in other programming languages via plug-ins, including Ada, ABAP, C, C++, C#, COBOL, D, Fortran, Haskell, JavaScript, Julia,Lasso, Lua, NATURAL, Perl, PHP, Prolog, Python, R, Ruby (including Ruby on Rails framework), Rust, Scala, Clojure, Groovy, Scheme, and Erlang. It can also be used to develop documents with LaTeX (via a TeXlipse plug-in) and packages for the software Mathematica. Development environments include the Eclipse Java development tools (JDT) for Java and Scala, Eclipse CDT for C/C++, and Eclipse PDT for PHP, among others.
Eclipse software development kit (SDK) is free and open-source software, released under the terms of the Eclipse Public License, although it is incompatible with the GNU General Public License. It was one of the first IDEs to run under GNU Classpath and it runs without problems under IcedTea.

Eclipse Official Site -  https://www.eclipse.org


Solving:


How to implement Strategy design pattern in Java

Trabla: How to implement Strategy design pattern in Java

How to implement Strategy design pattern in Java

In Strategy pattern, a class behavior or its algorithm can be changed at run time. This type of design pattern comes under behavior pattern.

In Strategy pattern, we create objects which represent various strategies and a context object whose behavior varies as per its strategy object. The strategy object changes the executing algorithm of the context object.


Solving:


How to implement Builder design pattern in Java

Trabla: How to implement Builder design pattern in Java


How to implement Builder design pattern in Java


Builder pattern builds a complex object using simple objects and using a step by step approach. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object.

Solving:


Install and configure QF-Test 4.1.2 - GUI test tool for Java & Web on Windows 10 x64

Trabla: Install and configure QF-Test 4.1.2 - GUI test tool for Java & Web


Install and configure QF-Test 4.1.2 - GUI test tool for Java & Web on Windows 10 x64



QF-Test from Quality First Software is a cross-platform software tool for the GUI test automation specialized on Java/Swing, SWT, Eclipse plug-ins and RCP applications, Java applets, Java Web Start, ULC and cross-browser test automation of static and dynamic web-based applications (HTML and AJAX frameworks like ExtJS, GWT, GXT, RAP, Qooxdoo, RichFaces, Vaadin, PrimeFaces, ICEfaces and ZK). Version 4.0 added Windows support for the Web browser Chrome, support for JavaFX and the AJAX frameworks jQuery UI and jQueryEasyUI were added.

QF-Test Official Site - https://www.qfs.de/en.html


Solving:



Simple web service in Java using Spring, Gradle

Trabla: Simple web service in Java using Spring, Gradle


Simple web service in Java using Spring, Gradle


In this application i wll show you how to create simple web service, using Java. We will imlpement RESTful service with help of Spring. For build purposes we will use Gradle.

Gradle is an open source build automation system that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the XML form used by Apache Maven for declaring the project configuration.

The Spring Framework is an application framework and inversion of control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. Although the framework does not impose any specific programming model, it has become popular in the Java community as an alternative to, replacement for, or even addition to the Enterprise JavaBeans (EJB) model. The Spring Framework is open source.

Solving:



Instell jEdit 5.4.0 on Windows 7 - Programmer's Text Editor

Trabla: Instell jEdit 5.4.0 on Windows 7 - Programmer's Text Editor


Instell jEdit 5.4.0 on Windows 7 - Programmer's Text Editor

jEdit is a free software text editor available under the GNU General Public License version 2.0. It is written in Java and runs on any operating system with Java support, including BSD, Linux, macOS and Windows.
jEdit development was started in 1998 by Slava Pestov, who left the project in 2006, handing development to the free software community.
jEdit includes syntax highlighting that provides native support for over 200 file formats. Support for additional formats can be added manually using XML files. It supports UTF-8 and many other encodings. It has extensive code folding and text folding capabilities as well as text wrapping that takes indents into account. The application is highly customizable and can be extended with macros written in BeanShell, Jython, JavaScript and some other scripting languages.

jEdit Official Site - http://www.jedit.org/


Solving:





How to implement Abstract Factory design pattern in Java

Trabla: How to implement Abstract Factory design pattern in Java

How to implement Abstract Factory design pattern in Java



Abstract Factory is a super-factory which creates other factories. This factory is also called as factory of factories. 
In Abstract Factory pattern an interface is responsible for creating a factory of related objects without explicitly specifying their classes. Each generated factory can give the objects as per the Factory pattern

Solving:



How to implement Factory design pattern in Java

Trabla: How to implement Factory design pattern in Java



How to implement Factory design pattern in Java


Factory - creational design pattern. Using factory we create an object without exposing the creation logic to the client and refer to newly created object using a common interface.

Solving:



iDempiere ERP: how to configure and run JasperReport ( without input params )

TrablaiDempiere ERP: how to configure and run JasperReport ( without input params ) in iDempiere ERP

iDempiere ERP how to configure and run JasperReport ( without input params )

JasperReports is an open source Java reporting tool that can write to a variety of targets, such as: screen, a printer, into PDF, HTML, Microsoft Excel, RTF, ODT, Comma-separated values or XML files. It can be used in Java-enabled applications, including Java EE or web applications, to generate dynamic content. It reads its instructions from an XML or .jasper file. JasperReports is part of the Lisog open source stack initiative.

JasperReport Official Site - http://community.jaspersoft.com/

iDempiere Business Suite, also known as OSGi + ADempiere, is an open source Enterprise Resource Planning (ERP) software. It has also customer relationship management (CRM) and supply chain management (SCM) functions. It is in contrast to proprietary or most other open source ERP solutions driven only by a community of supporters. iDempiere is a winner of Infoworld's Bossie award for best open source software application, awarded in 2015 and 2016.

iDempiere ERP Official Site - http://www.idempiere.org/

Sponsored by: MM Cargo Services http://www.mmcargoservices.co.za/

In this tutorial we setup and configure JasperReport to execute it in iDempiere  Open Source ERP

Solving:




Watch on YouTube



1. Download and install iReport 6.5.0 from official site:

http://community.jaspersoft.com/project/ireport-designer/releases

iDempiere Java ERP and JasperReport tutorial 1



ATTENTION: NOT LATEST JasperStudio - it won't work !!!! OLD iReport 6.5.0 :) - maybe in future iDempiere devs will fix it



2. Download and install  Java JDK 7 ( yes , old java - it's required by OLD iReport 6.5.0 :)  )
We used following  site, instead of official Oracle, because Oracle forced to register:

http://www.filehorse.com/download-java-development-kit-32/19235/

iDempiere Java ERP and JasperReport tutorial 2

iDempiere Java ERP and JasperReport tutorial 3


3. Run iReport 5.6.0

iDempiere Java ERP and JasperReport tutorial 4

- in iReport 5.6.0 click "File -> New.."

iDempiere Java ERP and JasperReport tutorial 5

- select "Blank A4"
- click "Select this Template"

iDempiere Java ERP and JasperReport tutorial 6

- Report Name - rename to "test-jasper"
- change file location to Desktop

iDempiere Java ERP and JasperReport tutorial 7

- click "Next" button

iDempiere Java ERP and JasperReport tutorial 8


- click "Finish" button

iDempiere Java ERP and JasperReport tutorial 9

iDempiere Java ERP and JasperReport tutorial 10


4. Now let's Setup data-source 
( database connection to iDempiere ERP  Database ) for iReport 5.6.0

- click on Report Datasource button ( see screenshot )

iDempiere Java ERP and JasperReport tutorial 11

- in "Connections / Datasources " dialog window
click "New" button

iDempiere Java ERP and JasperReport tutorial 12

- in "Datasources" dialog window
select  "Database JDBC connection"
click "Next" button

iDempiere Java ERP and JasperReport tutorial 13

iDempiere Java ERP and JasperReport tutorial 14


Use your params, if you installed iDempiere using our tutorial
( https://codingtrabla.blogspot.com/2016/08/install-idempiere-erp-on-windows-7-x64.html )
params will be

- Type Name  -  iDempiere Localhost Database
- JDBC Url   -   jdbc:postgresql://localhost:5432/idempiere
- username     -  adempiere 
- password     -  idempiere123$%
- enable checkbox - Save password


- click "Test" button


iDempiere Java ERP and JasperReport tutorial 15

Hooray !!! Connection Test Successful !!!
Click "OK" button
Click "Save" button

iDempiere Java ERP and JasperReport tutorial 16

click "Close" button

iDempiere Java ERP and JasperReport tutorial 17


5. Now we are ready to set SQL query for report data

- in iReport Report Inspector click on root element "test-jasper"

iDempiere Java ERP and JasperReport tutorial 18

- right mouse click on "test-jasper"  - select "Edit Query"

iDempiere Java ERP and JasperReport tutorial 19

you will see following "Report Query" window

iDempiere Java ERP and JasperReport tutorial 20

type following SQL query -
selects all records and all fields from table ad_user

SELECT  *  FROM  ad_user

and click "OK" button

iDempiere Java ERP and JasperReport tutorial 21


6. Now let's form report in designer

- drag-n-grop  "Static Text" from "Pallete -> Report elements" bar

iDempiere Java ERP and JasperReport tutorial 22


- type following text - "Test JasperReport - All iDempiere Users" 

iDempiere Java ERP and JasperReport tutorial 23

- click on "+" of "Fields" element

iDempiere Java ERP and JasperReport tutorial 24

- drag-n-drop fields "ad_user_id" and "name" to "Detail 1" section

iDempiere Java ERP and JasperReport tutorial 25

iDempiere Java ERP and JasperReport tutorial 26

Increase fonts, change elements placement - make it beautiful !!! :)

iDempiere Java ERP and JasperReport tutorial 28

Hooray !!! Save report, we are ready to put report into iDempiere ERP

7. Login into iDempiere ERP as SuperUser ( default password is System )

iDempiere Java ERP and JasperReport tutorial 29


- set role - "System / System Admin ..."

iDempiere Java ERP and JasperReport tutorial 30


8. In  iDempiere ERP Menu Search field type

Report & Process

and click "New record" button


iDempiere Java ERP and JasperReport tutorial 31

iDempiere Java ERP and JasperReport tutorial 32

- type following values into fields of new record

Name                         -   Test JasperReport - All iDempiere Users


iDempiere Java ERP and JasperReport tutorial 33


Data Access Level    -   All  ( it means - Client + Organization + System, in real world use Client+Organization  )

iDempiere Java ERP and JasperReport tutorial 34




Classname                 - org.compiere.report.ReportStarter

iDempiere Java ERP and JasperReport tutorial 35



JasperReport             -  attachment:test-jasper.jrxml

where test-jasper.jrxml - name of report file we created in  iReport 5.6.0 earlier

iDempiere Java ERP and JasperReport tutorial 36


- Save Record

iDempiere Java ERP and JasperReport tutorial 37




- Add file of report test-jasper.jrxml created in iReport 5.6.0
into record Attachement

- click on Attachment button

iDempiere Java ERP and JasperReport tutorial 38


- load file test-jasper.jrxml
- click ok button

iDempiere Java ERP and JasperReport tutorial 39

iDempiere Java ERP and JasperReport tutorial 40

iDempiere Java ERP and JasperReport tutorial 41

Save and close window record


9.  Now we create iDempiere ERP menu element for our report

- in search field type  - "Menu"

- click on "New Record" button

iDempiere Java ERP and JasperReport tutorial 41

- type following data into new record fields

Name - Test JasperReport iDempiere All Users

iDempiere Java ERP and JasperReport tutorial 42

Action - select "Report"

iDempiere Java ERP and JasperReport tutorial 43

Process  - select "Test JasperReport - All iDempiere Users ... "

iDempiere Java ERP and JasperReport tutorial 44

Click "Save Changes" button

iDempiere Java ERP and JasperReport tutorial 45


10. Now we need to execute "Role Access Update" iDempiere process

- in search field type - Role Access Update
- click on "Role Access Update"

iDempiere Java ERP and JasperReport tutorial 46

- select Client - "System"
- click "Ok" button

iDempiere Java ERP and JasperReport tutorial 47

- click "Close Window" button

iDempiere Java ERP and JasperReport tutorial 48



11. Now we need to execute "Cache Reset" iDempiere ERP process

- in search field type - Cashe
click on "Cache Reset"

iDempiere Java ERP and JasperReport tutorial 49

- click "Ok" button

iDempiere Java ERP and JasperReport tutorial 50

- click "Close Window" button

iDempiere Java ERP and JasperReport tutorial 51


12. Logout / login as SuperUser  

13.  Run our report

- in search field type - Test JasperReport
- click on Test JasperReport All iDempiere Users

iDempiere Java ERP and JasperReport tutorial 52

- click Ok button to run JasperReport in iDempiere

iDempiere Java ERP and JasperReport tutorial 53


Hooray !!! :))))


iDempiere Java ERP and JasperReport tutorial 54