Unable to Install Jenkins on Ubuntu 14.04.5 - java

I tried installing jenkins on Ubuntu 14.04.5 and ended up with some errors saying,
Setting up jenkins (2.80) ...
Found an incorrect Java version
Java version found:
java version "1.7.0_131"
OpenJDK Runtime Environment (IcedTea 2.6.9) (7u131-2.6.9-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.131-b00, mixed mode)
Aborting
invoke-rc.d: initscript jenkins, action "start" failed.
dpkg: error processing package jenkins (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead (0.100.0-16) ...
Errors were encountered while processing:
jenkins
E: Sub-process /usr/bin/dpkg returned an error code (1)
As jenkins requires Java 8 to run, I tried installing Java 8 and again getting the same error mentioned above. I have tried removing jenkins, ended up with the same error "Found an incorrect Java version".
I need help to get this issue resolved. Thanks in advance.

Have a look here:
can't upgrade jenkins for java version error
If that does not help:
Have you checked alternatives and JAVA_HOME? If not, please check the output of these commands:
update-alternatives --config java
echo $JAVA_HOME
Both should be set to java 8 values.

Related

Apache JMeter report generation error in MacOs (Begin size 0 is not equal to fixed size 5)

Getting the below error, when trying the cmd as :
jmeter -g /path/result/testo1.csv -o /path/result/report
An error occurred: Error while processing samples: Consumer failed with message :Consumer failed with message :Consumer failed with message :Consumer failed with message :Begin size 0 is not equal to fixed size 5
I have already ran the cmd to run the test and generate the csv file properly
I have also tried this, but it doesn't worked.
Using Jmeter 5.4.3, installed via brew
java -v :
openjdk version "15" 2020-09-15
OpenJDK Runtime Environment AdoptOpenJDK (build 15+36)
OpenJDK 64-Bit Server VM AdoptOpenJDK (build 15+36, mixed mode, sharing)
It looks like a bug 65838, the options are in:
Downgrade your Java version to Java 8
Try out the nightly build, there is a chance that the issue is fixed there. However I doubt you will be able to install it using homebrew, you will have to go through the manual JMeter installation process (not very complex though)

Could not start Burp: java.lang.UnsatisfiedLinkError: no splashscreen in java.library.path

When trying to run BurpSuite on linux manjaro the following error occurs: "Could not start Burp: java.lang.UnsatisfiedLinkError: no splashscreen in java.library.path"
java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)
Had the same error. Fixed it 2 minutes ago with:
sudo apt-get install openjdk-14-jre
Then just re-run burpsuite, and it will launch.
Recently encountered the same error message on Ubuntu.
I Fixed It uninstalling JDK and running burp installer again.(Burp installer includes OpenJDK 12 which is used by BurpSuite.)
Finally I ran BurpSuiteCommunity from terminal instead of burpsuite_community.jar. Hopefully that fixes the problem.
This happened for me because i have updated Java.
Then to solve I just uninstalled the JAVA update
and fixed(changed) environment variables respectively.
Now Burp suite works as it was working before!

java.lang.UnsupportedClassVersionError even though java -version and javac -version are the same

In my university we are learning about writing RMI applications. When I first tried running the example application in Eclipse 2019-03 I ran into the error:
java.lang.UnsupportedClassVersionError
I successfully ran other projects (non RMI) without any problems.
When I run
java -version
I get:
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode, sharing)
and
javac -version
I get:
javac 11.0.3
I have Java 8 and 11 installed on my system running Ubuntu 18.04.
When looking for a solution to the problem, I found this question:
How to fix java.lang.UnsupportedClassVersionError: Unsupported major.minor version
Changing the settings of the compiler compliace level in Eclipse to 1.8 did AND changing the project specific Settings helped me and I was able to finally run the Application without any errors. This solution does not satisfy me though.
When I run
update-alternatives --config java
and
update-alternatives --config javac
in both cases openjdk11 is selected.
I do not understand, why I get the error if i dont change the compiler settings.
One of the answers suggested it is a wrongly set $JAVA_HOME varable. When I run:
jrunscript -e 'java.lang.System.out.println(java.lang.System.getProperty("java.home"));'
It indeed gives me the answer
/usr/lib/jvm/java-8-openjdk-amd64/jre
I tried following this guide to change it to openjdk11:
https://askubuntu.com/questions/175514/how-to-set-java-home-for-java
When I now run
echo $JAVA_HOME
I get:
/usr/lib/jvm/java-11-openjdk-amd64
but when I run
jrunscript -e 'java.lang.System.out.println(java.lang.System.getProperty("java.home"));'
again the answer is still the same.
I want to be able to use my openjdk 11 to compile and run the code without changing the compiler settings in Eclipse. Anybody had the same problem and a tip for me?
Thank you in advance!
The full error is the following:
java.lang.UnsupportedClassVersionError: chapter6/Counter has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
The /etc/alternatives is ignored when running inside Eclipse. Instead, you have a separate definition of which JDK/JRE to use. This can be set globally in the Eclipse Preferences, one-by-one in the Project Properties, or even at the Debug/Run configuration (in order to test your application in multiple java versions).

java --version doesn't work in the command line

I tried java --version in the command line and I get :
Unrecognized option: --version
Error: Could not create the Java virtual machine
Error: A fatal exception has occurred. Program will exit.
Everything was working fine until I installed jre 7 (I had jdk 1.6 preinstalled )
So, I uninstalled the previous versions, restarted and then installed fresh jdk 7u5 windows i586.
Still I get the same problem. Can anyone help me with this?
I am unable to install and run maven for this reason.
You used two - marks. Try with one: java -version.
Update: Since Java 9 java and javac commands support both --version and -version.
java -version
This is the command to get the current installed version info

Android SDK update fails, saying-> XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml

Am new to Java and Android. I am trying to install Android SDK on Debian Squeeze. I have just downloaded and setup the SDK. When I try to update the packages list I get following error.
XML verification failed for http://dl-ssl.google.com/android/repository/repository.xml.
Error: java.lang.NullPointerException
I have checked the force https to use http and this is the only error I see. Am I missing something?
I just checked my java version
kumar#gentlehow-lx:/$ java --version
java version "1.5.0"
gij (GNU libgcj) version 4.4.5
...
I tried to do a sudo update and the packages were not updated.
I fixed this by manually downloading the XML and then from XML I figured out which zip file I needed. After downloading the file I simply extracted the file and moved the extracted folder to SDK/platforms folders. The API was visible in in Installed components.
I've found that this seems to be an issue with the java-gcj.
Once I installed the oracle java and stopped using java-gcj the error went away.
You can grab the oracle java here: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Also, after installing oracle java and when using Fedora I had to issue the following two commands to get the oracle java to be the default:
sudo alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_25/bin/java 20000
sudo alternatives --install /usr/bin/javaws /usr/java/jdk1.6.0_25/bin/javaws 20000
After installation, running 'java -version' should give you a simliar output to verify it installed correctly:
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) Server VM (build 20.0-b11, mixed mode)
Re-run the android tools and everything should work.
try this: find the file androidtool.cfg and add the following line:
sdkman.force.http=true
and try again.

Categories