LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-12-2019, 06:08 PM   #1
elrodrix
LQ Newbie
 
Registered: May 2015
Posts: 3

Rep: Reputation: Disabled
NoClassDefFoundError Error Java JDK


Hello guys.

I am trying to install JDK on my laptop. I am using Slackware 14.2 stable.

I downloaded jdk.rpm, then ran rpm2tgz and finally installpkg jdk.gtz

When I want to see the version, I have the following error:
user @ user: ~ $ java -version
Error occurred during initialization of VM
java / lang / NoClassDefFoundError: java / lang / Object

These are the PATH I have:
user @ user: ~ $ which java
/usr/java/jdk1.8.0_221-amd64/bin/java
user @ user: ~ $ whereis java
java: / usr / share / java /usr/java/jdk1.8.0_221-amd64/bin/java /usr/java/jdk1.8.0_221-amd64/jre/bin/java

And my .sh file is this:
bash-4.3 # cat /etc/profile.d/jdk.sh
#! / bin / sh
export JAVA_HOME = / usr / java / jdk1.8.0_221-amd64
export MANPATH = "$ {MANPATH}: $ {JAVA_HOME} / man"
export PATH = "$ {PATH}: $ {JAVA_HOME} / bin: $ {JAVA_HOME} / jre / bin"
bash-4.3 #

Could someone please guide me in this installation ?, does anyone know where the error is?

Thanks in advance
 
Old 09-12-2019, 06:34 PM   #2
abga
Senior Member
 
Registered: Jul 2017
Location: EU
Distribution: Slackware
Posts: 1,201

Rep: Reputation: 634Reputation: 634Reputation: 634Reputation: 634Reputation: 634Reputation: 634
Looks like your manual installation is not OK - the rpm package you downloaded is not consistent or your env definitions have some glitches.
https://stackoverflow.com/questions/...derror-in-java

Try to clean up your JDK installation and use the JDK SlackBuild instead:
http://www.slackbuilds.org/repositor...velopment/jdk/

You'll need to download the jdk-8u221-linux-*.tar.gz package and Oracle wants you to be registered. There's a workaround I presented in this post:
https://www.linuxquestions.org/quest...ml#post6023483
Unfortunately the github links I provided are not updated to the latest version of JDK - 8u221
If you can find the jdk-8u221-linux-*.tar.gz archive in another public repository on the web, then you can verify its integrity by using the checksums from here:
https://www.oracle.com/webfolder/s/d...1checksum.html

Last edited by abga; 09-12-2019 at 06:35 PM. Reason: added env sentence
 
1 members found this post helpful.
Old 09-12-2019, 07:33 PM   #3
elrodrix
LQ Newbie
 
Registered: May 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by abga View Post
Looks like your manual installation is not OK - the rpm package you downloaded is not consistent or your env definitions have some glitches.
https://stackoverflow.com/questions/...derror-in-java

Try to clean up your JDK installation and use the JDK SlackBuild instead:
http://www.slackbuilds.org/repositor...velopment/jdk/

You'll need to download the jdk-8u221-linux-*.tar.gz package and Oracle wants you to be registered. There's a workaround I presented in this post:
https://www.linuxquestions.org/quest...ml#post6023483
Unfortunately the github links I provided are not updated to the latest version of JDK - 8u221
If you can find the jdk-8u221-linux-*.tar.gz archive in another public repository on the web, then you can verify its integrity by using the checksums from here:
https://www.oracle.com/webfolder/s/d...1checksum.html
Yeah, it was that. I did using SlackBuilds and now it's working. Thanks !
 
  


Reply

Tags
class, error message, java, jdk


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Java runtime error. Exception in thread "main" java.lang.NoClassDefFoundError: / Priyadivya Red Hat 2 10-26-2010 05:01 AM
Yet another java classpath question --- java.lang.NoClassDefFoundError Jama raequin Programming 1 12-29-2009 01:04 PM
Installing Java Based Application throws "java.lang.NoClassDefFoundError" ConfigMan_08 Linux - Newbie 10 12-22-2008 04:58 PM
Java: java.lang.NoClassDefFoundError: javaapplication8/Factorial chief_officer Programming 9 05-31-2006 03:28 PM
java exception: java.lang.NoClassDefFoundError kath Programming 12 05-11-2006 04:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:21 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration