Tuesday, 15 December 2020

Fix Error while running Income Tax India ITR Utility on Ubuntu

Most of the users having only Linux based operating system on individual Laptop/PC for day to day activity to high performance activity use. When Linux based users want to fill ITR using such system then they have either use online filling or download offline java utility that IT has officially provided.

Unfortunately IT department has not been well tested/verified or no any guidlines/support in case user face issue to run such a utility on Linux system. 

When you download any ITR type java utility then you may face following error on Linux system.  

 

Error : 

Error: Could not find or load main class com.itd.efiling.itr.main.ctrl.ThreeRedLightsIlluminate

Caused by: java.lang.NoClassDefFoundError: javafx/application/Application 


 

Cause of Error :

India income tax returns filing utilities are created using Java 8 SDK and use Java FX. These can only be run using Java 8 as Java FX was bundled with it. Newer versions of Java from Oracle as well as OpenJDK do not bundle Java Fx anymore.

 

Solution :

I tired to find out cause and based on it by applying following solution, ITR java utility ran successfully.

For this activity I have used following system

  • Operating System: Kubuntu 20.04
  • Kernel Version: 5.4.0-56-generic
  • OS Type: 64-bit

And my system I had preinstalled OpenJDK with version :

openjdk version "11.0.9.1" 2020-11-04

OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.20.04)


 

And javafx packet was not installed by default on the system.

To resolve the error I had applied following solution:

Steps :

1. Download javafx packet from url and install it.

 https://packages.ubuntu.com/search?keywords=openjfx 

2. Locate and note down the path of javafx on your system. It may be /usr/share/openjfx/lib 

3. Update ITR.sh file with following things. Note depends on .jar file name kindly update respective file and comment existing statement

#java -jar ITR-2_AY202021_PR3.2.jar

export PATH_TO_FX=/usr/share/openjfx/lib/

java --module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml,javafx.web -jar ITR-2_AY202021_PR3.2.jar

 

4. Execute the ITR.sh

Mainly you must have javafx on your system and while executing utility(.jar) you need to pass javafx path including modules javafx.controls,javafx.fxml,javafx.web as shown in below command

export PATH_TO_FX=/usr/share/openjfx/lib/ 

java --module-path $PATH_TO_FX --add-modules javafx.controls,javafx.fxml,javafx.web -jar ITR-2_AY202021_PR3.2.jar

 


I hope this will help to you. Even your system is non-debien system but still basic purpose solve your error.

Also I would suggest Indian Income Tax department to updated upcoming such a utility to fix the issue.