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 :)
Related
Windows 10 OS. I'm using a Cygwin BASH console to run Gradle.
I've been struggling with this for a few hours now. There are one or two questions on SO which seem to relate this but I'm still a long way from understanding the basic mechanisms and how to get Gradle to use the right JDK/JRE.
This started earlier when gradle build didn't work and complained that it couldn't find "tools.jar". This appears to be a sign that the path to the Java JRE used to run the Gradle app isn't associated with a JDK. This is indeed the case: the JRE it insists on using to start up is at "C:\Program Files\Java\jre1.8.0_73\". This is a JRE without a JDK.
The JDK I want Gradle to use is at "D:\apps\Java\jdk1.8.0_191\".
I have set JAVA_HOME to this value. I have also placed "D:\apps\Java\jdk1.8.0_191\bin\" at the very start of the PATH environment variable.
In both Cygwin and the W10 console, when I go "java -version" it prints out the 1.8.0_191 version, proving that the OS System is configured as expected.
But Gradle itself insists on using the JRE in C:.
I tried numerous experiments and rebooted numerous times.
When I went, in build.gradle:
println "java.home is ${System.properties['java.home']}"
... it always printed out the C:\ location version (1.8.0_73)
Finally I made this impossible by renaming "C:\Program Files\Java\" to "C:\Program Files\JavaXXX\". This then gives:
Chris#M15B /cygdrive/d/My Documents/software projects/EclipseWorkspace/LuceneIndexer_3
$ gradle build Error: could not open `C:\Program Files\Java\jre1.8.0_73\lib\amd64\jvm.cfg'
So it appeared, as far as I could surmise, that something inside Gradle has got its heart stubbornly set on using a particular JRE location... which disregards the JAVA_HOME variable, the PATH entries and the OS's own understanding of which JDK/JRE should be used... and even sets System setting java.home to a "spurious" setting (or one I don't want to use).
Finally... I put this line in gradle.properties:
org.gradle.java.home=D:\\apps\\Java\\jdk1.8.0_191
When I then changed "C:\Program Files\JavaXXX\" back to "C:\Program Files\Java\", finally the thing built properly. And finally java.home was printed out as "D:\apps\Java\jdk1.8.0_191". But when I again renamed to "C:\Program Files\JavaXXX\" the "could not open" error returned. In other words, even if you can configure java.home in Gradle, Gradle itself appears to be reliant on a version of Java that you don't want it to use, and which is not the version for which the OS is configured!
How on earth does the Gradle application find the JRE it is going to use to do its business? Surely there must be a way to get it to use another one?
later
I also tried adding some ECHO statements to the gradle startup script... in which there is a specific section devoted to determining the JVM to use. These experiments showed clearly that this script is correctly using the desired JDK (under D:). Nor can it be a Cygwin-related problem, as other Cygwin commands work fine when Java\ is renamed to Java_XXX. I also examined the registry: no clues found.
By going "gradle" at the Cygwin command prompt, something somewhere in the works insists on using a baked-in JRE location, even before the gradle startup script is run...
I was able to resolve this by upgrading my system's Java and Gradle. I changed to Java 9 (although apparently we're on Java 11 at the time of writing). I also changed to Gradle 5.2.1 (from 3.5). I think I concluded that Gradle 3.5 was incompatible with Java 9...
I was quite confused: for a moment it appeared that Cygwin was out of date and that I needed a newer version of its Gradle. But in fact Cygwin was inheriting PATH from W10, and one of those PATH entries was "%GRADLE_HOME%\bin". Cygwin was using the W10 Gradle. What fun to be using a Windoze OS!
GRADLE_HOME (different from GRADLE_USER_HOME, where dependencies are downloaded!) thus had to be changed to the location of the new version of Gradle.
All sorts of funny consequences followed for Eclipse: the dreaded red exclamation marks... caused by the fact that under "Project and External Dependencies" for several projects the dependencies revealed themselves to be located in the old 3.5 GRADLE_USER_HOME location, which I had renamed deliberately to make it inaccessible. I found no way to "rebuild" these dependencies in Eclipse (i.e. to force use of GRADLE_USER_HOME, now pointing to a location under ...5.2.1), and instead opted to recreate the Eclipse projects.
Quite trying. There must of course be a better way.
Incidentally, it does indeed appear that when you run a Gradle command in Cygwin the JVM as configured for your OS in the "Java Control Panel" gets invoked before the gradle startup script is run (... I think). Even if your JAVA_HOME setting and first PATH entry are pointing to a different JRE (which they probably shouldn't be).
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)
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...
I am trying to install jre 8.0 on eclipse neon, when I go preferences>java>Installed JRE's>add>standardVM I don't know what it is asking for when it requires a JRE home, it needs a specific type of directory and I don't know what that is. I tried downloading the JRE from elipse's website, but when I put that in it doesn't work. Any help is appreciated.
Eclipse Neon has a dependency on Java8. And atleast JRE needs to be installed. However for most development efforts a JDK environment is recommended. You want to download and install Jdk8 or JRE8 from Oracle site and setup the Java_Home and Path environment variables in Advanced System Settings.
Test that you have java installed correctly by running java -version on the command prompt.
If done correctly, eclipse will automatically detect your jre.
If the project needs the jre to be identified under Preferences as you were trying, you need to check where jre is installed on your machine. Normally it is either "C:\Program Files\Java\jre-version_no" or "C:\Program Files\Java\jdk-version_no\jre". Browse the location, give it a unique name (if it automatically doesnt detect) and it should let you add it.
download and install Jdk8 or JRE8 from Oracle site and setup the Path in environment variables then test it using command prompt, if it's working properly then ur good to go. Go to add external jar and u will find it as system jars, if u have multiple jdk versions then it will show u all the list, u just add the version u like ( I guess jre8). It's very simple steps, ask me if it doesn't work out. I can help u in remote installation also
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...