setup JAVA_HOME in jenkins centos - java

I am trying to set JAVA_HOME in my Jenkins to run a maven project. So I went
Jenkins-> Global tool configuration-> JDK
and added my JDK path as /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java.
This is the path where the JDK is installed, I have confirmed this by mentioned Ref here
Actual error I am getting below the input box is
/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java is not a directory on
the Jenkins master (but perhaps it exists on some agents)

Related

No JREs found in C:\\Program Files\java in Eclipse Scala IDE

JDK 1.8 is already installed in Windows 10 64 bit system. I am trying to create a scala project in Eclipse Scala IDE. Is says "Unbound classpath container: JRE System Library [JavaSE-1.8] in project.
While checking the Java build path-- Libraries-- JRE is coming outbound.
When I click to add JRE library, it has workspace default JRE (unbound)
While searching through preferences-- installed JRE--search. It gives no JREs.
If I try to add -- standard vm--directory ( JDK dir home). Ideally it should populate or detect all the jars but it doesn't detect.
I Tried running the application as 'Administrator' and it ran successfully.
Select your project and right click--> Build Path --> Configure Build Path -->Select Libraries--> Add Library-->JRE System Library--> Add the installed JRE here.
And if the JRE library is not getting selected, check the environment variables- JAVA_HOME and Path.
And to see if the java is correctly installed, try hitting this from CMD
java -version

Netbeans would not find compatible jdk while installation

Netbeans would not find compatible jdk while installation while JDKs are located at C:Java and the files are:
jdk-8u73-windows-i586
jdk-8u73-windows-x64
jdk-8u141-windows-i586
From NetBeans Installation Instructions
The default location in Windows is C:\Program Files\Java\jdk1.7.0_10 or similar.
If your JDK is at C:\Java you just have to:
re-install the JDK under the default Netbeans location, or
specify your custom location during the installation wizard
Since I've run into this problem and this Q/A came up in my search, here is the solution that I found worked for me on the Windows platform.
I had to set up an system environmental variable named JAVA_HOME that pointed to the JDK directory.
JAVA_HOME=D:\Program Files\Java\jdk1.8.0_144
Even after this change, I still ran into the "An unknown error occured while validating path."
Right-click on the NetBeans install software and select "Run as Administrator...". It looks like running the installer under your normal account, even though it may have admin rights, is not enough to scan the "\Program Files" folder and find the JDK.
*Delete your old java files.
*Download jdk file from.
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
*install new jdk version.
*Then install NetBeans //Now it will automatically identify your jdk and no need for manual selection...

Hudson not identifying the java & ant installed on ubuntu machine

I just installed hudson on my ubuntu machine and in the configuration page i see that hudson did not detect the JDK,Ant & Maven installed on my machine..
Is this common or i should do the configuration manually.
I tried adding the /usr/bin/ in the JAVA_HOME variable but it says it is not a directory..
Actually, I was thinking that hudson to detect Java and Ant installations on my system and display there..but i was wrong.
So i manually added the path for JAVA_HOME and ANT_HOME
I scheduled builds also and it is working great :)

fail in "mvn clean install"?

I am new in learning java programming! I want to make a .jar in a maven project. After running this command mvn clean install, I am getting the following error message:
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile(default-compile) on project wps-demo: Compilation failure
Unable to locate the Javac Compiler in:C:\Program Files\Java\jre7..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and not a JRE(the com.sun.tools.javac.Main class is required)
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable
what can I do for clean this error!
It looks like you have only a JRE (Java Runtime Environment) installed, and not a JDK (Java Development Kit), as this error message says:
Please ensure you are using JDK 1.4 or above and not a JRE(the com.sun.tools.javac.Main class is required)
Download and install the JDK (not JRE) from Oracle's website.
The JRE allows you to run Java programs, but does not include the tools that you need to develop Java software, such as the Java compiler. The JDK does include those tools.
If you already have a JDK installed, then make sure that the JAVA_HOME environment variable refers to the directory where you have the JDK installed, and not to a directory with a JRE.
As your error says you have wrong value in JAVA_HOME variable in system settings... should be something like C:\Program Files\Java\jre6
You can find how to set it HERE for example.
You need to set the environment variable that specifies the location of your java development kit so that windows can find the Java libraries
Put java home path in a JAVA_HOME variable that you can create in the advanced tab of MyComputer properties.
The Java home path would look something like this
C:\Program Files\Java\jdk1.5
Hope this helps
You may also want to have a look at the following article from Maven http://maven.apache.org/guides/mini/guide-building-jdk14-on-jdk15.html
It states that from Maven 2.2.0, Java JDK 1.5 is needed to allow Maven to build the Java project. The article also goes on to show how some of these adjustments can be made so that JDK 1.5 or later can be used in the build process.

