Wanted: JNode Alias API in a jar

A separate jar for the JNode Alias API is a smaller request than a full-blown JNode emulator. It is difficult for me to work with the JNode Alias API because it is not yet available in a self-contained API-only jar.

I would like to import the JNode Alias API and use it in my own operating environment. I would like to write an application that runs on multiple platforms (Linux, Windows, JNode) and wherever possible reuse JNode-compatible APIs.

This API does not include one thing that is very important to me. It does not provide an actual Alias object. When a command class is loaded by a custom class loader, how do I create an alias for it? The aliasClassName property cannot find the command class, can it?

With OSGi, classes in a bundle are loaded by a separate class loader. A bundle is capable of automatically registering JNode-compatible command classes, except the Alias API does not yet support custom class loaders.

Thanks,

Have you tried using Emu?

I get the impression that you have not tried using Emu. I did some work on it recently to remove the hard-wiring of command classes, aliases and syntaxes. The latest version trawls the plugin descriptor files to extract aliases and syntaxes.

Give it a try. I avoid the issue of figuring out what should be on the classpath by launching Emu from my Eclipse JNode development workspace. But a brute-force approach would also work. I personally don't see the need for a JAR file for launching Emu, but a wrapper script would probably be a good idea.

If you have suggestions for improvements to Emu, put them on this issue: http://www.jnode.org/node/2755

"He sure can't fly but I'm telling you. He can run the pants off a kangaroo."

Prerequisites for running Emu?

My question is this: What is the recommended platform for running Emu? What are its prerequisites? What did you do to get it to work?

I am using Eclipse Ganymede on Microsoft Windows XP with Sun Microsystems JDK 6. JNode compiles cleanly from within Eclipse. When I run Emu, a window is displayed. Immediately, an exception is thrown. I am thinking that the Open JDK classes should not be used in Sun JDK, right?

I use Eclipse (Callisto) and Sun JDK 6.0 on Linux.

... and Emu works for me. (Or at least, it did last time I tried.) What exception is being thrown?

If the root of your problem is and issue with Open JDK versus Sun JDK, we need to find a workaround. JNode is committed to using the Open JDK libraries.

Shell Emu exception on Microsoft Windows XP

Launching Shell Emu from within Eclipse on Microsoft Windows XP and Sun Microsystems JDK 6, the following exception is thrown after displaying the console window and prompt:

javax.naming.NameNotFoundException: org.jnode.driver.textscreen.TextScreenManager
at org.jnode.emu.Emu$1.lookup(Emu.java:74)
at org.jnode.naming.AbstractNameSpace.addNameSpaceListener(AbstractNameSpace.java:61)
at org.jnode.naming.InitialNaming.addNameSpaceListener(InitialNaming.java:58)
at org.jnode.driver.console.textscreen.TextScreenConsoleManager.(TextScreenConsoleManager.java:52)
at org.jnode.driver.console.swing.SwingTextScreenConsoleManager.(SwingTextScreenConsoleManager.java:27)
at org.jnode.emu.ShellEmu.main(ShellEmu.java:20)

Thanks,