Skip to main content

Compiling with jdk1.3.1

Recently I tried to build a project under Suse 9.3 with jdk1.3.1. Normally I use 1.4.2, and all went well. However when I set my java to jdk1.3.1 and start up the compile, I get the following error:

[javac] Compiling 1634 source files to /home/jan/workspace/release/build.bak/xxxx/build/classes
[javac] error: compiler message file broken: key=compiler.err.sun.io.MalformedInputException arguments=null, null, null, null, null, null, null

I found out that it was while the original charset of the files was different as the locale of my current shell.
The command locale shows:
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
..

When I made an explicit `export LANG=en_US.ISO-8859-1` I could run my compile again. Strangely, jdk1.4 does not suffer from this problem.

To change my environment to jdk1.3.1 and another ant, I use a source script change-java-ant-1_3_1.source:
export JAVA_HOME=/usr/local/jdk1.3.1_16
export ANT_HOME=/usr/local/apache-ant-1.6.3
export PATH=$JAVA_HOME/bin:$PATH
export PATH=$ANT_HOME/bin:$PATH
alias ant="ant --noconfig"
export LANG=en_US.ISO-8859-1

echo "run with source, and not as shell; else it gets forked"
echo "alias of ant set to ant --noconfig"
echo "LANG set to en_US.ISO-8859-1 so that latakia compile works"
echo
echo "test with java -version"
echo " ant -version"
echo " locale"

The --noconfig is needed so that the /etc/ant.conf will not be read. This ant.conf file has already been set to my suse rpm-based ant.
To load the source script I must use source. When I would use a shell to execute it, the new settings would only be valid inside the new shell.

Comments

Popular posts from this blog

SSL handshake failed: Secure connection truncated

Got this problem on Ubuntu 9.10 and 10.10. svn co --username=xx https:/yy zz “SSL handshake failed: Secure connection truncated” According to this link bug-ubuntu The solution is: sudo apt-get install libneon27 cd /usr/lib/ sudo rm libneon-gnutls.so.27 sudo ln -s /usr/lib/libneon.so.27 libneon-gnutls.so.27

Interactive selenium testing

The problem Location of elements When I started using selenium, I noticed that it is not easy to do it right. First you start with IDE, but you notice, that the IDE does not really record a lot. In a next step I added firebug, and started analyzing how the elements where to be located: either by tag, id, class etc. Junit testcase With this information I could then create my junit testcase: @Test public void testMapView() throws Exception { //assert that we cannot see submenu of MapCreator elem = driver.findElement(By.className(SeleniumConstants.MAP_SUB_MENU)); String style = elem.getAttribute("style"); assertTrue("Element must have style display off.",style.matches("display: none.*")); logger.debug("Located element " + SeleniumConstants.MAP_SUB_MENU); //find menu and click on mapview elem = driver.findElement(By.id(SeleniumConstants.MAP_CONTROL)); actions.moveToElement(elem).click().perform(); //assert su...

Run jmeter from eclipse

Download jmeter source and binaries: http://archive.apache.org/dist/jakarta/jmeter/binaries/jakarta-jmeter-2.3.4.zip http://archive.apache.org/dist/jakarta/jmeter/source/jakarta-jmeter-2.3.4_src.zip Unpack jmeter source file, and rename eclipse.classpath into .classpath. Add a .project file to the same directory: <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>jakarta-jmeter-2.3.4</name> <comment></comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> Now import the source code as eclipse project. Add all libs of binary distribution (lib/*.jar) to the new project's lib dir....