Running Jive Dev Enrivonment on Windows 7 64-bit

I've followed the following instructions to get Jive up and running on a windows 7 64 bit machine.
Java
Install latest version of Java
Download Java SE 6 Update 37 JDK (includes JRE) but do not install yet
Open a new command prompt and run java --version to verify that it is correctly installed.
If you receive an error saying version 1.5 was expected and 1.7 was found, make sure all versions of software are for the correct OS (64 or 32 bit) which may require you to uninstall current versions (system will use the most recent version installed, even if you try to install an older version after the newer version was installed)
Eclipse
Download & install Eclipse IDE for Java EE Developers
Once installed, create your default workspace and access Help – Eclipse Marketplace
Search the marketplace for SubClipse and install
Search the marketplace for Maven Integration for Eclipse WTP and install
PostGres
Install postgreSQL
Once you have installed postgres, uninstall java from the C:\oracle\Ora11gR2\product\11.2.0\client_1 directory and install Java version 7 there.
Open pgAdmin, click on the “plug” to create a new connection
Set name and host to localhost and include your network usename, port number, and password used when installing postgres
Expand the database tree, right click to add new login role - configure new login role as super user by selecting all options under role privileges, set PW under definition tab, and hit ok
exit or disconnect and log back in as your user
Create desired databases
Maven
Install binary mirror download of maven
Unzip the distribution archive, i.e. apache-maven-3.0.4-bin.zip to the directory you wish to install Maven 3.0.4. These instructions assume you chose C:\Program Files\Apache Software Foundation. The subdirectory apache-maven-3.0.4 will be created from the archive.
Unzip the distribution archive, i.e. apache-maven-3.0.4-bin.zip to the directory you wish to install Maven 3.0.4. These instructions assume you chose C:\Program Files\Apache Software Foundation. The subdirectory apache-maven-3.0.4 will be created from the archive.
Go to your environment variable (How to) dialog within Control Panel\System and Security\System and access Advanced system settings. On the System properties dialog, go to the Advanced tab and click “Environment Variables”
Add the M2_HOME variable in the system variables with the value C:\Program Files\Apache Software Foundation\apache-maven-3.0.4
add the M2 environment variable in the system variables with the value %M2_HOME%\bin
add the MAVEN_OPTS environment variable in the user variables to specify JVM properties, e.g. the value -Xms256m -Xmx512m
update/create the Path environment variable in the system variables and append the value %M2% to add Maven available in the command line. (add ;%M2% to the end of the path value)
Add/Update JAVA_HOME in your system variables and set the value to the location of your JDK, e.g. C:\Program Files\Java\jdk1.5.0_02
Make sure that %JAVA_HOME%\bin is in your Path environment variable. If not, append to existing Path system variable (remember to separate by semi-colon)
Open a new command prompt and run mvn --version to verify that it is correctly installed.
If this fails investigate the issues discussed in this article.
In the user’s directory (ie \USERNAME.m2) there will be a .m2 directory for the Maven repository. Create a settings.xml file in that directory with the repository settings
Jive Build
Check Jive out of SVN repository
edit the pom.xml file in the project root. Make sure the jive short version at about line 20 is set correctly: 5.0.2.1
Open a terminal window. Change to the top level project directory
Run this: mvn clean install -Djive.setup=false -P external
This is where i get stuck - I get a cmd prompt error when i run mvn clean install -Djive.setup=false -X external to get the debug log, and it says it's still missing the repository.
I've seen some documentation saying to get this all working on a windows 7 machien you should use a VM, but i've also seen that it's possible to do, just not supported.
Has anybody successfully installed, built, and ran jive on windows 7?
Following https://community.jivesoftware.com/docs/DOC-3547 for setting up maven says:
Note: this Maven configuration provides access to Jive binaries and sources via the maven-secure.jivesoftware.com server; it requires login access. See the bottom of the document where to put your login information.
Please request maven access by creating a Supportal case. If you do not have a company group, you may email your maven request to accountsupport#jivesoftware.com
It's possible that you don't have the required access.
the tricky part is getting the eae engine up and running in windows 7. It works from Jive 6 onwards. I remember in Jive 5 running the eae engine in a linux vm and hooking into it. after the setup, unless your doing development that requries the eae engine then you can just shut it off...

Categories

Resources