Hi Eva, Ok, I can replicate this with Sun's java.
The version of Java I tried was: -bash-3.1$ java -version java version "1.6.0_05" Java(TM) SE Runtime Environment (build 1.6.0_05-b13) Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing) I did: wget http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII6.0/ptII6.0.2.src.tar.gz tar -zxf ptII6.0.2.src.tar.gz export PTII=/tmp/cxh/ptII6.0.2 cd $PTII ./configure make >& make.out What I get is: ../../../ptolemy/data/type/ArrayType.java:423: non-static variable this cannot be referenced from a static context private InequalityTerm _replacementElementTerm = new ElementTypeTerm() { ^ To fix this: 1) Use Java 1.5 with Ptolemy II 6.0.2, which is what Ptolemy II 6.0.2 is documented as using. or 2) Try Ptolemy II 7.0.beta, which should work with Ptolemy Java 1.6 or 3) Fix the bug in Ptolemy II 6.0.2. This could be very difficult because there are other changes between 6.0.2 and 7.0. I recommend using Ptolemy II 7.0.beta. Ptolemy II 7.0.1 should be out shortly. _Christopher -------- Hello. Thank you all for your advice. I have tried to install ptolemy on ubuntu as much as I could these days... However, I still have the same problem. My java is SUN java located in /usr/lib/jvm/java-6-sun/bin. When I run ./configure I get two errors but I do not think they are severe. I have attached them at the end. Then I run either (make and make install) or (make >& make.out) as Christop her suggests. But nothing happens. I have gnu make 3.81. Some error I have are: --------------------------------------------------------------------------- fast build with 'CLASSPATH="../../.." /usr/bin/javac -g -O *.java' in /usr/local/src/ptII6.0.2/ptolemy/actor/parameters LocationParameter.java:73: cannot access ptolemy.data.type.MatrixType.DoubleMatrixType class file for ptolemy.data.type.MatrixType$DoubleMatrixType not found setTypeEquals(BaseType.DOUBLE_MATRIX); ^ ./../../ptolemy/data/type/MatrixType.java:158: incompatible types found : ptolemy.data.type.MatrixType.DoubleMatrixType required: ptolemy.data.type.MatrixType matrixType = BaseType.DOUBLE_MATRIX; ^ 2 errors --------------------------------------------------------------------------- - make[3]: Entering directory `/usr/local/src/ptII6.0.2/ptolemy/copernicus/ke rnel' fast build with 'CLASSPATH="../../..:/usr/local/src/ptII6.0.2/lib/sootclasses.jar:/usr/loca l/src/ptII6.0.2/lib/jasminclasses.jar:/usr/local/src/ptII6.0.2/lib/polyglotc lasses-1.3.2.jar:/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/rt.jar:/usr/lib/jv m/java-6-sun-1.6.0.03/jre/lib/jce.jar" /usr/bin/javac -g -O *.java' in /usr/local/src/ptII6.0.2/ptolemy/copernicus /kernel ./../../ptolemy/data/type/ArrayType.java:423: non-static variable this cann ot be referenced from a static context private InequalityTerm _replacementElementTerm = new ElementTypeTer m() { ^ ./../../ptolemy/data/type/ArrayType.java:423: non-static variable this cann ot be referenced from a static context private InequalityTerm _replacementElementTerm = new ElementTypeTer m() { ^ Note: Some input files use or override a deprecated --------------------------------------------------------------------------- -- fast build with 'CLASSPATH="../../../../../.." /usr/bin/javac -g -O *.java' in /usr/local/src/ptII6.0.2/ptolemy/codegen/c/domains/sdf/lib ./../../../../../ptolemy/data/type/ArrayType.java:423: non-static variable this cannot be referenced from a static context private InequalityTerm _replacementElementTerm = new ElementTypeTer m() { ^ ./../../../../../ptolemy/data/type/ArrayType.java:423: non-static variable this cannot be referenced from a static context private InequalityTerm _replacementElementTerm = new ElementTypeTer m() { ^ Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 2 errors --------------------------------------------------------------------------- -- make[6]: Leaving directory `/usr/local/src/ptII6.0.2/ptolemy/codegen/c/actor/lib/test' fast build with 'CLASSPATH="../../../../.." /usr/bin/javac -g -O *.java' in /usr/local/src/ptII6.0.2/ptolemy/codegen/c/actor/lib ./../../../../ptolemy/data/type/ArrayType.java:423: non-static variable thi s cannot be referenced from a static context private InequalityTerm _replacementElementTerm = new ElementTypeTer m() { ^ ./../../../../ptolemy/data/type/ArrayType.java:423: non-static variable thi s cannot be referenced from a static context private InequalityTerm _replacementElementTerm = new ElementTypeTer m() { ^ --------------------------------------------------------------------------- --- I have also tried to compile either with CLASSPATH set, or without. Still nothing good happens. In ptolemy/data/type I have the attached classes after the compilation. I do have TypeLattice.class in there and not in ptolemy/data. I have tried to install ptolemy in a new ubuntu 7-10 machine. I got the err ors at the end. It seems that there is a problem with ubuntu somehow. I would like to insta ll Viptos and I have already installed tinyos-2.x on ubuntu, so ptolemy is the other prerequisite for VIPTOS. I think I should try to migrate to another Linux distribution. In that case I will unfortunatelly have to go through t he painfull installation of tinyos(package after package). I would appreciate any new suggestion upon these. Thanks in advance, Eva Kolega Phd student National Technical University of Athens, GREECE -------------REST OF THE ERRORS-------------------------------------------- -- -------------configure errors---------------------------------------------- -- /configure import javax.media.j3d.*; ^ 1 error configure: WARNING: '"/usr/bin/javac" java3dTest.java' failed. http://java.sun.com/products/java-media/3D/download.html Java 3D is only needed if you want to build in /usr/local/src/ptII6.0.2/ptolemy/domains/gr, otherwise the build will proceed fine without Java 3D. import quicktime.std.movies.media.*; ^ 1 error checking the which major type of OS we are running under... Linux configure: WARNING: '"/usr/bin/javac" quickTime3dTest.java' failed. You may need to install QuickTime with the 'QuickTime For Java' option from http://developer.apple.com/quicktime/qtjava/ During installation, choose 'custom' and then 'select all'. This drops QTJava.zip into the lib/ext of all your installed JREs. Then you have to copy this zip file to the jre/lib/ext directory of your SDK and rerun configure. If configure still fails, you may need to unzip the QTJava.zip file and create a QTJava.jar file: # unzip QTJava.zip cd QTJava jar -cf ../QTJava.jar . QuickTime for Java is only needed if you want to build in /usr/local/src/ptII6.0.2/ptolemy/domains/gr/lib/quicktime, otherwise the build will proceed fine without Quicktime for Java. --------------ptolemy/data/type classes------------------------------------ - ArrayType.java MatrixType$ComplexMatrixType.class BaseType$1.class MatrixType$DoubleMatrixType.class BaseType$BooleanType.class MatrixType$FixMatrixType.class BaseType.class MatrixType$IntMatrixType.class BaseType$ComplexType.class MatrixType.java BaseType$DoubleType.class MatrixType$LongMatrixType.class BaseType$EventType.class MonotonicFunction.class BaseType$GeneralType.class MonotonicFunction.java BaseType$IntType.class package.html BaseType.java README.txt BaseType$LongType.class RecordType$1.class BaseType$NilType.class RecordType.class BaseType$ObjectType.class RecordType$FieldType.class BaseType$PetiteType.class RecordType.java BaseType$ScalarType.class StructuredType.class BaseType$StringType.class StructuredType.java BaseType$UnknownType.class test BaseType$UnsignedByteType.class Typeable.class BaseType$UnsizedFixType.class Typeable.java BaseType$XmlTokenType.class Type.class demo TypeConstant.class FixType.class TypeConstant.java FixType.java Type.java FunctionType$1.class TypeLattice$1.class FunctionType.class TypeLattice.class FunctionType$FieldTypeTerm.class TypeLattice.java FunctionType.java TypeLattice$TheTypeLattice.class HasTypeConstraints.class UnionType$1.class HasTypeConstraints.java UnionType.class makefile UnionType$FieldType.class MatrixType$BooleanMatrixType.class UnionType.java MatrixType.class ---------------make errors on a new Ubuntu 7.10 installation-------------- cp: cannot stat `*.class': No such file or directory make[2]: [img.jar] Error 1 (ignored) Creating img.jar (cd ptjar_tmpdir; "/usr/bin/jar" -cvf tmp.jar .) /bin/sh: /usr/bin/jar: not found make[2]: *** [img.jar] Error 127 make[2]: Leaving directory `/usr/local/src/ptII6.0.2/doc/img' making jars in doc/tour make[2]: Entering directory `/usr/local/src/ptII6.0.2/doc/tour' make[2]: Leaving directory `/usr/local/src/ptII6.0.2/doc/tour' making jars in doc/tutorial make[2]: Entering directory `/usr/local/src/ptII6.0.2/doc/tutorial' make[2]: Leaving directory `/usr/local/src/ptII6.0.2/doc/tutorial' making jars in doc/ui make[2]: Entering directory `/usr/local/src/ptII6.0.2/doc/ui' make[2]: Leaving directory `/usr/local/src/ptII6.0.2/doc/ui' make[1]: *** No rule to make target `coding/codingConfig.jar', needed by `docConfig.jar'. Stop. make[1]: Leaving directory `/usr/local/src/ptII6.0.2/doc' make: *** [subinstall] Error 2 Christopher Brooks <[EMAIL PROTECTED]> said: > Hi Eva, > Either your classpath is not set properly or else the file > $PTII/ptolemy/data/TypeLattice.class does not exist. > > Does $PTII/ptolemy/data/TypeLattice.class exist? > > Did you build Ptolemy using the commands below? > cd $PTII > ./configure > make >& make.out > > Does make.out contain errors? Look for lines that have "***" in them. > > _Christopher > > -------- > > Hello everybody. > > Many thanks to Christopher who has helped me a lot with ptolemy. It w orks f > ine > on Solaris 10 with gnu make. > > Now I am trying to install ptolemy on ubuntu 7.10 but I have too many error > s > with java. > > I have set PTII, PATH and CLASSPATH variables. > > I do not know what is wrong. > > I would be grateful if I had a suggestion for a workaround. > > Thanks in advance, > > Eva Kolega > Phd student > National Technical University of Athens, GREECE > > ----------------SAMPLE ERRORS---------------------------------- > Caused by: java.lang.NoClassDefFoundError: Could not initialize class > ptolemy.data.type.TypeLattice > at ptolemy.moml.filter.ActorIndex.main(ActorIndex.java:264) > Parsing: > file:/usr/local/src/ptII6.0.2/ptolemy/domains/sdf/demo/LMSAdaptive/LM SAdapt > ive.xml > Warning, failed to parse > $CLASSPATH/ptolemy/domains/sdf/demo/LMSAdaptive/LMSAdaptive.xml > com.microstar.xml.XmlException: XML element "property" triggers excep tion: > java.lang.NoClassDefFoundError: Could not initialize class > ptolemy.data.type.TypeLattice in > http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd at line 7 and col umn 69 > Caused by: > java.lang.NoClassDefFoundError: Could not initialize class > ptolemy.data.type.TypeLattice > > > --------------------------------------------------------------------- ------ > - > Posted to the ptolemy-hackers mailing list. Please send administrati ve > mail for this list to: [EMAIL PROTECTED] edu > -------- > > ------------------------------------------------------------------------- --- > Posted to the ptolemy-hackers mailing list. Please send administrative > mail for this list to: [EMAIL PROTECTED] > -- -------- ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]