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!