lördag 28 juni 2014

Amiga+OpenJDK

In today's picture you can actually see AmigaOS running OpenJDK! Well, at least starting it.

The error you see in the grab is due to missing native libraries. What you actualy see is the latest version of JamVM starting, using OpenJDK 9 class files -- there's no Amiga specific code in there yet.

My next step is ofcourse to compile an OpenJDK version of java.library. I've begun the process on an Ubuntu installation with a PowerPC cross-compiler. I'll probably try to move the current JAmiga native library "framework" into the OpenJDK build process, and then iteratively move, refactor and adapt the current GNU Classpath Amiga implementation. It sounds straight forward enough, but its going to take a while.

But its a start.

lördag 24 maj 2014

More mauve

Mauving forward (I've already used that pun, I know)

I'm still looking through the mauve test suite, and this is my current report. For java.io tests you can see previous post.

Not very existing results, but I just wanted to give a status report. Besides trying to fix the errors, I'm also more actively looking into OpenJDK, currently erstablishing a build environment for it on, and for, Linux, i.e. no Amiga-specific code yet. My plan is to make jamvm use OpenJDK, get some sort of empty native Jamiga library working, so I can get it to complain about missing native methods. And then take it from there. Currently it looks like I'll be able to re-use much of my current code.

java.util: 182/228 tests passed

Passed java.util tests

TEST PASSED (2 checks) java.util.logging.SocketHandler.SocketHandler
TEST PASSED (1 checks) java.util.logging.SocketHandler.getFormatter
TEST PASSED (1 checks) java.util.logging.SocketHandler.getFilter
TEST PASSED (2 checks) java.util.logging.LogRecord.setSourceClassName
TEST PASSED (4 checks) java.util.logging.LogRecord.setLoggerName
TEST PASSED (3 checks) java.util.logging.LogRecord.setParameters
TEST PASSED (2 checks) java.util.logging.LogRecord.getThreadID
TEST PASSED (2 checks) java.util.logging.LogRecord.setSourceMethodName
TEST PASSED (3 checks) java.util.logging.LogRecord.setSequenceNumber
TEST PASSED (1 checks) java.util.logging.LogRecord.getMillis
TEST PASSED (2 checks) java.util.logging.LogRecord.setThreadID
TEST PASSED (4 checks) java.util.logging.LogRecord.setMessage
TEST PASSED (2 checks) java.util.logging.LogRecord.setLevel
TEST PASSED (3 checks) java.util.logging.LogRecord.setThrown
TEST PASSED (2 checks) java.util.logging.LogRecord.setMillis
TEST PASSED (3 checks) java.util.logging.LogRecord.setResourceBundle
TEST PASSED (2 checks) java.util.logging.XMLFormatter.getTail
TEST PASSED (3 checks) java.util.logging.XMLFormatter.getHead
TEST PASSED (6 checks) java.util.logging.XMLFormatter.formatMessage
TEST PASSED (3 checks) java.util.Collections.reverseOrder
TEST PASSED (10 checks) java.util.Collections.unmodifiableMap
TEST PASSED (10 checks) java.util.Collections.fill
TEST PASSED (35 checks) java.util.Collections.sort
TEST PASSED (4 checks) java.util.Collections.rotate
TEST PASSED (4 checks) java.util.Collections.min
TEST PASSED (4 checks) java.util.Collections.reverse
TEST PASSED (4 checks) java.util.Collections.max
TEST PASSED (9 checks) java.util.Collections.copy
TEST PASSED (19 checks) java.util.Collections.unmodifiableList
TEST PASSED (104 checks) java.util.Collections.binarySearch
TEST PASSED (12 checks) java.util.AbstractSet.AcuniaAbstractSetTest
TEST PASSED (2 checks) java.util.SimpleTimeZone.setRawOffset
TEST PASSED (4 checks) java.util.SimpleTimeZone.setStartYear
TEST PASSED (4 checks) java.util.SimpleTimeZone.hashCode
TEST PASSED (6 checks) java.util.SimpleTimeZone.getOffset
TEST PASSED (1 checks) java.util.SimpleTimeZone.clone
TEST PASSED (12 checks) java.util.SimpleTimeZone.check14
TEST PASSED (42 checks) java.util.SimpleTimeZone.constructors
TEST PASSED (3 checks) java.util.SimpleTimeZone.constants
TEST PASSED (1 checks) java.util.SimpleTimeZone.getRawOffset
TEST PASSED (2 checks) java.util.SimpleTimeZone.setDSTSavings
TEST PASSED (32 checks) java.util.SimpleTimeZone.inDaylightTime
TEST PASSED (35 checks) java.util.Stack.AcuniaStackTest
TEST PASSED (387 checks) java.util.Hashtable.AcuniaHashtableTest
TEST PASSED (4 checks) java.util.Hashtable.ContainsHash
TEST PASSED (2 checks) java.util.Hashtable.NullValue
TEST PASSED (4 checks) java.util.Hashtable.EnumerateAndModify
TEST PASSED (5 checks) java.util.Hashtable.HashContains
TEST PASSED (12 checks) java.util.Hashtable.basic
TEST PASSED (244 checks) java.util.regex.PatternSplit
TEST PASSED (2082 checks) java.util.regex.CharacterClasses
TEST PASSED (30 checks) java.util.regex.Pattern.matches
TEST PASSED (8 checks) java.util.logging.LogManager.readConfiguration
TEST PASSED (3 checks) java.util.logging.LoggingMXBean.Test
TEST PASSED (8 checks) java.util.logging.Handler.setEncoding
TEST PASSED (1 checks) java.util.logging.Handler.isLoggable
TEST PASSED (4 checks) java.util.logging.Handler.setFilter
TEST PASSED (4 checks) java.util.logging.Handler.setErrorManager
TEST PASSED (3 checks) java.util.logging.Handler.getErrorManager
TEST PASSED (4 checks) java.util.logging.Handler.setLevel
TEST PASSED (12 checks) java.util.logging.Handler.reportError
TEST PASSED (2 checks) java.util.logging.Level.hashCode
TEST PASSED (9 checks) java.util.logging.Level.getName
TEST PASSED (29 checks) java.util.logging.Level.parse
TEST PASSED (9 checks) java.util.logging.Level.intValue
TEST PASSED (7 checks) java.util.logging.Level.equals
TEST PASSED (9 checks) java.util.logging.Level.toString
TEST PASSED (8 checks) java.util.logging.Logger.getParent
TEST PASSED (10 checks) java.util.logging.Logger.getAnonymousLogger
TEST PASSED (1 checks) java.util.logging.Logger.getName
TEST PASSED (0 checks) java.util.logging.Logger.PR35974
TEST PASSED (11 checks) java.util.logging.Logger.hierarchyChecks
TEST PASSED (2082 checks) java.util.regex.CharacterClasses
TEST PASSED (30 checks) java.util.regex.Pattern.matches
TEST PASSED (499 checks) java.util.regex.Pattern.pcrematches
TEST PASSED (50 checks) java.util.regex.Pattern.UnicodeSimpleCategory
TEST PASSED (60 checks) java.util.regex.Matcher.hitEnd
TEST PASSED (5 checks) java.util.regex.Matcher.Regions
TEST PASSED (374 checks) java.util.LinkedHashMap.LinkedHashMapTest
TEST PASSED (1 checks) java.util.LinkedHashMap.Regress
TEST PASSED (3 checks) java.util.TimeZone.setID
TEST PASSED (2 checks) java.util.TimeZone.setDefault
TEST PASSED (0 checks) java.util.TimeZone.zdump
TEST PASSED (36 checks) java.util.ArrayList.subList
TEST PASSED (60 checks) java.util.TreeSet.basic
TEST PASSED (5 checks) java.util.jar.JarInputStream.getNextEntry
TEST PASSED (36 checks) java.util.LinkedList.subList
TEST PASSED (4 checks) java.util.LinkedList.SubListTest
TEST PASSED (216 checks) java.util.LinkedList.AcuniaLinkedListTest
TEST PASSED (1 checks) java.util.AbstractCollection.AcuniaAddCollectionTest
TEST PASSED (63 checks) java.util.AbstractCollection.AcuniaAbstractCollectionTest
TEST PASSED (14 checks) java.util.AbstractCollection.toString
TEST PASSED (6 checks) java.util.Currency.getInstance
TEST PASSED (4 checks) java.util.Currency.Taiwan
TEST PASSED (4 checks) java.util.Currency.CanadaFrench
TEST PASSED (4 checks) java.util.Currency.Korea
TEST PASSED (4 checks) java.util.Currency.Germany
TEST PASSED (3 checks) java.util.Currency.Constructors
TEST PASSED (4 checks) java.util.Currency.PRC
TEST PASSED (4 checks) java.util.Currency.China
TEST PASSED (4 checks) java.util.Currency.France
TEST PASSED (2 checks) java.util.Currency.ReferenceEquality
TEST PASSED (4 checks) java.util.Currency.Canada
TEST PASSED (4 checks) java.util.Currency.Japan
TEST PASSED (4 checks) java.util.Currency.UK
TEST PASSED (10 checks) java.util.Calendar.getInstance
TEST PASSED (5 checks) java.util.Calendar.simple
TEST PASSED (7 checks) java.util.Calendar.roll
TEST PASSED (22 checks) java.util.Calendar.add
TEST PASSED (1 checks) java.util.Calendar.TimeZone
TEST PASSED (2 checks) java.util.Calendar.setTime
TEST PASSED (10 checks) java.util.Calendar.minmax
TEST PASSED (12 checks) java.util.Calendar.ampm
TEST PASSED (1 checks) java.util.Calendar.setTimeZone
TEST PASSED (36 checks) java.util.Vector.subList
TEST PASSED (2 checks) java.util.Vector.retainAll
TEST PASSED (2 checks) java.util.Vector.removeAll
TEST PASSED (386 checks) java.util.Vector.AcuniaVectorTest
TEST PASSED (11 checks) java.util.Vector.copyInto
TEST PASSED (94 checks) java.util.AbstractMap.AcuniaAbstractMapTest
TEST PASSED (1 checks) java.util.zip.GZIPInputStream.PR24461
TEST PASSED (1 checks) java.util.zip.ZipEntry.time
TEST PASSED (4 checks) java.util.zip.ZipEntry.setComment
TEST PASSED (7 checks) java.util.zip.ZipEntry.Size
TEST PASSED (2 checks) java.util.zip.ZipEntry.newZipEntry
TEST PASSED (3 checks) java.util.zip.ZipInputStream.close
TEST PASSED (7 checks) java.util.zip.ZipInputStream.basic
TEST PASSED (10 checks) java.util.zip.InflaterInputStream.basic
TEST PASSED (1 checks) java.util.zip.ZipFile.NoEntryTest
TEST PASSED (2 checks) java.util.zip.ZipFile.DirEntryTest
TEST PASSED (160 checks) java.util.zip.Adler32.checksum
TEST PASSED (21 checks) java.util.Random.basic
TEST PASSED (28 checks) java.util.Date.compareTo
TEST PASSED (6 checks) java.util.Date.getTimezoneOffset
TEST PASSED (10 checks) java.util.Date.before
TEST PASSED (10 checks) java.util.Date.after
TEST PASSED (10 checks) java.util.Date.range
TEST PASSED (3 checks) java.util.Date.clone
TEST PASSED (25 checks) java.util.Date.parse
TEST PASSED (4 checks) java.util.Date.equals
TEST PASSED (99 checks) java.util.Arrays.fill
TEST PASSED (139 checks) java.util.Arrays.sort
TEST PASSED (13 checks) java.util.Arrays.asList
TEST PASSED (56 checks) java.util.Arrays.equals
TEST PASSED (67 checks) java.util.Arrays.binarySearch
TEST PASSED (3 checks) java.util.EnumSet.ComplementOf
TEST PASSED (29 checks) java.util.Iterator.ConcurrentModification
TEST PASSED (24 checks) java.util.concurrent.CopyOnWriteArrayList.AddAllTest
TEST PASSED (4 checks) java.util.concurrent.CopyOnWriteArrayList.RemoveAllTest
TEST PASSED (57 checks) java.util.concurrent.CopyOnWriteArrayList.TestIterators
TEST PASSED (6 checks) java.util.concurrent.CopyOnWriteArrayList.RetainAllTest
TEST PASSED (5 checks) java.util.concurrent.CopyOnWriteArrayList.Equals
TEST PASSED (22 checks) java.util.concurrent.CopyOnWriteArrayList.Clone
TEST PASSED (21 checks) java.util.concurrent.CopyOnWriteArrayList.AddAllAbsentTest
TEST PASSED (35 checks) java.util.concurrent.CopyOnWriteArrayList.SubListTest
TEST PASSED (16 checks) java.util.concurrent.CopyOnWriteArrayList.RemoveTest
TEST PASSED (66 checks) java.util.Collection.Test
TEST PASSED (105 checks) java.util.AbstractSequentialList.AcuniaAbstractSequentialListTest
TEST PASSED (76 checks) java.util.BitSet.AcuniaBitSetTest
TEST PASSED (10 checks) java.util.BitSet.clear
TEST PASSED (22 checks) java.util.BitSet.get
TEST PASSED (9 checks) java.util.BitSet.flip
TEST PASSED (32 checks) java.util.BitSet.jdk10
TEST PASSED (1 checks) java.util.Scanner.FindWithinHorizon
TEST PASSED (21 checks) java.util.Scanner.Radix
TEST PASSED (17 checks) java.util.Scanner.FishString
TEST PASSED (6 checks) java.util.Scanner.MultiLine
TEST PASSED (8 checks) java.util.StringTokenizer.nextElement
TEST PASSED (4 checks) java.util.StringTokenizer.hasMoreElements
TEST PASSED (4 checks) java.util.StringTokenizer.hasMoreTokens
TEST PASSED (12 checks) java.util.StringTokenizer.nextToken
TEST PASSED (31 checks) java.util.StringTokenizer.constructors
TEST PASSED (4 checks) java.util.StringTokenizer.countTokens
TEST PASSED (3 checks) java.util.Timer.taskException
TEST PASSED (1 checks) java.util.Observable.observable
TEST PASSED (3 checks) java.util.Properties.getProperty
TEST PASSED (21 checks) java.util.Properties.load
TEST PASSED (295 checks) java.util.HashMap.AcuniaHashMapTest
TEST PASSED (108 checks) java.util.AbstractList.AcuniaAbstractListTest
TEST PASSED (124 checks) java.util.GregorianCalendar.setFirstDayOfWeek
TEST PASSED (4 checks) java.util.GregorianCalendar.getMinimum
TEST PASSED (258 checks) java.util.GregorianCalendar.conversion

Failed java.util tests

TEST FAILED: 1 of 9 checks failed java.util.logging.Logger.getLogger
TEST FAILED: exception when loading java.util.logging.Logger.TestLogger
TEST FAILED: 3 of 5 checks failed java.util.logging.SocketHandler.publish
TEST FAILED: uncaught exception java.util.Collections.nCopies
TEST FAILED: 2 of 23 checks failed java.util.SimpleTimeZone.check12
TEST FAILED: 1 of 22 checks failed java.util.SimpleTimeZone.hasSameRules
TEST FAILED: 1 of 2 checks failed java.util.SimpleTimeZone.getDSTSavings
TEST FAILED: 1 of 24 checks failed java.util.SimpleTimeZone.equals
TEST FAILED: exception when loading java.util.regex.TestHelper
TEST FAILED: exception when loading java.util.logging.Level.TestUtils
TEST FAILED: 2 of 40 checks failed java.util.logging.Logger.securityChecks
TEST FAILED: exception when loading java.util.regex.TestHelper
TEST FAILED: 3 of 4 checks failed java.util.TimeZone.GetDisplayName
TEST FAILED: 1 of 1 checks failed java.util.ArrayList.serial
TEST FAILED: 2 of 163 checks failed java.util.ArrayList.AcuniaArrayListTest
TEST FAILED: uncaught exception java.util.ResourceBundle.getBundle
TEST FAILED: uncaught exception java.util.TreeMap.serialization
TEST FAILED: 1 of 2 checks failed java.util.jar.JarFile.TestOfManifest
TEST FAILED: 1 of 1 checks failed java.util.jar.JarFile.basic
TEST FAILED: 1 of 4 checks failed java.util.Currency.Italy
TEST FAILED: 1 of 5 checks failed java.util.Currency.US
TEST FAILED: 3 of 27 checks failed java.util.Calendar.dstOffset
TEST FAILED: 2 of 36 checks failed java.util.Calendar.set
TEST FAILED: 1 of 1 checks failed java.util.Vector.VectorSerialization
TEST FAILED: exception when loading java.util.AbstractMap.EIterator
TEST FAILED: exception when loading java.util.AbstractMap.Entry
TEST FAILED: exception when loading java.util.AbstractMap.ESet
TEST FAILED: uncaught exception java.util.zip.Deflater.PR27435
TEST FAILED: 1 of 2 checks failed java.util.zip.GZIPInputStream.basic
TEST FAILED: 1 of 1 checks failed java.util.zip.ZipFile.newZipFile
TEST FAILED: uncaught exception java.util.Date.serialization
TEST FAILED: exception when loading java.util.EnumSet.Colour
TEST FAILED: uncaught exception java.util.prefs.PreferenceTest
TEST FAILED: 3 of 4 checks failed java.util.Scanner.SkipPattern
TEST FAILED: 3 of 3 checks failed java.util.Scanner.FindPattern
TEST FAILED: 1 of 1 checks failed java.util.Scanner.LotsOfPMLong
TEST FAILED: 1 of 1 checks failed java.util.Scanner.LotsOfInts
TEST FAILED: 1 of 101 checks failed java.util.Scanner.Booleans
TEST FAILED: 1 of 1 checks failed java.util.Scanner.Inputs
TEST FAILED: 1 of 1 checks failed java.util.Scanner.FileInput
TEST FAILED: 1 of 1 checks failed java.util.Scanner.LotsOfPMShort
TEST FAILED: 1 of 1 checks failed java.util.Scanner.LotsOfPMInts
TEST FAILED: 1 of 20 checks failed java.util.Scanner.DoubleFloat
TEST FAILED: 1 of 1 checks failed java.util.Scanner.BigDecimalInteger
TEST FAILED: 5 of 87 checks failed java.util.Properties.AcuniaPropertiesTest
TEST FAILED: 1 of 2 checks failed java.util.GregorianCalendar.getMinimalDaysInFirstWeek

java.text: 91/112 tests passed

Passed java.text tests

TEST PASSED (1 checks) java.text.Annotation.Test
TEST PASSED (6 checks) java.text.AttributedCharacterIterator.getRunStart
TEST PASSED (1 checks) java.text.AttributedCharacterIterator.implement
TEST PASSED (46 checks) java.text.AttributedCharacterIterator.getRunLimit
TEST PASSED (3 checks) java.text.AttributedCharacterIterator.getAttribute
TEST PASSED (3 checks) java.text.AttributedCharacterIterator.Attribute.toString
TEST PASSED (4 checks) java.text.ParsePosition.Test
TEST PASSED (8 checks) java.text.Bidi.Basic
TEST PASSED (4 checks) java.text.Bidi.reorderVisually
TEST PASSED (2 checks) java.text.DecimalFormat.hashCode
TEST PASSED (15 checks) java.text.DecimalFormat.applyPattern
TEST PASSED (1 checks) java.text.DecimalFormat.getGroupingSize
TEST PASSED (6 checks) java.text.DecimalFormat.position
TEST PASSED (1 checks) java.text.DecimalFormat.setMultiplier
TEST PASSED (3 checks) java.text.DecimalFormat.setCurrency
TEST PASSED (2 checks) java.text.DecimalFormat.setNegativePrefix
TEST PASSED (3 checks) java.text.DecimalFormat.formatToCharacterIterator
TEST PASSED (2 checks) java.text.DecimalFormat.getDecimalFormatSymbols
TEST PASSED (2 checks) java.text.DecimalFormat.setDecimalSeparatorAlwaysShown
TEST PASSED (1 checks) java.text.DecimalFormat.getPositiveSuffix
TEST PASSED (2 checks) java.text.DecimalFormat.clone
TEST PASSED (1 checks) java.text.DecimalFormat.getNegativeSuffix
TEST PASSED (1 checks) java.text.DecimalFormat.PR27311
TEST PASSED (2 checks) java.text.DecimalFormat.setNegativeSuffix
TEST PASSED (3 checks) java.text.DecimalFormat.PR23996
TEST PASSED (4 checks) java.text.DecimalFormat.setGroupingSize
TEST PASSED (6 checks) java.text.DecimalFormat.toPattern
TEST PASSED (2 checks) java.text.DecimalFormat.isDecimalSeparatorAlwaysShown
TEST PASSED (71 checks) java.text.DecimalFormat.parse
TEST PASSED (2 checks) java.text.DecimalFormat.applyLocalizedPattern
TEST PASSED (14 checks) java.text.DecimalFormat.constructors
TEST PASSED (31 checks) java.text.DecimalFormat.equals
TEST PASSED (2 checks) java.text.DecimalFormat.getPositivePrefix
TEST PASSED (2 checks) java.text.DecimalFormat.setPositivePrefix
TEST PASSED (2 checks) java.text.DecimalFormat.setPositiveSuffix
TEST PASSED (1 checks) java.text.DecimalFormat.getNegativePrefix
TEST PASSED (1 checks) java.text.DecimalFormat.getMultiplier
TEST PASSED (1 checks) java.text.DecimalFormat.getCurrency
TEST PASSED (12 checks) java.text.AttributedString.addAttribute
TEST PASSED (24 checks) java.text.AttributedString.constructors
TEST PASSED (5 checks) java.text.AttributedString.Test
TEST PASSED (30 checks) java.text.AttributedString.getIterator
TEST PASSED (10 checks) java.text.AttributedString.addAttributes
TEST PASSED (2 checks) java.text.NumberFormat.PR31895
TEST PASSED (9 checks) java.text.FieldPosition.Test
TEST PASSED (4 checks) java.text.ACIAttribute.Test
TEST PASSED (1 checks) java.text.ParseException.Test
TEST PASSED (5 checks) java.text.CollationElementIterator.offset
TEST PASSED (356 checks) java.text.CollationElementIterator.jdk11
TEST PASSED (26 checks) java.text.MessageFormat.format14
TEST PASSED (19 checks) java.text.MessageFormat.format
TEST PASSED (11 checks) java.text.MessageFormat.parse
TEST PASSED (1 checks) java.text.DateFormatSymbols.setEras
TEST PASSED (1 checks) java.text.DateFormatSymbols.setMonths
TEST PASSED (1 checks) java.text.DateFormatSymbols.setZoneStrings
TEST PASSED (1 checks) java.text.DateFormatSymbols.setShortMonths
TEST PASSED (1 checks) java.text.DateFormatSymbols.setWeekdays
TEST PASSED (1 checks) java.text.DateFormatSymbols.setShortWeekdays
TEST PASSED (1 checks) java.text.DateFormatSymbols.setAmPmStrings
TEST PASSED (2 checks) java.text.DateFormat.hashCode
TEST PASSED (32 checks) java.text.DateFormat.Test
TEST PASSED (5 checks) java.text.RuleBasedCollator.VeryBasic
TEST PASSED (242 checks) java.text.RuleBasedCollator.jdk11
TEST PASSED (25 checks) java.text.StringCharacterIterator.constructor
TEST PASSED (25 checks) java.text.StringCharacterIterator.iter
TEST PASSED (1 checks) java.text.CharacterIterator.implement
TEST PASSED (2 checks) java.text.SimpleDateFormat.getDateFormatSymbols
TEST PASSED (3 checks) java.text.SimpleDateFormat.applyPattern
TEST PASSED (66 checks) java.text.SimpleDateFormat.attribute
TEST PASSED (3 checks) java.text.SimpleDateFormat.setDateFormatSymbols
TEST PASSED (1 checks) java.text.SimpleDateFormat.getAndSet2DigitYearStart
TEST PASSED (2 checks) java.text.SimpleDateFormat.toPattern
TEST PASSED (10 checks) java.text.SimpleDateFormat.constructors
TEST PASSED (7 checks) java.text.SimpleDateFormat.equals
TEST PASSED (9 checks) java.text.SimpleDateFormat.Test
TEST PASSED (2 checks) java.text.SimpleDateFormat.Cloning
TEST PASSED (0 checks) java.text.DecimalFormatSymbols.DumpDefault12
TEST PASSED (10 checks) java.text.DecimalFormatSymbols.GetSet11
TEST PASSED (3 checks) java.text.DecimalFormatSymbols.GetSet12
TEST PASSED (0 checks) java.text.DecimalFormatSymbols.DumpDefault11
TEST PASSED (1 checks) java.text.DecimalFormatSymbols.getCurrency
TEST PASSED (19 checks) java.text.ChoiceFormat.format
TEST PASSED (2 checks) java.text.ChoiceFormat.next
TEST PASSED (4 checks) java.text.ChoiceFormat.Bad
TEST PASSED (9 checks) java.text.ChoiceFormat.parse
TEST PASSED (40 checks) java.text.BreakIterator.chariter
TEST PASSED (16 checks) java.text.BreakIterator.sentiter
TEST PASSED (62 checks) java.text.BreakIterator.worditer
TEST PASSED (4 checks) java.text.BreakIterator.patho
TEST PASSED (20 checks) java.text.BreakIterator.lineiter
TEST PASSED (7 checks) java.text.Collator.Constants

Failed java.text tests

TEST FAILED: exception when loading java.text.AttributedCharacterIterator.CharItImpl
TEST FAILED: 4 of 12 checks failed java.text.DecimalFormat.digits
TEST FAILED: 2 of 12 checks failed java.text.DecimalFormat.toPattern14
TEST FAILED: 1 of 1 checks failed java.text.DecimalFormat.toLocalizedPattern
TEST FAILED: 2 of 27 checks failed java.text.DecimalFormat.formatExp
TEST FAILED: 6 of 38 checks failed java.text.DecimalFormat.MaximumAndMinimumDigits
TEST FAILED: 1 of 3 checks failed java.text.DecimalFormat.setDecimalFormatSymbols
TEST FAILED: 5 of 90 checks failed java.text.DecimalFormat.format
TEST FAILED: 5 of 16 checks failed java.text.NumberFormat.UK
TEST FAILED: 2 of 53 checks failed java.text.MessageFormat.attribute
TEST FAILED: 3 of 163 checks failed java.text.DateFormatSymbols.PR22851
TEST FAILED: 1 of 8 checks failed java.text.DateFormatSymbols.Test
TEST FAILED: 1 of 15 checks failed java.text.DateFormat.equals
TEST FAILED: 7 of 15 checks failed java.text.RuleBasedCollator.CollatorTests
TEST FAILED: 2 of 2 checks failed java.text.SimpleDateFormat.toLocalizedPattern
TEST FAILED: 5 of 24 checks failed java.text.SimpleDateFormat.parse
TEST FAILED: 2 of 4 checks failed java.text.SimpleDateFormat.applyLocalizedPattern
TEST FAILED: 5 of 15 checks failed java.text.SimpleDateFormat.regress
TEST FAILED: 1 of 7 checks failed java.text.SimpleDateFormat.Localization
TEST FAILED: uncaught exception java.text.DecimalFormatSymbols.serial
TEST FAILED: 1 of 8 checks failed java.text.Collator.GetSet

java.nio: 7/46 tests passed

Passed java.nio tests

TEST PASSED (2 checks) java.nio.ByteBuffer.putDouble
TEST PASSED (4 checks) java.nio.ByteBuffer.direct
TEST PASSED (5 checks) java.nio.ByteBuffer.Order
TEST PASSED (342 checks) java.nio.ByteBuffer.GetPut
TEST PASSED (4 checks) java.nio.ByteBuffer.compact
TEST PASSED (2 checks) java.nio.ByteBuffer.TestAllocateDirect
TEST PASSED (118 checks) java.nio.ByteBuffer.Allocating

Failed java.nio tests

TEST FAILED: exception when loading java.nio.LongBuffer.compact
TEST FAILED: exception when loading java.nio.CharBuffer.CharSequenceWrapper
TEST FAILED: exception when loading java.nio.CharBuffer.compact
TEST FAILED: exception when loading java.nio.FloatBuffer.compareTo
TEST FAILED: exception when loading java.nio.FloatBuffer.compact
TEST FAILED: exception when loading java.nio.charset.Charset.forName2
TEST FAILED: exception when loading java.nio.charset.Charset.forName
TEST FAILED: exception when loading java.nio.charset.Charset.utf16
TEST FAILED: exception when loading java.nio.charset.Charset.canEncode
TEST FAILED: exception when loading java.nio.charset.Charset.UTF8Charset
TEST FAILED: exception when loading java.nio.charset.Charset.encode
TEST FAILED: exception when loading java.nio.ShortBuffer.compact
TEST FAILED: exception when loading java.nio.DoubleBuffer.compareTo
TEST FAILED: exception when loading java.nio.DoubleBuffer.compact
TEST FAILED: exception when loading java.nio.IntBuffer.compareTo
TEST FAILED: exception when loading java.nio.IntBuffer.compact
TEST FAILED: exception when loading java.nio.channels.FileChannel.offsetSingleDirectBuffer
TEST FAILED: exception when loading java.nio.channels.FileChannel.map
TEST FAILED: exception when loading java.nio.channels.FileChannel.multibufferIO
TEST FAILED: exception when loading java.nio.channels.FileChannel.truncate
TEST FAILED: exception when loading java.nio.channels.FileChannel.manyopen
TEST FAILED: exception when loading java.nio.channels.FileChannel.singlebufferIO
TEST FAILED: exception when loading java.nio.channels.FileChannel.lock
TEST FAILED: exception when loading java.nio.channels.FileChannel.multidirectbufferIO
TEST FAILED: exception when loading java.nio.channels.FileChannel.copyIO
TEST FAILED: exception when loading java.nio.channels.FileChannel.offsetSingleBuffer
TEST FAILED: exception when loading java.nio.channels.Selector.testEmptySelect
TEST FAILED: exception when loading java.nio.channels.Channels.ChannelsTest
TEST FAILED: exception when loading java.nio.channels.SocketChannel.select
TEST FAILED: exception when loading java.nio.Buffer.DoubleBufferTest
TEST FAILED: exception when loading java.nio.Buffer.IntBufferTest
TEST FAILED: exception when loading java.nio.Buffer.BufferFactory
TEST FAILED: exception when loading java.nio.Buffer.ByteBufferTest
TEST FAILED: exception when loading java.nio.Buffer.WrappedWithOffsetBufferTest
TEST FAILED: exception when loading java.nio.Buffer.CharBufferTest
TEST FAILED: exception when loading java.nio.Buffer.ShortBufferTest
TEST FAILED: exception when loading java.nio.Buffer.PlainBufferTest
TEST FAILED: exception when loading java.nio.Buffer.FloatBufferTest
TEST FAILED: exception when loading java.nio.Buffer.LongBufferTest

java.math: 19/21 tests passed

Passed java.math tests

 
TEST PASSED (42 checks) java.math.BigDecimal.compareTo
TEST PASSED (164 checks) java.math.BigDecimal.divide
TEST PASSED (4 checks) java.math.BigDecimal.construct
TEST PASSED (21 checks) java.math.BigDecimal.setScale
TEST PASSED (27 checks) java.math.BigInteger.compareTo
TEST PASSED (10 checks) java.math.BigInteger.shift
TEST PASSED (17 checks) java.math.BigInteger.divide
TEST PASSED (2 checks) java.math.BigInteger.setBit
TEST PASSED (29 checks) java.math.BigInteger.modInverse
TEST PASSED (6 checks) java.math.BigInteger.add
TEST PASSED (5 checks) java.math.BigInteger.signum
TEST PASSED (1 checks) java.math.BigInteger.TestOfToByteArray
TEST PASSED (3 checks) java.math.BigInteger.modPow
TEST PASSED (9 checks) java.math.BigInteger.multiply
TEST PASSED (5 checks) java.math.BigInteger.abs
TEST PASSED (33 checks) java.math.BigInteger.equals
TEST PASSED (5 checks) java.math.BigInteger.valueOf
TEST PASSED (3 checks) java.math.BigInteger.toString
TEST PASSED (11 checks) java.math.BigInteger.ctor

Failed java.math tests

TEST FAILED: 6 of 590 checks failed java.math.BigDecimal.DiagBigDecimal
TEST FAILED: 8 of 9 checks failed java.math.BigInteger.TestOfPR27372
TEST FAILED: uncaught exception java.math.BigInteger.serialization

lördag 26 april 2014

Uri's messing with my forks

I'm still stumped on the URI handling. Some mauve tests tries to assert the correctness of the URI and URL, returned by the two methods toURI(), and toURL() of a java.io.File object (where the latter is now deprecated, in favour of the first one). However, the mauve tests cannot be correct, since it for the URI thinks a corect result is the path appended with a file separator, and for the URL result doesn't want the file separator. I.e. in the mauve test, an URI should be "file:ram:t/", and the URL should be "file:ram:t", which is just plain wrong (as corroborated by a simple test on OpenJDK on my mac). If the path points to a directory, it should end with a "/", if it's a file, it should have no ending. So it should in both the URI and URL case be "file:ram:t/".

How to mauve forward

It's very unsettling not being able to rely on the automated tests being correct. So, I'm thinking that I shouldn't give them to much gravitas, but try to get the most obvious errors in JAmiga fixed with the help of Mauve, but not aim for a hundred percent fully successful test run.

Some more URI ranting

GNU classpath has a tendency to add slashes to the end of paths, which denote directories, but doesn't have the ending slash. Like above, the path "ram:t", would become "ram:t/". However, if the path is just "ram:" (being a root directory), it will also get a slash at the end, since GNU classpath doesn't know that colon is a file separator in the amiga world. This leads to the path "ram:/". This is coincidental how Windows does it file URI's, like "C:/" (here normalized from Windows normal backslash notation).

For now i think I'll try and keep it like this, so we might get URI's like "file:ram:/t/tempfile" for our Amiga paths "ram:t/tempfile". Hopefully that will work. Because, like I've on numerous occasions blogged about, the whole URI/file/path-handling is all over the place.

onsdag 23 april 2014

Tests in progress

Mauving forward (have I already used that pun...?)

I'm, as always, continuing my mauve testing. I might just spot stuff, that might make other stuff run.
I've been at this previosuly, but I'm now re-iterating the java-io tests. My progrss so far? See for yourselves:

Passed java.io tests

TEST PASSED (3 checks) java.io.File.ReadMethods
TEST PASSED (3 checks) java.io.File.WriteMethods
TEST PASSED (51 checks) java.io.File.jdk11
TEST PASSED (4 checks) java.io.CharArrayReader.MarkReset
TEST PASSED (4 checks) java.io.CharArrayReader.ProtectedVars
TEST PASSED (1 checks) java.io.CharArrayReader.SimpleRead
TEST PASSED (2 checks) java.io.CharArrayReader.OutOfBounds
TEST PASSED (8 checks) java.io.StringReader.Test
TEST PASSED (5 checks) java.io.FilterInputStream.MarkReset
TEST PASSED (2 checks) java.io.FilterInputStream.SimpleRead
TEST PASSED (2 checks) java.io.PushbackInputStream.ProtectedVars
TEST PASSED (3 checks) java.io.PushbackInputStream.Unread
TEST PASSED (1 checks) java.io.PushbackInputStream.BufferOverflow
TEST PASSED (2 checks) java.io.FileDescriptor.jdk11
TEST PASSED (0 checks) java.io.Serializable.ParentWriteReplace
TEST PASSED (0 checks) java.io.Serializable.ParentReadResolve
TEST PASSED (6 checks) java.io.Writer.Test
TEST PASSED (4 checks) java.io.ObjectStreamClass.ProxyTest
TEST PASSED (4 checks) java.io.SequenceInputStream.Test
TEST PASSED (4 checks) java.io.BufferedInputStream.MarkReset
TEST PASSED (5 checks) java.io.BufferedInputStream.ProtectedVars
TEST PASSED (5 checks) java.io.BufferedInputStream.SimpleRead
TEST PASSED (1 checks) java.io.BufferedInputStream.ZeroRead
TEST PASSED (24 checks) java.io.BufferedInputStream.BigMark
TEST PASSED (2 checks) java.io.BufferedInputStream.Skip
TEST PASSED (10 checks) java.io.OutputStreamWriter.jdk11
TEST PASSED (2 checks) java.io.LineNumberInputStream.Test
TEST PASSED (4 checks) java.io.FilterReader.MarkReset
TEST PASSED (2 checks) java.io.FilterReader.SimpleRead
TEST PASSED (9 checks) java.io.Reader.Test
TEST PASSED (34 checks) java.io.LineNumberReader.Test2
TEST PASSED (120 checks) java.io.LineNumberReader.mark
TEST PASSED (5 checks) java.io.LineNumberReader.Test
TEST PASSED (5 checks) java.io.ByteArrayInputStream.MarkReset
TEST PASSED (4 checks) java.io.ByteArrayInputStream.ProtectedVars
TEST PASSED (1 checks) java.io.ByteArrayInputStream.SimpleRead
TEST PASSED (4 checks) java.io.ObjectOutputStream.useProtocolVersion
TEST PASSED (2 checks) java.io.BufferedReader.MarkReset
TEST PASSED (1 checks) java.io.BufferedReader.SimpleRead
TEST PASSED (19 checks) java.io.BufferedReader.mark
TEST PASSED (5 checks) java.io.BufferedReader.boundary
TEST PASSED (7 checks) java.io.StreamTokenizer.WordWhiteChars
TEST PASSED (11 checks) java.io.StreamTokenizer.newline
TEST PASSED (11 checks) java.io.StreamTokenizer.misc
TEST PASSED (9 checks) java.io.StreamTokenizer.commentchar
TEST PASSED (8 checks) java.io.StreamTokenizer.Test
TEST PASSED (7 checks) java.io.StreamTokenizer.slashstar
TEST PASSED (7 checks) java.io.StreamTokenizer.slashslash
TEST PASSED (1 checks) java.io.InputStreamReader.except
TEST PASSED (52 checks) java.io.InputStreamReader.getEncoding
TEST PASSED (1 checks) java.io.InputStreamReader.hang
TEST PASSED (2 checks) java.io.InputStreamReader.utf8
TEST PASSED (5 checks) java.io.InputStreamReader.jdk11
TEST PASSED (2 checks) java.io.BufferedWriter.Test
TEST PASSED (37 checks) java.io.DataInputStream.readLine
TEST PASSED (3 checks) java.io.FileReader.jdk11
TEST PASSED (4 checks) java.io.PushbackReader.Unread
TEST PASSED (1 checks) java.io.PushbackReader.BufferOverflow
TEST PASSED (4 checks) java.io.PrintWriter.checkError
TEST PASSED (10 checks) java.io.PrintWriter.jdk11
TEST PASSED (3 checks) java.io.InputStream.Test
TEST PASSED (2 checks) java.io.CharArrayWriter.ProtectedVars
TEST PASSED (4 checks) java.io.CharArrayWriter.BasicTests
TEST PASSED (9 checks) java.io.ByteArrayOutputStream.write
TEST PASSED (12 checks) java.io.ByteArrayOutputStream.subclass
TEST PASSED (5 checks) java.io.OutputStream.Test
TEST PASSED (2 checks) java.io.PipedReaderWriter.Test
TEST PASSED (6 checks) java.io.BufferedOutputStream.interrupt
TEST PASSED (2 checks) java.io.BufferedOutputStream.Test
TEST PASSED (1 checks) java.io.PipedStream.receive
TEST PASSED (1 checks) java.io.PipedStream.close
TEST PASSED (3 checks) java.io.PipedStream.Test
TEST PASSED (250 checks) java.io.FilePermission.simple
TEST PASSED (6 checks) java.io.FilterWriter.write
TEST PASSED (5 checks) java.io.StringBufferInputStream.MarkReset
TEST PASSED (3 checks) java.io.StringBufferInputStream.ProtectedVars
TEST PASSED (2 checks) java.io.StringBufferInputStream.SimpleRead
TEST PASSED (2 checks) java.io.FileOutputStream.jdk12
TEST PASSED (3 checks) java.io.StringWriter.Test
TEST PASSED (6 checks) java.io.FilterOutputStream.write
TEST PASSED (2 checks) java.io.PrintStream.encodings
TEST PASSED (1 checks) java.io.PrintStream.subclass
TEST PASSED (2 checks) java.io.Utf8Encoding.ReadReference
TEST PASSED (3 checks) java.io.Utf8Encoding.WriteRead
TEST PASSED (68 checks) java.io.Utf8Encoding.mojo
TEST PASSED (1 checks) java.io.DataOutputStream.writeUTF               

Failed java.io tsts

TEST FAILED: 8 of 14 checks failed java.io.File.listFiles
TEST FAILED: 8 of 14 checks failed java.io.File.list
TEST FAILED: 7 of 19 checks failed java.io.File.canWrite
TEST FAILED: 8 of 15 checks failed java.io.File.emptyFile
TEST FAILED: 17 of 22 checks failed java.io.File.security
TEST FAILED: 1 of 1 checks failed java.io.File.createFile
TEST FAILED: 2 of 4 checks failed java.io.File.URI
TEST FAILED: uncaught exception java.io.File.newFileURI
TEST FAILED: 1 of 3 checks failed java.io.File.ExecuteMethods
TEST FAILED: 1 of 17 checks failed java.io.File.newFile
TEST FAILED: 2 of 4 checks failed java.io.File.UnicodeURI
TEST FAILED: 1 of 1 checks failed java.io.RandomAccessFile.setLength
TEST FAILED: 1 of 2 checks failed java.io.RandomAccessFile.security
TEST FAILED: 2 of 2 checks failed java.io.RandomAccessFile.randomaccessfile
TEST FAILED: 1 of 1 checks failed java.io.RandomAccessFile.jdk11
TEST FAILED: 1 of 1 checks failed java.io.Serializable.BreakMe
TEST FAILED: uncaught exception java.io.Serializable.readResolve
TEST FAILED: 1 of 1 checks failed java.io.Serializable.BreakMeTestSer
TEST FAILED: 1 of 2 checks failed java.io.FileWriter.jdk11
TEST FAILED: uncaught exception java.io.ObjectStreamClass.Test
TEST FAILED: 3 of 3 checks failed java.io.FileInputStream.security
TEST FAILED: 2 of 2 checks failed java.io.FileInputStream.fileinputstream
TEST FAILED: 1 of 2 checks failed java.io.FileInputStream.read
TEST FAILED: uncaught exception java.io.ObjectInputStream.registerValidation
TEST FAILED: uncaught exception java.io.ObjectInputStream.ClassLoaderTest
TEST FAILED: 2 of 3 checks failed java.io.ObjectInputStream.security
TEST FAILED: 1 of 4 checks failed java.io.ObjectInputStream.readResolve
TEST FAILED: uncaught exception java.io.ObjectOutputStream.StreamDataTest
TEST FAILED: 2 of 3 checks failed java.io.ObjectOutputStream.security
TEST FAILED: 1 of 5 checks failed java.io.DataInputStream.ReadReference
TEST FAILED: 1 of 6 checks failed java.io.DataInputStream.ReadReference2
TEST FAILED: 1 of 1 checks failed java.io.ObjectInputOutput.ExtTest
TEST FAILED: uncaught exception java.io.ObjectInputOutput.LoopSerializationTest
TEST FAILED: 2 of 3 checks failed java.io.ObjectInputOutput.Compat2
TEST FAILED: uncaught exception java.io.ObjectInputOutput.HierarchyTest
TEST FAILED: uncaught exception java.io.ObjectInputOutput.OutputTest
TEST FAILED: uncaught exception java.io.ObjectInputOutput.ProxySerializationTest
TEST FAILED: 1 of 1 checks failed java.io.ObjectInputOutput.SerTest
TEST FAILED: 2 of 3 checks failed java.io.ObjectInputOutput.Compat1
TEST FAILED: uncaught exception java.io.ObjectInputOutput.Deserializable
TEST FAILED: 6 of 6 checks failed java.io.ObjectInputOutput.InputTest
TEST FAILED: 12 of 26 checks failed java.io.FilePermission.traversal2
TEST FAILED: 45 of 66 checks failed java.io.FilePermission.traversal
TEST FAILED: 1 of 2 checks failed java.io.FileOutputStream.fileoutputstream
TEST FAILED: 2 of 3 checks failed java.io.FileOutputStream.security
TEST FAILED: 1 of 1 checks failed java.io.FileOutputStream.append
TEST FAILED: 1 of 1 checks failed java.io.FileOutputStream.write
TEST FAILED: 1 of 9 checks failed java.io.DataOutputStream.WriteRead2
TEST FAILED: 1 of 6 checks failed java.io.DataOutputStream.WriteRead              

Conclusion:

86 of 135 test passed.

Looking more closely at the test result, reveals that some native method are missing. But at a even closer look -- are they realy missing?
It turns out that I've just misspelled them; instead of "java.io.ObjectStreamClass", my javaio.librar refers to just "java.io.ObjectStream", missing the "Class" postfix (actually its not per se my misspell, its actually my javah implementation, that must be ignoring the Class ending. So, in the end, still my fault.). With that in place, I just managed to run one of the tests successfully! And I bet you that a few other test cases might be solved by this as well.

Minor update:

These tests now succeeds:

TEST PASSED (14 checks) java.io.ObjectStreamClass.Test
TEST PASSED (27 checks) java.io.RandomAccessFile.jdk11
TEST PASSED (23 checks) java.io.ObjectOutputStream.StreamDataTest
Not as many as I had hoped for, but its something.
Some of the now failing test do however have some more success as they don't throw exceptions.

söndag 23 mars 2014

New address, and new library

The original author of JAmiga, Peter Werno, has kindly redirected jamiga.org to this place. The jamiga2 at blogspot address will still function though. But its nice to know that people will find this new site, instead of the old when googling.

New library and new tool to run

I've previously written about my JGit attempts, and I've finally managed to package it all and get it out of my way. You can download the JGit archive from this site, and the new javalangreflect-library is available via AmiUpdate.

What is it, then?

The new native library is nothing special, it only adds one method I found required by the JGit Command Line Tool. The JGit application is just Eclipse's GIT client. And GIT is used by developers for keeping track of their source code (similar to subversion and CVS). I'm not an experienced GIT user, but I have got it to run, and create some directories. I'm hoping some of you Amiga developers with GIT experience, can help me try it out. There might still be things wrong/missing in JAmiga, which hinders it from fully runnning. I've tried it on my Mac, with much the same result.

So, if you're not a developer, this might not be very fun for you.


If you want to try it out, here are some hints and resources which might help you in using it:
  • First, download my JGit archive. The archive contain the JARs needed together with a small script that simply sets the classpath and starts it. Without arguments you'll get usage help.
  • On Eclipse's own page, you can find instructions on how to use the CLI.

It should be noted that the client is mostly developed to be used by other Java code (in an IDE f.i.), so the CLI tool might be a bit limited.

And I'm not claiming that it works; I'm only saying it can do stuff.

måndag 10 februari 2014

Post-traumatic Jfokus syndrome

So, Jfokus 2014 is over. I mentioned it briefly in my previous blog, but in short it's Sweden's largest Java conference, with roughly 1500 visitors, 6-7 concurrent sessions spanning three days. The speakers come from various places, like Oracle, Red Hat, Spotify, and of course, Omegapoint! My attendance is part of Omegapoint's yearly field trip to this event. I work at Omegapoint, hence my shameless plugs.

Onion to go

My takeaway from Jfokus in terms of JAmiga, I think can be summarized as a real eager in getting OpenJDK to run. There were talks of all snazzy new features OpenJDK 8 has to offer, as well as interesting insights to the general OpenJDK eco-system, and how you can contribute. Mark Reinhold from Oracle talked on Jigsaw project, which basically modularizes Java, and splits the JDK in parts. The objective is primarily to be able to ship a stripped down version of the Java platform, so those who don't for instance use a GUI or a database, can remove those part.

It was described like an onion, where you peel off the outer layers, and in the end you're left with the absolute minimum required. My, perhaps naive, plan is to take the only the core of the onion, and begin my porting efforts on that.

In my last blog I mentioned how I really can't decide on what to focus on. Even more so now. But I really want to get started on the OpenJDK route. And, in order to do that, I think my next move should be to update jamvm to the latest source with OpenJDK support. Now, I know you all amigans really, really want that GUI support. But like I previously wrote, I really don't want to repeat myself and do the same GUI job twice for both GNU Classpath, and OpenJDK -- so, I can either find a way that works for both, or focus on implementing it for OpenJDK. Because seriously, OpenJDK is the only way forward.

The cheese

Within OpenJDK there is a project called Caciocavallo (yeah, I know, cheesy name) that implements AWT GUI stuff, utilizing Swing components. This means that one wouldn't have to implement each AWT component, i.e. map native ReAction/MUI button, textbox, list, and such to its Java counterpart; it'd be sufficient to implement the more general graphics backend, that Swing uses to draw all the gadgets. Now, that doesn't mean that the work is simpler, it just means that a lot of tedious work can be skipped. This also implies that Java GUI's on AmigaOS wouldn't get an Amiga native look, but rather a Java-Swing look. Which of course is boring. But there are ways to implement look-and-feels to make stuff look more native (if I remember correctly in some cases it can actually be native gadgets, and not just a mimiced look).

Well, bla bla bla. I'm getting ahead of myself, to summarize, this is my plan forward:

  • Update jamvm to latest version
  • Build OpenJDK and get to know it better (i.e. build it on linux, and start from there)
  • Take a close look at the Jigsaw project, and peel off all the onion rings
  • See what Caciocavallo can offer
Knowing myself pretty well, I think I'll come back and re-iterate this list. And since jamvm is available in a Git repository, I really should get that Git client running.

måndag 3 februari 2014

Trying to J-focus

Somewhere, over all the place

It feels like I'm all over the place currently. I can't decide what to focus on. I have however managed to implement a new library: javalangreflect.library. I told you about it previously when trying to run the JGit git client. I reached some success, as in "it started".
See output below:

Get git-ing with it

3.Mauve:Projects/jgit/jgit> jamiga:jamvm -Dgnu.classpath.home.url=file:jamiga:classpath org.eclipse.jgit.pgm.Main
jgit --git-dir GIT_DIR --help (-h) --show-stack-trace --version command [ARG ...] The most commonly used commands are: add Add file contents to the index archive zip up files from the named tree branch List, create, or delete branches checkout Checkout a branch to the working tree clone Clone a repository into a new directory commit Record changes to the repository config Get and set repository or global options daemon Export repositories over git:// describe Show the most recent tag that is reachable from a commit diff Show diffs fetch Update remote refs from another repository gc Cleanup unnecessary files and optimize the local repository init Create an empty git repository log View commit history ls-remote List references in a remote repository ls-tree List the contents of a tree object merge Merges two development histories push Update remote repository from local refs reflog Manage reflog information reset Reset current HEAD to the specified state rm Stop tracking a file show display one commit status Show the working tree status tag Create a tag version Display the version of jgit 3.Mauve:Projects/jgit/jgit>

However, trying to get status from a repository only resulted in AmigaDOS requests for disks named "git:". I don't know how its supposed to work, but the Git URI does indeed look like "git://git.berlios.de/jamvm". So I'm not very surprised. I guess I really should try and get the Git client working on another Java system first. So that I know my command line syntax is correct.

Trying to J-focus

This week I'm however really Java focused, as I'm attending Sweden's largest Java conference: Jfokus. Today I listened to stuff on Java 8 and Java 7. Cool stuff indeed! And it makes me really want to go the OpenJDK route, and get us updated, from Java 5 to Java 8. But I also want to get some GUI stuff in order, before I commence a new, I'm fearing long-going route. Furthermore, I really don't want to WET, but rather stay DRY; so I keep telling myself "Don't Repeat Yourself". After my ill-fated Git try (but in some ways successful, I got a new library!), I looked at the GUI code in JAmiga. And in GNU classpath in general. And in OpenJDK. And then I got tired. There are so many classes! And so many native calls!

Gad only knows

Regarding the JAmiga GUI/AWT implementation, it uses GadTools. I would like to use ReAction, since its, a) what OS4 should use, and b) I think its easier to connect it to Java, with it being object oriented. In essence I'm naïvely thinking it'd be sufficient with one native call to the BOOPSI call NewObject. Now, I know that it isn't that easy. But I think its far easier than using GadTool's CreateGadget.

The talented coder Andy, broadblues, Broad, with his phenomenal digital art creating program SketchBlock, has in the accompanying ProAction ARexx GUI creation package, included the source. Which I have peeked at. So, one option is to take inspiration, or even code from that (not without asking though!), and another option could perhaps be to add ARexx support to JAmiga, and get GUI support that way. The last ARexx option is tempting, since it would give me an oportunity to get ARexx to JAmiga, which would be utterly cool. What talks against it, is however speed. It would be a nasty web of intricate Java to native C-code, wrapped in strings sent to ARexx, back to native C-code, doing GUI, back to ARexx, back to native-C, back to Java. And then iterate through that scenario a few times for every little button we want in our GUI. Not something you would like to run big beasts like Eclipse or NetBeans on.

What about MUI, I hear some of you say? Well, I'm not ruling out MUI in any way. Its just that I myself have very limited knowledge of MUI. And I basically want to come up with a solution that works for both OpenJDK and GNU classpath, before I implement it for real. If that solution uses ReAction, it would be easy-peasy to change it to MUI anyways, since they both are BOOPSI.

söndag 12 januari 2014

Mauving forward

I've been running some more Mauve-tests in the java.io package. The tests in java.io are mostly running, beside these:

  • java.io.File.WriteMethods
  • java.io.File.ReadMethods
  • java.io.File.ExecuteMethods
  • --
  • java.io.File.newFileURI
  • java.io.File.WriteMethods
  • java.io.File.URI
  • java.io.File.UnicodeURI
  • --
  • java.io.File.security
  • java.io.RandomAccessFile.security
  • --
  • java.io.File.createFile
  • java.io.File.newFile
  • java.io.File.emptyFile

I've divided them in four section (striked tests are those I've recently fixed).

Protection bits and pieces

The first, Read and Execute methods, are only minor stuff regarding protection bits (i.e. RWED and such). I think it's easily fixed, it might even differ on which Amiga files system I use for the test.

URI, who? Geller?

The second, the URI methods, surround my previous discussed Amiga paths: File me a river, Amiga paths.
So, I'm back struggling with this. To the avail is a nifty class I just found in java.io: PlatformHelper! Reading from the javadoc:

/**
 * We had many changes in File.java, URLStreamHandler.java etc.
 * to handle path representations on different platforms
 * (Windows/Unix-family).
 * Finally we'd like to collect all these ad hoc codes into this
 * utility class.
 *       --Gansha
 */

How convenient.
However, initial tests has got me stumped, as the PlatformHeloper doesn't seem to affect those areas I would have assumed.

URI, where? Bending spoons, eyh?

The third section surrounds security, which gives me exceptions indicated relation to the URI issue in section two:

   java.lang.ExceptionInInitializerError
   at java.lang.SecurityManager.(SecurityManager.java:180)
   at gnu.testlet.TestSecurityManager.(TestSecurityManager.java:132)
   at gnu.testlet.java.io.File.security.test(security.java:94)
   at RunnerProcess.runtest(RunnerProcess.java:379)
   at RunnerProcess.runAndReport(RunnerProcess.java:434)
   at RunnerProcess.main(RunnerProcess.java:242)
java.lang.ExceptionInInitializerError
   at java.lang.SecurityManager.(SecurityManager.java:180)
   at gnu.testlet.TestSecurityManager.(TestSecurityManager.java:132)
   at gnu.testlet.java.io.File.security.test(security.java:94)
   at RunnerProcess.runtest(RunnerProcess.java:379)
   at RunnerProcess.runAndReport(RunnerProcess.java:434)
   at RunnerProcess.main(RunnerProcess.java:242)
Caused by: java.nio.channels.UnresolvedAddressException
   at gnu.java.nio.SocketChannelImpl.connect(SocketChannelImpl.java:162)
   at gnu.java.net.PlainSocketImpl.connect(PlainSocketImpl.java:281)
   at java.net.Socket.connect(Socket.java:463)
   at java.net.Socket.connect(Socket.java:414)
   at gnu.java.net.protocol.ftp.FTPConnection.(FTPConnection.java:255)
   at gnu.java.net.protocol.ftp.FTPConnection.(FTPConnection.java:223)
   at gnu.java.net.protocol.ftp.FTPURLConnection.connect(FTPURLConnection.java:121)
   at gnu.java.net.protocol.ftp.FTPURLConnection.getInputStream(FTPURLConnection.java:165)
   at java.net.URL.openStream(URL.java:737)
   at java.security.Security.loadProviders(Security.java:131)
   at java.security.Security.(Security.java:80)
   at java.lang.SecurityManager.(SecurityManager.java:180)
   ...5 more

Looking at the debug logs of this, indicates that the SecurityManager class wants to open a security file, and it seems to want to resolve this file by using an FTP connection. Even though the file is local. And this most likely is due to the Amiga path from the Java standpoint looks like an URL; "jamiga:foo/bar/security.properties". I've seen a spot where the "foo" can be mistaken for a port number, but silently ignored due to not being a number. Or it might be somewhere else. Investigation is on-going.

Uri, hurry up!

The fourth section, or rather the createFile-test fails because it takes too long to complete. It might be due to that it truly takes too long, or it might be some other error that causes it to take too long. Only time will tell, I guess.

Coming attractions

Other that Mauve-testing, I'm trying to do a follow-up on the previously released developer's kit. But those tries are hindered by the issues just mentioned.

söndag 5 januari 2014

Are you having trouble installing JAmiga 1.2?

From reports on the support forum on amigans.net, JosDuchIt reported some troubles installing and running JAmiga. The culprit was an innocent space in the name of the driver where JAmiga was installed.

I'm ashamed to say that my installation script didn't support spaces in partition or drawer of installation path. I myself have had spaces in my partition names, f.i. "AmigaOS 4:", so its a bit silly i didn't catch this. I'm assuming other's have had similar problems, but only JosDuchIt had the courage, and sense to report it!

