How can I add websphere admin jars to Hudson's class path? - hudson

I try to use Hudson's Deploy Websphere plug-in to deploy my artifacts to remote websphere.
From the plug-in documentation, I need to do this:
The following WAS JAR files need to be placed into the Hudson class path or dropped into the %project.basedir%/WEB-INF/lib/ directory. These JAR files can be copied from the %WAS_HOME%/runtimes/ directory of your WAS server installation.
com.ibm.ws.admin.client_6.1.0
com.ibm.ws.webservices.thinclient_6.1.0
I have installed hudson as a windows service, how can I add these jars to hudson's class path?

According to Hudson's documentation:
Changing the configuration of services
The JVM launch parameters of these
Windows services are controlled by an
XML file hudson.xml and
hudson-slave.xml respectively. These
files can be found in $HUDSON_HOME and
in the slave root directory
respectively, after you've install
them as Windows services.
The file format should be
self-explanatory. Tweak the arguments
for example to give JVM a bigger
memory.
Stdout and stderr from the service
processes go to log files in the same
directory.
So, it appears you can manipulate the service's JVM classpath using the hudson.xml file.
HTH

Related

I am working with JDBC, and I have used mysql-connector 8 to run my java program from command line

When I am compiling the Java code, I have written the command line shows the following:
C:\HTML>javac Jdbc.java
Jdbc.java:5: error: package com.mysql does not exist
Class.forName(com.mysql.jdbc.Driver);
^
1 error
I have installed XAMPP and started the Apache, MySQL and Tomcat and they are working. I have installed MySQL Connector which is platform independent and latest. I have copied the JAR executable file to the JDK folder. I have added the jar executable file path in the edit system environment variables,
''' Class.forName(com.mysql.jdbc.Driver);'''
If you reference classes from a library, you should add that library to the classpath (i.e. javac -cp .;path\to\your\mysql-connector.jar Jdbc.java). However, that would immediately result in a different error, because that code should be Class.forName("com.mysql.jdbc.Driver") (passing a String).
Some further remarks:
I have copied the JAR executable file to the JDK folder.
You should never manually copy files to the JDK folder (in older versions there was the ext mechanism, but this no longer exists in recent Java versions). In addition, MySQL Connector/J is a library, not an executable jar.
I have added the jar executable file path in the edit system environment variables
Java JARs do not belong on the PATH. In theory you can add them to CLASSPATH environment variable, but that is generally considered a bad idea: most ways of executing Java do not actually use it, and if it does get used, it can result in unexpected behaviour because of conflicting or unexpected libraries on the classpath, etc.

LibGDX creating (desktop) platform runnable

I want to export may project (game) to different desktop platforms. I exported it from eclipse (on Windows) and I get JAR file. On my machine I can start it, but on other it won't work. I guess JRE is missing there.
So, I followed LibGDX instructions how to deploy on different platforms:
https://github.com/libgdx/libgdx/wiki/Deploying-your-application
But when I run that packr.jar app I get following output:
D:\packing>java -jar packr.jar windows.json
Output directory 'D:\packing\windows' exists, deleting
Unpacking JRE
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
copying resources
minimizing JRE
unpacking rt.jar
packing rt.jar
Done!
After that I really get my exe file, all together with jre dir, my original game jar file and some config.json file, but that exe file just won't run. No failure message, just won't run. Any idea what's going on here? Or maybe there is some other tool for packing jar files?
All I need is to make my game runnable on desktop platforms: Windows, Mac & Linux.
For windows OS you could use something like launch4j which simply puts a wrapper around your jar file.
It also has the capability to provide a given jre. So your users do not need to have one installed.
Ok, solved this.
So I've found out that if I run exe file from console (cmd) and redirect output to file I can have some error report regarding the run attempt. So I did that:
myapp.exe > log.txt
and get log this log file:
Loading JVM runtime library ...
Passing VM options ...
# -Xmx1G
Creating Java VM ...
Error occurred during initialization of VM
Unable to load ZIP library: D:\packing\windows\jre\bin\zip.dll
Zip file was there, but something was wrong with it so I replaced it with one I had in my Java installation (my was larger). After that I was able to run exe file well.

Using Visual Studio Online to build Windows Store Apps?

I have a Windows Store Application (Windows 8.1), hosted on a GIT repo on Visual Studio Online.
I created a build definition, left all the default values as they were, ran the build and downloaded the artifacts.
I didn't find the Powershell script used to side load (install) the application, instead I found an .exe file.
What can be missing to generate the Powershell script needed to install the app?
The default build configuration is copying the files in "bin" folder to artifacts, that's why you see exe file.
To copy the package files to artifacts, please configure your build definition as following:
In "Visual Studio Build" step, add following argument in "MSBuild Arguments":
/p:AppxPackageDir="$(Build.BinariesDirectory)\AppxPackages\\"
And in "Publish Build Artifacts" steps, set "Path to Publish" as following:
$(Build.BinariesDirectory)\AppxPackages
To package Windows Store App during the TFS build process, you can (assume you're using XAML build):
1). Set MSBuild Arguments to be: /p:DeployOnBuild=true;DeployMethod=Package /p:DefaultPackageOutputDir="$(TF_BUILD_BINARIESDIRECTORY)"\StoreAppPackage
2). Set Output location to be 'SingleFolder' or 'PerProject'.
Then, after you queue one build, you will find one folder called StoreAppPackage in the TFS Build Drop folder. You can then find the Add-AppDevPackage.ps1 file.

