.jar installation

Hi, I installed a .jar application and followed this post [root tip] [How To] I have downloaded a program as a jar file - what now? and to launch the .jar file. I ran in the terminal:

sudo java -jar AssoInvoice.jar  1 ✘
[sudo] password of eduardolp3:
Command line arguments:
Using laf org.pushingpixels.substance.api.skin.SubstanceMistSilverLookAndFeel
SERIOUS: com.izforge.izpack.api.exception.IzPackException: java.lang.reflect.InvocationTargetException

Where is the error?

    ~  sudo inxi --admin --verbosity=7 --filter --no-host --width
[sudo] password di eduardolp3: 
System:
  Kernel: 6.6.54-2-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 14.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.6-x86_64
    root=UUID=641a882c-5abb-4e5b-be78-881ef49e404c rw quiet splash
    udev.log_priority=3
  Desktop: KDE Plasma v: 6.1.5 tk: Qt v: N/A wm: kwin_x11 dm: SDDM
    Distro: Manjaro base: Arch Linux
Machine:
  Type: Laptop System: Dell product: Vostro 3558 v: N/A serial: <filter>
    Chassis: type: 9 serial: <filter>
  Mobo: Dell model: 05W6N2 v: A00 serial: <filter> part-nu: 06C1
    uuid: 4c4c4544-0037-4310-805a-c3c04f4b4332 UEFI: Dell v: A17 date: 09/11/2020
Memory:
  System RAM: total: 8 GiB available: 7.67 GiB used: 4.12 GiB (53.7%)
    igpu: 32 MiB
  Array-1: capacity: 16 GiB slots: 2 modules: 2 EC: None
    max-module-size: 8 GiB note: est.
  Device-1: DIMM A type: DDR3 detail: synchronous size: 4 GiB
    speed: 1600 MT/s volts: N/A width (bits): data: 64 total: 64
    manufacturer: Hynix/Hyundai part-no: HMT451S6BFR8A-PB serial: <filter>
  Device-2: DIMM B type: DDR3 detail: synchronous size: 4 GiB
    speed: 1600 MT/s volts: N/A width (bits): data: 64 total: 64
    manufacturer: Crucial part-no: CT51264BF160B.C16F serial: <filter>
