• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

I can't open a .jar file in ubuntu and I tried EVERYTHING  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the Jodin3 jar file installed: JOdin3CASUAL-r1035-dist.jar. Can't open it.

java -jar JOdin3CASUAL-r1035-dist.jar does not work: Error: JavaFX runtime components are missing, and are required to run this application

./JOdin3CASUAL-r1035-dist.jar does not work: invalid file (bad magic number): Exec format error

java is installed. Oracle is installed. No need to update.

sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

 Selection    Path                                            Priority   Status
------------------------------------------------------------
 0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1101      auto mode
 1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1101      manual mode
* 2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
What else do I need to open a file in ubuntu?

=============================================

sudo apt-get install openjfx
[sudo] password for xxx:
Reading package lists... Done
Building dependency tree      
Reading state information... Done
openjfx is already the newest version (11.0.2+1-1~18.04.2).
0 upgraded, 0 newly installed, 0 to remove and 123 not upgraded.
i have the jfx updated, thanks for trying!

I also tried this: https://www.b4x.com/android/forum/threads/solved-running-jar-on-ubuntu-linux-18-04.93400/ without any success can someone give me a hint? I really need odin
 
Ranch Hand
Posts: 380
2
Fedora IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maybe the java path variable is pointing to the java 8.
 
Sheriff
Posts: 5930
155
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunately, I don't think the JavaFX runtime is available in the OpenJDK version of Java, even version 8.  I had to use the Oracle version.  That, or you could use Maven or some other build tool to pull in the JavaFX dependencies.

https://openjfx.io/openjfx-docs/
 
Knute Snortum
Sheriff
Posts: 5930
155
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just followed the link you posted.  What happened when you tried those steps?
 
Kevin Nanneiy
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this is the problem:

sudo add-apt-repository ppa:webupd8team/java
[sudo] password for XXX:
The Oracle JDK License has changed for releases starting April 16, 2019.

The new Oracle Technology Network License Agreement for Oracle Java SE is substantially different from prior Oracle JDK licenses. The new license permits certain uses, such as personal use and development use, at no cost -- but other uses authorized under prior Oracle JDK licenses may no longer be available. Please review the terms carefully before downloading and using this product. An FAQ is available here: https://www.oracle.com/technetwork/java/javase/overview/oracle-jdk-faqs.html

Oracle Java downloads now require logging in to an Oracle account to download Java updates, like the latest Oracle Java 8u211 / Java SE 8u212. Because of this I cannot update the PPA with the latest Java (and the old links were broken by Oracle).

For this reason, THIS PPA IS DISCONTINUED (unless I find some way around this limitation).

Oracle Java (JDK) Installer (automatically downloads and installs Oracle JDK8). There are no actual Java files in this PPA.

Important -> Why Oracle Java 7 And 6 Installers No Longer Work: http://www.webupd8.org/2017/06/why-oracle-java-7-and-6-installers-no.html

Update: Oracle Java 9 has reached end of life: http://www.oracle.com/technetwork/java/javase/downloads/jdk9-downloads-3848520.html

The PPA supports Ubuntu 18.10, 18.04, 16.04, 14.04 and 12.04.

More info (and Ubuntu installation instructions):
- http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html

Debian installation instructions:
- Oracle Java 8: http://www.webupd8.org/2014/03/how-to-install-oracle-java-8-in-debian.html

For Oracle Java 11, see a different PPA -> https://www.linuxuprising.com/2018/10/how-to-install-oracle-java-11-in-ubuntu.html
More info: https://launchpad.net/~webupd8team/+archive/ubuntu/java
 
Al Hobbs
Ranch Hand
Posts: 380
2
Fedora IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to your first post you are using openjdk, not oracle.  
 
Knute Snortum
Sheriff
Posts: 5930
155
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Al: Kevin is trying to install Oracle Java 8 and ran into the message above.

Kevin: I had to download and install Oracle Java 8 from the Oracle website so that you can agree to the new licensing first.  I can walk you through how I did that.  The basic steps are:

* download Oracle Java 8
* untar the tarball somewhere ($HOME or Downloads is fine)
* mv the new directory to /usr/lib/jvm
* change the java link in /etc/alternatives to point to the Oracle directory in /usr/lib/jvm
* alternatively, you can put the new Java directory in your PATH
 
I will suppress my every urge. But not this shameless plug:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!