Glassfish Applications Not Starting

I was just reading about using libraries in glassfish. That is, put jar files in a 'centralized' location so that it can be accessed from different web applications. domains-dir/lib/ext is one of such locations. I put some jar files there and restarted the server. The restart was successful but no application would load; not even the admin console. I investigated this and found the culprit to be the primefaces jar file I put. On removing it, glassfish worked properly. I've tried versions 3.1 and 3.2 of primefaces and the results are the same. On checking the server log, I find that, with primefaces in the ext folder, the class javax.faces.context.PartialViewContextFactory fails to load. Any idea what might be causing this. I should probably try the other library locations like domains-dir/lib/ but I'm curious.
By the way, I'm working on a windows 7 OS and using glassfish 3.1.1
Thanks.
Just put the libs in domains-dir/lib/.
From the Glassfish manual:
To use the Common class loader, copy the JAR files into the domain-dir/lib or as-install/lib
directory or copy the .class files (and other needed files, such as .properties files) into the
domain-dir/lib/classes directory, then restart the server.
Using the Common class loader makes an application or module accessible to all applications
or modules deployed on servers that share the same configuration.However, this accessibility
does not extend to application clients.
More information about classloading in Glassfish can be found here.

FlashDevelop Configuration Issue - demands Java 1.6

I've been using Flashdevelop (version 4.4) for some time now with zero problems. I recently reinstalled Windows 7 however, and after installing Flashdevelop it is demanding Java 1.6 and won't compile without it. Let me be more specific, here is the error I get when I try to compile a simple HelloWorld-type test:
"Running process: C:\Program Files (x86)\FlashDevelop\Tools\fdbuild\fdbuild.exe "C:\Users\marc\Documents\DeleteMe\DeleteMe\DeleteMe.as3proj" -ipc 01be003c-6cb5-4d0b-9c35-c59dd2ea7a19 -version "4.6.0; 3.3" -compiler "C:\Program Files (x86)\FlashDevelop\Tools\flexsdk" -library "C:\Program Files (x86)\FlashDevelop\Library" -cp "C:\Program Files (x86)\Java\jdk1.6.0_34\bin" -cp "C:\Program Files (x86)\Java\jdk1.6.0_34"
Building DeleteMe
mxmlc -load-config+=obj\DeleteMeConfig.xml -debug=true -incremental=true -swf-version=16 -o obj\DeleteMe634829909556672047
Starting java as: C:\Program Files (x86)\Java\jdk1.6.0_34\bin\java.exe;\bin\java.exe
Unable to start java.exe: The system cannot find the file specified
Could not compile because the fcsh process could not be started.
Build halted with errors (fcsh).
INITIALIZING: Failed, unable to run compiler
Done(1)"
The GlobalClasspath setting for the Java 1.6 JDK is set to: C:\Program Files (x86)\Java\jdk1.6.0_34\bin
I have also set my JAVA_HOME environment variable to the same location as well. Might I be neglecting to set another environment variable?
JAVA_HOME should be
C:\Program Files (x86)\Java\jdk1.6.0_34
and not
C:\Program Files (x86)\Java\jdk1.6.0_34\bin
FlashDevelop currently doesn't support that your JAVA_HOME environment var contains several paths (C:\Program Files (x86)\Java\jdk1.6.0_34\bin\java.exe, \bin\java.exe).
Modify it to only indicate the first path (C:\Program Files (x86)\Java\jdk1.6.0_34\bin\java.exe).
As someone who was dealing with this, I just found an answer that doesn't involve mucking with the PATH variables.
Go into your Flex SDK, /bin directory, look for the JVM config file conveniently named jvm.config
Inside, there is a param 'java.home' which, if left empty, will cause it to search for it's own value. Enter in the main path to the JRE - in my case,
java.home=C:\Program Files\Java\jre1.6.0_07\
I found mine by going to "Control Panel > Java > Java tab > View... button" to see all the installed versions and their paths
I prefer this method because I feel like you shouldn't have to modify settings on your whole system to get 1 program to work, if you have the option instead to just modify that program's settings.
jvm.config in C:\Program Files (x86)\FlashDevelop\Tools\flexsdk\bin\jvm.config is much more better than path variable.
Please avoid Path variable.
In jvm.config just set jre URL directory
java.home=C:\Program Files\Java\jre1.6.0_07
May be you update the Java, last version of Java ask you to delete older version. Then go into the file
C:\Program Files (x86)\FlashDevelop\Tools\flexsdk\bin\jvm.config
and replace
java.home=C:\Program Files\Java\jre1.6.0_07\
by the folder were is your new version
java.home=C:\Program Files (x86)\Java\jre1.8.0_25\