ERTS_VSN=5.8.1
At least you need these for UNIXes. I use a tiny shell script for this.
Robert
Yes, it is not going to work to put the jars on the commmand-line classpath because these jars need to be loaded by a special loader that can generate EFunX and ETupleX classes as needed.
For some reason, the right kilim.S_XX class is not being generated into the jar; this could be some problem that appears only with specific versions of erts. Dunno.
Erjang uses the ERTS_VSN or +e to construct the directory from which to load the bootstrap BEAM files (ROOT/erts-${ERTS_VSN}/ebin I believe), nothing else.
We're testing only with the R14, so you may have run into some case where there's a problem for some reason.
Perhaps people here can report which versions of erts they have working?
Kresten
________________________________________
Fra: erj...@googlegroups.com [erj...@googlegroups.com] På vegne af Andy Till [totemk...@googlemail.com]
Sendt: 12. december 2010 21:50
Til: Erjang
Emne: [erjang] Re: No bootstrap classes at: c:\erl5.7.4\lib\erts-5.7.3\ebin
> The code there does the following:
>
> ------------------------snip----------------------
> String classFileName = name.replace('.', File.separatorChar) +
> ".class";
> InputStream resource = super.getResourceAsStream(classFileName);
> ------------------------snap----------------------
>
> It tries to load classes like "erjang\S_6.class" or so. This fails. It
> should always load like "erjang/S_6.class". Here your comment fits
> very well - it is general Java behavior/expectation to do so, so
> Erjang code does wrong there on Windows.
>
> Sinse my first commit was as non-invasive as possible, I solved it
> with a fallback :)
Very reasonable - and your code worked fine, but was somewhat misleading.
> What I would suggest is to generally replace
> File.separatorChar there through a hard "/" and drop the fallback. I'm
> not sure about the future build strategy on Windows, but if this would
> be Cygwin only (like Erlang), this would always work. I guess it would
> even work on Windows without Cygwin, too.
>
> If we agree on that, I can commit the final version.
I already did - just before I commented here :-)
> ---
>
> As for the start script: as I started to dig deeper and to mix my
> Erlang environment with Erjang, I began to experience some problems
> which I couldn't quickly solve yet. For example, The .erlang file
> doesn't get loaded:
That's something to look into. I'll try to see what kind of unrecognized
I/O error this is about.
> ----------------------------output------------------------------
> pb@PBPC01 ~/code/ex/erjang (master)
> $ ./ej
> 01.01.2011 08:53:31 erjang.EModuleManager$ModuleInfo
> warn_about_unresolved
> INFO: unresolved after load: code:is_module_native/1
> |
> =ERROR REPORT==== 1-Jan-2011::08:53:33 ===
> file:path_eval([".","c:/Users/pb"],".erlang"): unknown POSIX error
> Eshell V5.8.1.1 (abort with ^G)
> 1> 4 - 1.
> 3
> 2> q().
> 01.01.2011 08:53:45 erjang.EModuleManager$FunctionInfo$1 invoke
> INFO: MISSING kernel:prep_stop/1
> ok
> 3>
> pb@PBPC01 ~/code/ex/erjang (master)
> $
> ----------------------------output------------------------------
>
> I see a couple of unresolved functions. But I can start ej and ejc and
> work with them without any obvious problems. Does it behave any
> similar to yours? I didn't have to do any script modification...
I get "Unable to access jarfile /path/to/file.jar" when starting ej in a
Cygwin shell. The path is a Cygwin one, starting with "/home/", so this
makes sense; I wonder what jar path Java receives in your setup?