Where does the Jenkins Windows installer put java? - java

I installed the Jenkins MSI sliently
c:\windows\temp\jenkins.msi /qn /L*V c:\windows\temp\jenkins.log
Seems to be running OK, but it appears java is not in the system PATH. Where does the MSI put java?
Edit:
I'm asking this because I want to install plugins like this:
java -jar jenkins-cli.jar -s http://127.0.0.1:8080/ install-plugin http://updates.jenkins-ci.org/download/plugins/aws-lambda/0.5.5/aws-lambda.hpi
I can't run this command because I don't know where to java exe is

It puts it here: 'C:\Program Files (x86)\Jenkins\jre\bin\java.exe'

Related

Cordova can't find my Java installation, but JAVA_HOME looks valid. What's going on?

Windows 7 64-bit, with 64-bit JDK. Cordova plugman 1.4.2-dev. Using cygwin bash as a shell, but I don't see why that would affect anything.
$ echo $JAVA_HOME
"c:\Program Files\Java\jdk1.8.0_25"
$ echo $ANDROID_HOME
C:\Users\admin\AppData\Local\Android\Sdk
$ ls "c:\Program Files\Java\jdk1.8.0_25"
bin include lib release
COPYRIGHT javafx-src.zip LICENSE THIRDPARTYLICENSEREADME.txt
db jre README.html THIRDPARTYLICENSEREADME-JAVAFX.txt
$ ./main.js install --platform android --project ../myproject/ --plugin phonegap-facebook-plugin-gtg --variable APP_ID="1155264567919069" --variable APP_NAME="Voice Test"
Fetching plugin "phonegap-facebook-plugin-gtg" via npm
Installing "phonegap-facebook-plugin" for android
Failed to install 'phonegap-facebook-plugin':CordovaError: Failed to run "javac -version", make sure that you have a JDK installed.
You can get it from: http://www.oracle.com/technetwork/java/javase/downloads.
Your JAVA_HOME is invalid: "c:\Program Files\Java\jdk1.8.0_25"
I've also tried using JAVA_HOME without the quotes. What's going on?
#cubrr gave the correct answer in the comments. The error message being produced by Cordova is extremely misleading: the problem isn't that JAVA_HOME was incorrect, but that javac wasn't on my path. This was made all the more confusing by the fact that java was on my path, so when I checked it gave correct results. This is because the Oracle installer adds a directory to your path (c:\ProgramData\Oracle\Java\javapath) that contains links to java.exe and related programs but not the relevant JDK programs.
1) set > system variables > path to
`;C:\Program Files\Java\jdk1.8.0_xxx\bin;`
2) create new JAVA_HOME path with the value
C:\Program Files\Java\jdk1.8.0_xxx
now check javac version by issuing command at CMD
javac -version
*** don't touch the oracle - "C:\ProgramData\Oracle\Java\javapath;" path
If you are running windows 10, you need to restart your computer after changing the path and other variables. Possibly also on earlier windows versions.

Specify Java Location for Gatling

I am running Gatling on Centos server. The Server has Java 1.7 installed which is not supported by Gatling 2.2 and I am not allowed to update Java version. I was wondering if there was a way to specify java location in gatling configuration to run from a specific Java installation and not from /usr/bin or /usr/sbin. Thanks in advance.
Regards,
AB
You could export JAVA_HOME=/<your-path> before running gatling.
Assuming you're using the gatling.sh script to launch Gatling, you can just edit that script to refer to whatever installation of the JDK that you want. You can set a local JAVA_HOME value and also prefix the calls to java executable with the full path of your JDK 8 installation.
For example, near the end of the shell script, something like this:
JAVA_HOME=/path/to/JDK8
# Run the compiler
${JAVA_HOME}/bin/java java $COMPILER_OPTS -cp "$COMPILER_CLASSPATH" io.gatling.compiler.ZincCompiler -ccp "$COMPILATION_CLASSPATH" "$#" 2> /dev/null
# Run Gatling
${JAVA_HOME}/bin/java $JAVA_OPTS -cp "$GATLING_CLASSPATH" io.gatling.app.Gatling "$#"

apache ant Could not find or load main class org.apache.tools.ant.launch.Launcher