CPU:
  Info: model: Intel Core i3-5005U socket: BGA1168 bits: 64 type: MT MCP
    arch: Broadwell gen: core 5 level: v3 note: check built: 2015-18
    process: Intel 14nm family: 6 model-id: 0x3D (61) stepping: 4
    microcode: 0x2F
  Topology: cpus: 1x dies: 1 clusters: 2 cores: 2 threads: 4 tpc: 2
    smt: enabled cache: L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB
    desc: 2x256 KiB L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 500 min/max: 500/1900 base/boost: 2000/2000 scaling:
    driver: intel_cpufreq governor: schedutil volts: 0.8 V ext-clock: 100 MHz
    cores: 1: 500 2: 500 3: 500 4: 500 bogomips: 15971
  Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_perfmon
    avx avx2 bmi1 bmi2 bts clflush cmov constant_tsc cpuid cpuid_fault cx16
    cx8 de ds_cpl dtes64 dtherm dts epb ept ept_ad erms est f16c flexpriority
    flush_l1d fma fpu fsgsbase fxsr ht ibpb ibrs intel_pt invpcid lahf_lm lm
    mca mce md_clear mmx monitor movbe msr mtrr nonstop_tsc nopl nx pae pat
    pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pln pni popcnt pse pse36 pti pts
    rdrand rdseed rdtscp rep_good sdbg sep smap smep ss ssbd sse sse2 sse4_1
    sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust
    tsc_deadline_timer vme vmx vnmi vpid x2apic xsave xsaveopt xtopology xtpr
  Vulnerabilities:
  Type: gather_data_sampling status: Not affected
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data status: Unknown: No mitigations
  Type: reg_file_data_sampling status: Not affected
  Type: retbleed status: Not affected
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: Retpolines; IBPB: conditional; IBRS_FW;
    STIBP: conditional; RSB filling; PBRSB-eIBRS: Not affected; BHI: Not
    affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel HD Graphics 5500 vendor: Dell driver: i915 v: kernel
    arch: Gen-8 process: Intel 14nm built: 2014-15 ports: active: eDP-1
    empty: DP-1,HDMI-A-1 bus-ID: 00:02.0 chip-ID: 8086:1616 class-ID: 0300
  Device-2: Microdia Integrated Webcam driver: uvcvideo type: USB rev: 2.0
    speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 2-5:2 chip-ID: 0c45:6710
    class-ID: 0e02
  Display: unspecified server: X.Org v: 21.1.14 with: Xwayland v: 24.1.4
    compositor: kwin_x11 driver: X: loaded: modesetting alternate: fbdev,vesa
    dri: iris gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.21x7.99")
    s-diag: 414mm (16.31") monitors: <missing: xrandr>
  Monitor-1: eDP-1 model: ChiMei InnoLux 0x15c5 built: 2014 res: 1366x768
    dpi: 101 gamma: 1.2 size: 344x193mm (13.54x7.6") diag: 394mm (15.5")
    ratio: 16:9 modes: 1366x768
  API: EGL v: 1.5 hw: drv: intel iris platforms: device: 0 drv: iris
    device: 1 drv: swrast gbm: drv: iris surfaceless: drv: iris x11: drv: iris
    inactive: wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 24.2.4-arch1.0.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel HD Graphics 5500 (BDW GT2)
    device-ID: 8086:1616 memory: 3.74 GiB unified: yes
  API: Vulkan v: 1.3.295 layers: N/A device: 0 type: integrated-gpu
    name: Intel HD Graphics 5500 (BDW GT2) driver: mesa intel v: 24.2.4-arch1.0.1
    device-ID: 8086:1616 surfaces: xcb,xlib
Audio:
  Device-1: Intel Broadwell-U Audio vendor: Dell driver: snd_hda_intel
    v: kernel bus-ID: 00:03.0 chip-ID: 8086:160c class-ID: 0403
  Device-2: Intel Wildcat Point-LP High Definition Audio vendor: Dell
    driver: snd_hda_intel v: kernel bus-ID: 00:1b.0 chip-ID: 8086:9ca0
    class-ID: 0403
  API: ALSA v: k6.6.54-2-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: JACK v: 1.9.22 status: off tools: N/A
  Server-2: PipeWire v: 1.2.5 status: n/a (root, process)
    with: pipewire-media-session status: active tools: pw-cli
  Server-3: PulseAudio v: 17.0 status: active (root, process)
    with: pulseaudio-alsa type: plugin tools: pacat,pactl
Network:
  Device-1: Intel Wireless 3160 driver: iwlwifi v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 06:00.0 chip-ID: 8086:08b3 class-ID: 0280
  IF: wlp6s0 state: down mac: <filter>
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Dell driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: e000 bus-ID: 07:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp7s0 state: down mac: <filter>
  IF-ID-1: enp0s20u1 state: unknown speed: -1 duplex: half mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  Info: services: NetworkManager, systemd-timesyncd, wpa_supplicant
  WAN IP: <filter>
Bluetooth:
  Device-1: Xiaomi Mi/Redmi series (RNDIS) driver: rndis_host v: kernel
    type: USB rev: 2.1 speed: 480 Mb/s lanes: 1 mode: 2.0 bus-ID: 2-1:6
    chip-ID: 2717:ff80 class-ID: 0a00 serial: <filter>
  Device-2: Intel Bluetooth wireless interface driver: btusb v: 0.8 type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 2-6:3 chip-ID: 8087:07dc
    class-ID: e001
  Report: ID: hci0 rfk-id: 3 state: up address: <filter> bt-v: 4.0 lmp-v: 6
    sub-v: f00 hci-v: 6 rev: f00 class-ID: 7c010c
  Info: acl-mtu: 1021:5 sco-mtu: 96:6 link-policy: rswitch hold sniff
    link-mode: peripheral accept service-classes: rendering, capturing, object
    transfer, audio, telephony
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 238.47 GiB used: 40.36 GiB (16.9%)
  ID-1: /dev/sda maj-min: 8:0 vendor: Intenso model: SSD Sata III
    size: 238.47 GiB block-size: physical: 512 B logical: 512 B sata: 3.2
    speed: 6.0 Gb/s tech: SSD serial: <filter> fw-rev: 4A0 temp: 30 C
    scheme: GPT
  SMART: yes state: enabled health: PASSED on: 27d 15h cycles: 514
    read: 27 MiB written: 31 MiB Pre-Fail: reallocated sector: 100 threshold: 50
  Optical-1: /dev/sr0 vendor: HL-DT-ST model: DVD+-RW GU90N rev: A1C1
    dev-links: cdrom
  Features: speed: 24 multisession: yes audio: yes dvd: yes
    rw: cd-r,cd-rw,dvd-r,dvd-ram state: running
Partition:
  ID-1: / raw-size: 30 GiB size: 29.36 GiB (97.87%) used: 17.41 GiB (59.3%)
    fs: ext4 block-size: 4096 B dev: /dev/sda5 maj-min: 8:5 label: N/A
    uuid: 641a882c-5abb-4e5b-be78-881ef49e404c
  ID-2: /boot/efi raw-size: 512 MiB size: 511 MiB (99.80%)
    used: 27.1 MiB (5.3%) fs: vfat block-size: 512 B dev: /dev/sda4 maj-min: 8:4
    label: BOOT uuid: CBD3-12DA
  ID-3: /home raw-size: 123.42 GiB size: 120.92 GiB (97.98%)
    used: 21.59 GiB (17.9%) fs: ext4 block-size: 4096 B dev: /dev/sda6
    maj-min: 8:6 label: N/A uuid: 5a83cf39-e879-418f-93d6-9794f52566e8
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: partition size: 4 GiB used: 1.34 GiB (33.4%)
    priority: -2 dev: /dev/sda3 maj-min: 8:3 label: swap
    uuid: c9579a4d-8aa2-4bf0-b52e-7bcde779e975
Unmounted:
  ID-1: /dev/sda1 maj-min: 8:1 size: 16 MiB fs: N/A label: N/A uuid: N/A
  ID-2: /dev/sda2 maj-min: 8:2 size: 60.54 GiB fs: ntfs label: N/A
    uuid: C40A4E920A4E8202
USB:
  Hub-1: 1-0:1 info: full speed or root hub ports: 2 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Hub-2: 1-1:2 info: Intel Integrated Hub ports: 8 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 8087:8001
    class-ID: 0900
  Hub-3: 2-0:1 info: hi-speed hub with single TT ports: 11 rev: 2.0
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 chip-ID: 1d6b:0002
    class-ID: 0900
  Device-1: 2-1:6 info: Xiaomi Mi/Redmi series (RNDIS)
    type: bluetooth,CDC-data driver: rndis_host interfaces: 2 rev: 2.1
    speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0 power: 500mA
    chip-ID: 2717:ff80 class-ID: 0a00 serial: <filter>
  Device-2: 2-5:2 info: Microdia Integrated Webcam type: video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s (57.2 MiB/s) lanes: 1
    mode: 2.0 power: 500mA chip-ID: 0c45:6710 class-ID: 0e02
  Device-3: 2-6:3 info: Intel Bluetooth wireless interface type: bluetooth
    driver: btusb interfaces: 2 rev: 2.0 speed: 12 Mb/s (1.4 MiB/s) lanes: 1
    mode: 1.1 power: 100mA chip-ID: 8087:07dc class-ID: e001
  Device-4: 2-8:4 info: Realtek RTS5129 Card Reader Controller
    type: <vendor specific> driver: rtsx_usb,rtsx_usb_ms,rtsx_usb_sdmmc
    interfaces: 1 rev: 2.0 speed: 480 Mb/s (57.2 MiB/s) lanes: 1 mode: 2.0
    power: 500mA chip-ID: 0bda:0129 class-ID: ff00 serial: <filter>
  Hub-4: 3-0:1 info: super-speed hub ports: 4 rev: 3.0
    speed: 5 Gb/s (596.0 MiB/s) lanes: 1 mode: 3.2 gen-1x1 chip-ID: 1d6b:0003
    class-ID: 0900
Sensors:
  System Temperatures: cpu: 46.0 C mobo: N/A sodimm: SODIMM C
  Fan Speeds (rpm): cpu: 0 fan-2: 0 fan-3: 0
Info:
  Processes: 213 Power: uptime: 1d 5h 33m states: freeze,mem,disk suspend: deep
    avail: s2idle wakeups: 2 hibernate: platform avail: shutdown, reboot,
    suspend, test_resume image: 3.05 GiB services: org_kde_powerdevil,
    power-profiles-daemon, upowerd Init: systemd v: 256 default: graphical
    tool: systemctl
  Packages: pm: dpkg pkgs: 0 pm: pacman pkgs: 1538 libs: 388 tools: pamac,yay
    pm: flatpak pkgs: 0 Compilers: clang: 18.1.8 gcc: 14.2.1 Shell: Sudo (sudo)
    v: 1.9.16 default: Bash v: 5.2.37 running-in: konsole inxi: 3.3.36

Why do you run it with sudo?
Which java version is installed?
They seem to have certain requirements.

I suppose the file is from here:
https://for.assosoftware.it/assoinvoice
so: that is not the original file name.

I tried without sudo and the answer is the same, the Java version is 3-5, the original name is Linux_AssoInvoice_1.2.33.jar.

That doesn’t really answer the question as to “why?”.

java --version gives the version
archlinux-java
allows you to have several versions and choose the default one

3-5 is not the java version - it is the version of java-environment-common

I work a lot with java, but I haven’t seen this version yet :wink:

please try:

java -version

You may get:

openjdk version "21.0.4" 2024-07-16
OpenJDK Runtime Environment (build 21.0.4+7)
OpenJDK 64-Bit Server VM (build 21.0.4+7, mixed mode, sharing)

and

archlinux-java status  

:footprints:

P.S. Be careful ! Don´t ever use sudo with java if you do not trust the jar
There may be dragons in it.

    ~  java -version                                  ✔ 
openjdk version "22.0.2" 2024-07-16
OpenJDK Runtime Environment (build 22.0.2+9)
OpenJDK 64-Bit Server VM (build 22.0.2+9, mixed mode, sharing)
    ~  archlinux-java status                          ✔ 
Available Java environments:
  java-21-openjdk
  java-22-openjdk (default)
  java-23-jdk

Sorry, I’m a little stupid with computers.

So you have java 21, 22, 23, but may be you will need Java 8 or java 17

Which Java version do the developers of the jar file recommend using?
:footprints:

Minimum installation requirements

AssoInvoice is a Java product and requires the presence of Java Virtual Machine (JVM) Version 8 on the system to function (update 161 recommended).

So you need to install java 8 (java-8-openjdk)
Then make it the default (via sudo archlinux-java set ...)
:footprints:
Edit:
Sorry, the name in the repos is other than what archlinux-java tells:

trizen -Ss jdk8-openjdk
extra/jdk8-openjdk 8.422.u05-1 [Installiert]
    OpenJDK Java 8 development kit

or jre11-openjdk or jdk11-openjdk ?
it’s more modern and still within the range of what they support

@eduardolp3
the version you have currently set is too new

And which one should I install?
Java 8 (java-8-openjdk) or jre11-openjdk OR jdk11-openjdk?

You likely only need the jre, not the jdk.

Why not install both 8 and 11 and try?

java-8-openjdk not found,
installed jre11-openjdk but it doesn’t work:

sudo pacman -Syu jre11-openjdk                 ✔ 
[sudo] password di eduardolp3: 
:: Sincronizzazione dei database in corso...
 core è aggiornato
 extra                   8,0 MiB  1035 KiB/s 00:08 [####] 100%
 multilib è aggiornato
:: Aggiornamento del sistema in corso...
risoluzione delle dipendenze in corso...
ricerca dei pacchetti in conflitto in corso...

Pacchetti (1) jre11-openjdk-11.0.24.u8-1

Dimensione totale dei pacchetti da scaricare:    25,74 MiB
Dimensione totale dei pacchetti da installare:  113,33 MiB

:: Vuoi procedere con l'installazione? [S/n] 
:: Download dei pacchetti in corso...
 jre11-openjdk-11...    25,7 MiB  1533 KiB/s 00:17 [####] 100%
(1/1) verifica delle chiavi presenti nel porta...  [####] 100%
(1/1) verifica dell'integrità dei pacchetti        [####] 100%
(1/1) caricamento dei file dei pacchetti           [####] 100%
(1/1) controllo dei conflitti in corso             [####] 100%
(1/1) controllo dello spazio disponibile sul disco [####] 100%
:: Elaborazione delle modifiche al pacchetto...
(1/1) installazione in corso di jre11-openjdk      [####] 100%
Default Java environment is already set to 'java-22-openjdk'
See 'archlinux-java help' to change it
when you use a non-reparenting window manager,
set _JAVA_AWT_WM_NONREPARENTING=1 in /etc/profile.d/jre.sh
Dipendenze opzionali di jre11-openjdk
    alsa-lib: for basic sound support [installato]
    gtk3: for the Gtk+ 3 look and feel - desktop usage
    [installato]
:: Esecuzione degli hook di post-transazione...
(1/3) Arming ConditionNeedsUpdate...
(2/3) Refreshing PackageKit...
(3/3) Updating the desktop file MIME type cache...
    ~  cd Scaricati                           ✔  40s  
    ~/Scaricati  sudo java -jar Linux_AssoInvoice_1.2.33.jar   ✔ 
Command line arguments: 
Using laf org.pushingpixels.substance.api.skin.SubstanceMistSilverLookAndFeel
GRAVE: com.izforge.izpack.api.exception.IzPackException: java.lang.reflect.InvocationTargetException

How do I set it as default?

jre8-openjdk is the name

Arch Linux - Package Search

After installation, you have to use
archlinux-java set ...
to make the one you want the default

You should actually read the terminal output: :sunglasses:

I managed to install and set java-8-openjdk/jre
as default, but once I clicked on the executable it tells me:

The program «/home/eduardolp3/AssoInvoice/AssoInvoice.jar» does not have execution attributes.

run it from terminal as you did in the first post
or follow the guide you linked to …

I tried it with openjdk and Oracle JDK, and got the same error.

The error I think is misleading. This also is not a 100% Java app:

   40448  Defl:N    19045  53% 2017-08-09 23:34 d9f9ef4f  com/izforge/izpack/bin/native/izpack/ShellLink.dll
   47616  Defl:N    21206  56% 2017-08-09 23:34 179e07f5  com/izforge/izpack/bin/native/izpack/ShellLink_x64.dll
       0  Defl:N        2   0% 2015-02-09 16:55 00000000  META-INF/native/
       0  Defl:N        2   0% 2015-02-09 16:55 00000000  META-INF/native/linux32/
   47791  Defl:N    14213  70% 2015-02-09 16:55 f44e4a96  META-INF/native/linux32/libjansi.so
       0  Defl:N        2   0% 2015-02-09 16:55 00000000  META-INF/native/linux64/
   48397  Defl:N    16327  66% 2015-02-09 16:55 046cb2e2  META-INF/native/linux64/libjansi.so
       0  Defl:N        2   0% 2015-02-09 16:55 00000000  META-INF/native/osx/
   27840  Defl:N     3501  87% 2015-02-09 16:55 016d47bc  META-INF/native/osx/libjansi.jnilib
       0  Defl:N        2   0% 2015-02-09 16:55 00000000  META-INF/native/windows32/
   17408  Defl:N     6154  65% 2015-02-09 16:55 c38232b7  META-INF/native/windows32/jansi.dll
       0  Defl:N        2   0% 2015-02-09 16:55 00000000  META-INF/native/windows64/
   19968  Defl:N     6796  66% 2015-02-09 16:55 ef7ef603  META-INF/native/windows64/jansi.dll

I think it’s more likely it’s a problem with this specific app on modern (or Arch based) systems.

FWIW
I’m currently on Mint 21.1 Vera
have installed java-1.8.0-openjdk-amd64 (which I think is the equivalent to the Arch version)
and set it as the default java
downloaded the file Linux_AssoInvoice_1.2.33.jar from the site
and ran:
java -jar ./Downloads/Linux_AssoInvoice_1.2.33.jar
and it starts some kind of installer without issue

In Manjaro (VM)
with java8-openjdk
the installation works, but the program can’t be started:
failed to execute child process - permission denied

running the installed .jar from terminal results in:
Error: Could not find or load main class ViewSplash :man_shrugging:

I will not even try fully installing it on my Mint machine.

1 Like

Given it works in @Nachlese’s configuration, I got the installer to pop up in these simple steps:

sudo pacman -S jdk8-openjdk 
sudo archlinux-java set java-8-openjdk

The package name is different than what you set via archlinux-java.