FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
6196 Discussions

Error: Could not find or load main class com.intel.bts.BtsApp

XNguy4
Novice
9,378 Views

I'm trying to run the board test system for Stratix 10 MX development kit in CentOS 7.7 and hit to the error below

Error: Could not find or load main class com.intel.bts.BtsApp

 

Is there anyone know how to fix it?

Thanks,

0 Kudos
16 Replies
AR_A_Intel
Employee
9,260 Views

Hello

 

Welcome to INTEL forum. Based on my understanding. CentOS 7. version is not an officially support OS for Quartus. An unsupported platform means that some things may work, but others not, and we won't put any resources into debugging or diagnosing. We recommended to use the right OS for Quartus. For more details refer the below link, https://www.intel.com/content/www/us/en/programmable/support/support-resources/download/os-support.html

0 Kudos
XNguy4
Novice
9,260 Views

Thank for quick reply.

I believed that it wasn't Quartus problem, but the Java software bts.jar. I run bts.jar in Ubuntu 18.04 at got the same problem

Command: java -jar bts.jar

Error: Could not find or load main class com.intel.bts.BtsApp

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

 

I wonder if anyone got this problem before. Thanks.

0 Kudos
AR_A_Intel
Employee
9,260 Views

Hi, could you help check again your .class file name for your program. The compiler will generate the .class file with the exact same name given to the Java class in the program. You can refer to this link https://www.baeldung.com/java-could-not-find-load-main-class

0 Kudos
jrb123
Employee
9,255 Views

I have hit the same problem with the Stratix10 DX board test system (BTS) files.  I'm running Ubuntu and I see the same same error: "Error: Could not find or load main class com.intel.bts.BtsApp" running any of the *.sh scripts in the board_test_system subdirectory of the devkit's examples.

This is the default version of the bts launcher:

#!/bin/sh
if [ "$QUARTUS_ROOTDIR" == "" ]; then
export QUARTUS_ROOTDIR=/tools/acds/15.1.2/current.linux/linux64/quartus
echo "Use default QUARTUS_ROOTDIR: $QUARTUS_ROOTDIR"
fi
export PATH=$QUARTUS_ROOTDIR/linux64/jre64/bin:$PATH
java -Xmx256m -jar bts.jar

I don't think the way that script determines QUARTUS_ROOTDIR is a general solution, but even when I 'fix it' for my installation the command: java -Xmx256m -jar bts.jar gives the same error above.

Any suggestions on how to fix or debug this?

JamesNewmanMyrtle
9,243 Views

I have the same problem, also running Ubuntu. No idea as to the solution as yet.

FWIW I found my BoardTestSystem.sh file was also slightly broken in that it seemed to have the wrong line endings.

0 Kudos
geraldwarp
Beginner
9,106 Views

While executing, when JVM does not find a .class file with the specified name then a run time error occurs saying “Could not found or load main class”. The reason why this happens is mostly due to:

  • Wrong Class Name
  • Invalid Classpath

