FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
4953 Discussions

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

XNguy4
Novice
1,737 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
12 Replies
AR_A_Intel
Employee
1,619 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.h...

XNguy4
Novice
1,619 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.

AR_A_Intel
Employee
1,619 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

jrb123
Employee
1,614 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
1,602 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.

geraldwarp
Beginner
1,465 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.

 

Nikolay_Rognlien
New Contributor I
1,232 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
1,176 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

rliston
Beginner
789 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
772 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?

 

rliston
Beginner
765 Views

Hi,

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

Thanks,

Rob

Nikolay_Rognlien
New Contributor I
746 Views

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

Thanks!

Reply