Frequently asked questions

In this page we give answers to frequently asked questions about JAS.

  1. When using the bytecode from *-bin.jar, I get "Bad version number in .class"
  2. When trying to compile JAS with "ant compile", I get NoClassDefFoundError: org/apache/tools/ant/launch/Launcher
  3. When compiling a sample code I get '(' or '[' expected errors
  4. After compiling a sample code I get NoClassDefFoundError: org/apache/log4j/Logger
  5. I can not use Apache log4j in my project for some reason.
  6. I want to use JAS on Android.
  7. I do not want to compile and install JAS myself.

When using the bytecode from *-bin.jar I get "Bad version number in .class"

This error occurs if your Java virtual maschine is older than the Java used in compiling the classes. Use the JAS source to compile the .class files with your version of the Java VM. See e.g. Eclipse.

When trying to compile JAS with "ant compile", I get NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

Ant uses a wrong Java version. Define the Java home directory in the environment. E.g. in Linux use
export JAVA_HOME=/usr/java/jdk1.6.0_02
or the directory of your installed Java version.

When compiling a sample code I get '(' or '[' expected errors

JAS uses the new generic type parameters, which where introduced in Java version 5. So you must use at least a Java Development Kit 5 or later. See Java.sun.com for the latest Java releases.

After compiling a sample code I get NoClassDefFoundError: org/apache/log4j/Logger

You must include the Log4j classes in the classpath. e.g.
java -cp log4j.jar:. mysample

I can not use Apache log4j in my project for some reason.

We provide an adapter package for Java logging with mylog.jar. The package contians classes which delegate all logging calls to java.util.logging classes. Java logging must be configured to your needs - we do not provide sample configurations. You use it inplace of log4j.jar, for example
java -cp mylog.jar:. mysample

I want to use JAS on Android.

JAS should still compile with Java 1.6, so JAS can be compiled and dexed for Android.
For logging there is the adaptor package droidlog.jar which delegates all JAS logging calls to native Android logging.

I do not want to compile JAS and install all dependencies myself.

For the core of JAS you can use the Debian package or the Android application, see download page.
There are optional parts of JAS which depend on external tools and libraries. Since it requires some understanding of these tools they must be installed by yourself.


Heinz Kredel

Last modified: Sun Jul 5 17:56:39 CEST 2015