Given the Amiga community's size, its really crucial for developers to get some sort of user feedback. I'm actually pretty spoiled with a rather large buzz, all things considering. So, its not so much for JAmiga's users, but more for the sake of all the other program on os4depot and elsewhere: please, if you download something and it doesn't work - report it. Most, if not all, developers want user feedback, because they put a great deal of effort into just uploading stuff to os4depot.

I'm really throwing bricks in my own glass house, but its one of my new years resolutions: to give more feedback for programs I regularly use.

Updated installer available

Anyway, the error with the installer has now been fixed, and the JAmiga 1.2 archive on os4depot should be able to install nicely - even with spaces. Remember to AmiUpdate after installation!

Some background info

I thought I'd share some of my installations script behavior. It is in most regards a pretty normal install script. Howver, the Java classes (i.e. all the class files building up the Java SE standard), are in-fact bundled in the JAmiga archive as lha archives. The entire Java SE standard consist of roughly 3700 classes, and in essence the same amount of files. So I wanted to lessen the initial unpacking to a minimum, and leave the most unpacking to the install script. Therefor UnArc handles the unpacking during installation. And I missed a pair of quotes surrounding the destination drawer, hence the space issue.

Other things I've included in the install script are the preview and choice of icons. For this I use Multiview with its companioning ARexx port to close the preview.

In order to open the DefIcons tutorial, I use the AmigaOS 4 standard program "URLOpen". One future enhancement I'm thinking of is to automatically launch AmiUpdate when the installation has been performed, so any new updates have a better chance of being noticed and installed.

And these are some of my favorite things with version 4 of AmigaOS. As a developer I can actually rely on a few things being installed by default. I don't need to weigh down my archive with support files. Now, I wasn't much of a developer in the 3.x era, but I remember installing stuff often required the installer to supply the lha unarchiver and such. Furthermore, with the power of ARexx, a lot of stuff can be done from scripts, which I'm just realizing writing a few AmigaGuides for JAmiga.

Anyhow, I should get back to writing and releasing my Twitter application. Not because its ground breaking or earth shattering in any way, its only because it is a great example of what can be done with JAmiga today, using third party JAR files.

Tata!