Monday, October 21, 2024

Connect my zeb duke wireless bluetooth headphone using terminal in fedora 40

 install bluez-deprecated 


sudo dnf install bluez-deprecated


hcitool scan


should show the bluetooth devices


if not 


bluetoothctl


agent on
scan on # wait for your device's address to show up here
scan off
trust MAC_ADDRESS (in my case 41:42:FF:71:7A:6B)
pair MAC_ADDRRESS(in my case 41:42:FF:71:7A:6B) 

// the above comment will fail  if the device is already paired
connect MAC_ADDRESS (in my case 41:42:FF:71:7A:6B)


there are simpler ways off course


bluetoothctl devices


this will show the device with the mac address


now if the device is not paired 


bluetoothctl pair 41:42:FF:71:7A:6B


if this succeeds then


bluetoothctl connect 41:42:FF:71:7A:6B


to disconnect



bluetoothctl disconnect 41:42:FF:71:7A:6B

 

 to remove the pairing


bluetoothctl remove 41:42:FF:71:7A:6B






Source:https://unix.stackexchange.com/questions/96693/connect-to-a-bluetooth-device-via-terminal


Source:https://unix.stackexchange.com/questions/96693/connect-to-a-bluetooth-device-via-terminal


Source:https://askubuntu.com/questions/758586/how-to-unpair-bluetooth-device-from-the-command-line


Source:https://www.baeldung.com/linux/bluetooth-via-terminal

Saturday, October 19, 2024

Enable javafx option in eclipse,javafx is not showing solved

 Open eclipse,create a java project,click help,click install new software


in the label beside work with 


paste


https://download.eclipse.org/efxclipse/updates-released/3.9.0/site/


there might open a box 


you have to type there


e(fx)clipse

 

select every component ,install

 

restart eclicpse

 

Source:https://www.youtube.com/watch?v=s3Gz1ivERzY

Install eclipse on fedora using flatpack

flatpak install org.eclipse.Java

Switch from One Java Version to Another




Switch from One Java Version to Another



If you have multiple Java versions installed on your system, you can list them by using the alternatives command: sudo alternatives --config java

The currently active version is marked with a + sign.

To switch to another version, type the appropriate number and press Enter.



Install java (openjdk and oraclejdk) on fedora 40



search openjdk version

dnf search openjdk

sudo dnf install java-latest-openjdk.x86_64




java -version




showing i installed version 21




now go the oracle jdk download page




https://www.oracle.com/java/technologies/downloads/?er=221886




I downloaded jdk-23_linux-x64_bin.tar.gz




sudo mkdir -p /usr/local/java




cd Downloads



sudo cp -r jdk-23_linux-x64_bin.tar.gz /usr/local/java



sudo tar zxvf jdk-23_linux-x64_bin.tar.gz




sudo nano /etc/profile



add the following lines





JAVA_HOME=/usr/local/java/jdk-23.0.1
PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
export JAVA_HOME
export PATH


save the file and close
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jdk-23.0.1/bin/java" 1
echo $?
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/local/java/jdk-23.0.1/bin/javac" 1
echo $?
sudo update-alternatives --install "/usr/bin/javaws.itweb" "javaws.itweb" "/usr/local/java/jdk-23.0.1/bin/javaws.itweb" 1
echo $?
sudo update-alternatives --set java /usr/local/java/jdk-23.0.1/bin/java
sudo update-alternatives --set javac /usr/local/java/jdk-23.0.1/bin/javac
sudo update-alternatives --set javaws.itweb /usr/local/java/jdk-23.0.1/bin/javaws.itweb
source /etc/profile
reboot

now both java and javac command is working..

 

Source:https://phoenixnap.com/kb/fedora-install-java