Main class could not be found when there is typo or wrong syntax in the fully qualified java class name or it does not exist in the provided classpath. You must ensure that you add the location of your .class file to your classpath. So, if its in the current folder, add . to your classpath. Note that the Windows classpath separator is a semi-colon( . If you want to execute the main() method in MainClass, you must use the full class name, including package name, in the java command.

 

0 Kudos
Nikolay_Rognlien
New Contributor I
8,873 Views

This problem still persist in Quartus Prime Pro 20.2.

The BoardTestSystem.sh supplied with the cyclone-10-gx-kit-ocllateral.zip seems to be created with Quartus 15.1. Maybe it should have been updated?

It looks like the class in question is embedded in the bts.jar file:

Nikolay_Rognlien_0-1604924624797.png

 

Why is it not recognized when running the Java environment supplied with the Quartus installation?

Are there any options or switches that can be used with the java command to point to where the class is located?

 

 

jomarm10
Beginner
8,816 Views

Did anybody make any progress on this issue.

I am running Quartus Prime Pro 20.2 as well on a Ubuntu 18.04 LTS and I am facing the same problem

0 Kudos
rliston
Beginner
8,430 Views

Just hit this issue, was able to make it work using the commands below. Seems like a javafx packaging issue with bts.jar.

# Ubuntu 20.04
# Quartus-pro-21.1.0.169
# agilexfb_agfb014r24a2e3vr0_fpga_lt_reva_v20.4b72_v1.0/examples/board_test_system
# export PATH=$QUARTUS_ROOTDIR/bin:$PATH
sudo apt-get install openjfx
java --module-path /usr/share/openjfx/lib --add-modules javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web -jar bts.jar
Nikolay_Rognlien
New Contributor I
8,413 Views

Hi.

Thanks, your suggestion gets me a bit further, but the GUI never appears:

intelfpga@workstation:~/Documents/Nikolay/cyclone-10-gx-kit-collateral/examples/board_test_system$ sudo java --module-path /usr/share/openjfx/lib --add-modules javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web -jar bts.jar
Starting application on Linux...

 

Any idea what makes it hang?

 

0 Kudos
rliston
Beginner
8,406 Views

Hi,

I think the only other step is to connect JTAG and program the device with bts_config.sof.

Thanks,

Rob

0 Kudos
Nikolay_Rognlien
New Contributor I
8,387 Views

I can confirm the approach works with my Ubuntu test system as well after connecting a USB Blaster to the PC.

Thanks!

0 Kudos
JRose
Beginner
7,123 Views

Has anyone made this work on CentOS7.9?

0 Kudos
jomarm10
Beginner
7,074 Views

Have you tried the suggested fixes?
for me, under ubuntu 18.04 worked after

installing Oracle Java as said by @JRose and setting proper java-alternative option

installing openjfx as said by @rliston

this almost made it work, it still failed with following errors

user@host:~/workspace_local/board_test_system$ java --module-path /usr/share/openjfx/lib --add-modules javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web -Xmx256m -jar bts.jar -mode pwr
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found

 

I was desperate, and I found that I had the missing class from a Xilinx installation folder...so I decided to try.

I know it may have "exploded", but for me, it made the trick, and I could take the power measures.

 

user@host:~/workspace_local/board_test_system$ java --module-path /usr/share/openjfx/lib --add-modules javafx.base,javafx.controls,javafx.fxml,javafx.graphics,javafx.media,javafx.swing,javafx.web --module-path /opt/Xilinx/.xinstall/DocNav/tps/lnx64/javafx-sdk-11.0.2/lib/ -Xmx256m -jar bts.jar -mode pwr
Success!
Starting application on Linux...
Jun 10, 2022 4:28:27 PM com.intel.bts.ClientApp attachServer
INFO: [/opt/intelFPGA_pro/20.1/quartus/sopc_builder/bin/system-console, --server]
Jun 10, 2022 4:28:27 PM com.intel.bts.ClientApp attachServer
INFO: Here is the standard output of the command:
Jun 10, 2022 4:28:37 PM com.intel.bts.ClientApp attachServer
INFO: TCP PORT: 42045
Jun 10, 2022 4:28:44 PM com.intel.bts.JtagInfo createDeviceInfoMapArray
INFO: 2 device detected: {/devices/1SM21BHN(1|2|3)|1SM21BHU1|..@1#1-11#Intel Stratix 10 MX FPGA Development Kit} {/devices/VTAP10@2#1-11#Intel Stratix 10 MX FPGA Development Kit}
Jun 10, 2022 4:28:44 PM com.intel.bts.ClientApp getMatchedBoardInfoArray
INFO: System Max matched: true, Fpga matched: true
Jun 10, 2022 4:28:44 PM com.intel.bts.BtsView startMainStage
INFO: Selected JTAG cable is: Intel Stratix 10 MX FPGA Development Kit on localhost (1-11)
Jun 10, 2022 4:28:44 PM com.intel.bts.BtsView startMainStage
INFO: System MAX on index 2, FPGA device on index 0
Jun 10, 2022 4:28:44 PM com.intel.bts.SysConService <init>
INFO: Claim master service succeed! Service path: "/devices/VTAP10@2#1-11#Intel Stratix 10 MX FPGA Development Kit/(link)/JTAG/(110:132 v1 #0)/phy_0/master", claimed path: /channels/remote1/(lib)/master_1.
Jun 10, 2022 4:28:44 PM com.intel.bts.InstanceChecker registerInstance
INFO: Application Register. Type: Power or Clock GUI
Jun 10, 2022 4:28:44 PM com.intel.bts.SysConService <init>
INFO: Claim master service succeed! Service path: "/devices/VTAP10@2#1-11#Intel Stratix 10 MX FPGA Development Kit/(link)/JTAG/(110:132 v1 #0)/phy_0/master", claimed path: /channels/remote1/(lib)/master_2.
Jun 10, 2022 4:28:45 PM com.intel.bts.SysConService <init>
INFO: Claim master service succeed! Service path: "/devices/VTAP10@2#1-11#Intel Stratix 10 MX FPGA Development Kit/(link)/JTAG/(110:132 v1 #0)/phy_0/master", claimed path: /channels/remote1/(lib)/master_3.
Jun 10, 2022 4:28:45 PM com.intel.bts.SysConService <init>
INFO: Claim master service succeed! Service path: "/devices/VTAP10@2#1-11#Intel Stratix 10 MX FPGA Development Kit/(link)/JTAG/(110:132 v1 #0)/phy_0/master", claimed path: /channels/remote1/(lib)/master_4.
Jun 10, 2022 4:28:45 PM com.intel.bts.PowerDriver setLtc3884IinCalGain
INFO: DCR of IIN:0.5

 

 

And the Power Monitor finally appeared !!

0 Kudos
JRose
Beginner
7,114 Views

I've been able to make some progress by using Oracle Java which I downloaded from

https://www.oracle.com/cn/java/technologies/javase-jre8-downloads.html

 

The app starts but it  gets the following failures, anyone have any ideas?

Starting application on Linux...
Jun 09, 2022 12:33:42 PM com.intel.bts.ClientApp attachServer
INFO: [/usr/local/tools/Quartus_pro_21.2/quartus/sopc_builder/bin/system-console, --server]
Jun 09, 2022 12:33:43 PM com.intel.bts.ClientApp attachServer
INFO: Here is the standard output of the command:
Jun 09, 2022 12:33:47 PM com.intel.bts.ClientApp attachServer
INFO: TCP PORT: 40621
Jun 09, 2022 12:33:55 PM com.intel.bts.JtagInfo createDeviceInfoMapArray
INFO: 2 device detected: /devices/1ST280ES(1|2|3)|1ST280EU1|..@2#3-10 /devices/5M(1270ZF324|2210Z)|EPM2210@1#3-10
Jun 09, 2022 12:33:55 PM com.intel.bts.ClientApp getMatchedBoardInfoArray
INFO: System Max matched: true, Fpga matched: true
Jun 09, 2022 12:33:55 PM com.intel.bts.BtsView startMainStage
INFO: Selected JTAG cable is: USB-BlasterII on localhost (3-10)
Jun 09, 2022 12:33:55 PM com.intel.bts.BtsView startMainStage
INFO: System MAX on index 1, FPGA device on index 0
Jun 09, 2022 12:33:55 PM com.intel.bts.SysConService <init>
SEVERE: java.io.IOException: Get master service paths failed! Device: "/devices/5M(1270ZF324|2210Z)|EPM2210@1#3-10" Type:
Jun 09, 2022 12:33:55 PM com.intel.bts.HeartBeat init
SEVERE: java.io.IOException: Claim master service failed! Type: Path: mem_0
Jun 09, 2022 12:33:55 PM com.intel.bts.InstanceChecker registerInstance
INFO: Application Register. Type: Power or Clock GUI
Jun 09, 2022 12:33:55 PM com.intel.bts.SysConService <init>
SEVERE: java.io.IOException: Get master service paths failed! Device: "/devices/5M(1270ZF324|2210Z)|EPM2210@1#3-10" Type:
Jun 09, 2022 12:33:55 PM com.intel.bts.InstanceChecker registerInstance
SEVERE: java.io.IOException: Claim master service failed! Type: Path: mem_0
Jun 09, 2022 12:34:10 PM com.intel.bts.SysConService <init>
SEVERE: java.io.IOException: Get master service paths failed! Device: "/devices/5M(1270ZF324|2210Z)|EPM2210@1#3-10" Type:
Jun 09, 2022 12:34:10 PM com.intel.bts.ClockView init
SEVERE: java.io.IOException: Claim master service failed! Type: Path: mem_0

0 Kudos
JRose
Beginner
7,013 Views

I've been able to make it work on CentOS 7.9. You need Oracle Java and you need to set the JTAG speed down to 8000000 and QUARTUE_ROOTDIR should point to 8.1.

Get Java from

 

https://www.oracle.com/cn/java/technologies/javase-jre8-downloads.html

 

Then in Quartus run the JTAG Chain Debugger set the speed to 8000000, run a test and then run this script modified for your system

#!/bin/csh -f
setenv QUARTUS_ROOTDIR /usr/local/tools/Quartus_18.1/quartus

echo "The JTAG speed must be set to 8000000"
echo "Run the JTAG Chain Debugger from the Quartus Tools"
echo "In the test set the JTAG speed to 8000000, then run the test"

set path = (/usr/local/tools/jdk1.8.0_333/bin /usr/local/tools/jdk1.8.0_333/jre ${path})

cd /usr/local/tools/board_test_system

java -Xmx256m -jar bts.jar -mode clk

0 Kudos
Reply