I'm trying to compile a tool which uses apache ant on linux
https://github.com/lindenb/jvarkit
When I tried to compile the tool , I get n error.
$ make vcffilterjs
this is what I get when I'm running the command
echo "Compiling htsjdk with ${JAVA_HOME} = /usr/lib/jvm/java/jre/"
Compiling htsjdk with /usr/lib/jvm/java/jre/ = /usr/lib/jvm/java/jre/
echo "Compiling htsjdk library for java. Requires apache ANT. If it fails here, it's a not a problem with jvarkit."
Compiling htsjdk library for java. Requires apache ANT. If it fails here, it's a not a problem with jvarkit.
echo "And ${JAVA_HOME}/bin/javac should be >=1.7"
And /usr/lib/jvm/java/jre//bin/javac should be >=1.7
(cd /home/jannahS/jvarkit/htsjdk-1.139 && ant )
Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
make: *** [/home/jannahS/jvarkit/htsjdk-1.139/dist/htsjdk-1.139.jar] Error 1
I have installed apache ant and tried to set ANT_HOME following google instruction
export ANT_HOME=apache-ant-1.9.6
ANT_OPTS="-Xms256M -Xmx512M"
PATH=$PATH:$HOME/bin:$ANT_HOME/bin
export ANT_HOME ANT_OPTS PAT
I also have set JAVA_HOME
export JAVA_HOME=/usr/lib/jvm/jre-1.7.0
export PATH=$JAVA_HOME/jre/bin:$PATH
When I run
ant --execdebug
exec "/usr/lib/jvm/java/jre//bin/java" -Xmx256M -classpath "apache-ant- 1.9.6/lib/ant-launcher.jar" -Dant.home="apache-ant-1.9.6" -Dant.library.dir="apache-ant-1.9.6/lib" org.apache.tools.ant.launch.Launcher -cp ""
Buildfile: build.xml does not exist!
Build failed
I don't know what else to do to make things to work. I can't compile the tool that I want to use without apache ant
Use full path in ANT_HOME, eg:
export ANT_HOME=/usr/lib/apache-ant-1.9.6
It dependes where it is exactly located
Could not find or load main class org.apache.tools.ant.launch.Launcher
In mac this is due to some environment issue if you install the ant using brew command,
copy the lib folder from the ant and paste it into the bin folder
now run the command issue is resolved:-)
issue reason
ant is trying to get the bin/lib/ant-launcher.jar file from the invalid path
In Mac, after running brew install ant, I had to run brew link ant to fully link ant to system environment.
Running brew link --verbose --overwrite ant I get:
Linking /usr/local/Cellar/ant/1.10.5...
ln -s ../Cellar/ant/1.10.5/bin/ant ant
ln -s ../Cellar/ant/1.10.5/bin/antRun antRun
ln -s ../Cellar/ant/1.10.5/bin/antRun.pl antRun.pl
ln -s ../Cellar/ant/1.10.5/bin/complete-ant-cmd.pl complete-ant-cmd.pl
ln -s ../Cellar/ant/1.10.5/bin/runant.pl runant.pl
ln -s ../Cellar/ant/1.10.5/bin/runant.py runant.py
6 symlinks created
And when running "ant" with no params from command-line:
Buildfile: build.xml does not exist!
Build failed
Which is what I expect if testing outside the context of an existing ant project.
Run "which ant" >> to know if the ant_home set. If not please run below with your corresponding paths to set ant_home
export ANT_HOME =/ade_autofs/gd29_3rdparty/ANT_1.7.1_GENERIC.rdd/080925/ant
export PATH=/ade_autofs/gd29_3rdparty/ANT_1.7.1_GENERIC.rdd/080925/ant:${PATH}
Try ant build. It should work without any error.
"I agreed with full path issue for the above issue, getting the same exception while folder has access problem"
I have faced the same exception in Macbook. Checked all the configurations JAVA_HOME, ANT_HOME and org.apache.tools.ant.launch.Launcher file in Ant related jars. Finally, found the issue, due to an access problem of the apache-ant folder. I have no admin access, so I moved my setup to the desktop.
$ make vcffilterjs : Compiles OK, with any of these "Linux OS´s" :
Debian 8 Jessie, CentOS 7, Fedora 23, Ubuntu 15.10, PCLinuxOS 2015.
No "ANT_HOME" or "JAVA_HOME" settings required, by using the default installed 'ant' and openjdk.
? Which "Linux OS" are you using ?
antjvarkit

What makes an app PowerPC based

So I coded an app in Xcode in Objective-C, which packages a jar file so that it should run as if it were executed in Terminal. The Xcode app runs, but the packaged jar that the app creates gives an error
The app file structure is
Foo.app
-Contents
--Info.plist
--MacOS
---foo.jar
---launcher
--Resources
I also ran chmod a+x on the launcher to make it executable
The contents of the launcher are
#!/bin/sh
cd "$( dirname "$0" )"
sudo java -Xmx1G -jar "foo.jar" -o true
When I try to run the packaged app it says that PowerPC apps are no longer supported.
After reviewing the code a few more times and noticed that when creating a launcher I used NSUnicodeStringEncoding instead of NSUTF8StringEncoding, which caused the app to not work.

QNAP NAS nohup: no such file or directory

I try to run a jar file from shell on my qnap nas and tried to use nohup:
nohup java extender.jar &
But i get an error
nohup: no such file or directory
if i run
java extender.jar
it works.
i tried to find nohup
find -name nohup
but the result is empty. It seems to me nohup is not installed. But how can i install nohup? Sorry for this question but i am new to linux.
nohup is not installed on a QNAP NAS!
You can install it:
Install ipkg from Webinterface Application Manager (QPKG)
Login via ssh and run:
ipkg update
ipkg list | grep coreutils
ipkg install coreutils
Thats all!

Categories

Resources