Convert Scala-Files into a Dll - scala

I have some scala code I've written using IntelliJ with the SBT-Plugin and want to provide me code as an DLL for C++.
I already tried to use 'ikvmc': I packed all my classes via 'package' in one jar. Afterwards I manually set up one jar which contains all the dependencies I use (scala-library,scama,jamtio,jama). Unfortunately i obtain a lot of warnings:'IKVMC0119', "Emitted java.lang.VerificationError' and 'IKVMC0104' (analogously to the example below)!
Then i tried to convert a simple scala-class (no dependencies) using the method described above : package with sbt, add the scala-library.jar and try to convert it via ikvmc -target:library simpleClass.jar . I obtain the same warnings/errors as you see below...
I would be very happy if someone could give me a step-by-step explanation how to provide my Scala-code as an DLL.
Thanks a lot in advance!

Which IKVM version do you use?
If you already use 7.1 then it sounds like a bug in IKVM. Contact the mailing list or the bug list with a sample for reproduction.
If you use an older version then you should update.

After converting the hello.jar with the previous version of IKVM ('7.0.4335.0') i could use the dll in c# (even though i obtained warning from ikvmc). It also worked for my Scala code: converting the sbt-packaged jar with its dependencies delivered a dll. Afterwards i could use the classes in c#!

Related

How do I use JavaFX in Eclipse 2021-06 JRE x86_64_16.0.2

There are a couple postings on this topic, but I can't get this to work with the latest version of Eclipse. I am using the JRE that comes with 2021-06, the one it puts in p2, x86_64_16.0.2.
I have tried various configurations of User Libraries, Maven dependencies, setting PATH_TO_FX, searching Eclipse Marketplace for JavaFX-as-a-plugin, e.g.,
How do I use JavaFX 11 in Eclipse? (2.5 years old)
https://www.javatpoint.com/javafx-with-eclipse
https://www.tutorialspoint.com/javafx-with-eclipse
https://gluonhq.com/products/javafx/
On a couple more elaborate examples, a couple builds had a scattering of missing methods, which I assume is due to JavaFX being somewhat in flux or instructions being quite outdated. I can get a simple Hello, World to build with javafx-sdk-17.0.1 as a User Library (what I'm doing now) and also some of the other configurations. When I try to launch Hello, World with various build-able configurations, I keep getting
Error: JavaFX runtime components are missing, and are required to run this application
Well, I was a bit too quick. I kept playing around, and adding quotes in the VM arg seems to work,
--module-path="C:\Program Files\Java\javafx-sdk-17.0.1\lib" --add-modules=javafx.controls
If the project is not a module project, the Used Library goes on the Classpath in the project properties, Libraries tab. If it is a module project, it goes on the Modulepath,and the following module-info.java file must be in the src with this minimal information:
module <myProject> {
requires javafx.controls;
exports <myPackageContainingFXAppClass>;
}
I just don't get it why people prefer to search half of the internet for tutorials instead of just consulting the official documentation first. Here it is: https://openjfx.io/openjfx-docs/#IDE-Eclipse It seems to be the best hidden secret that there actually is documentation for JavaFX that one could start with.
I just did the test. Googling for "javafx documentation" gives https://openjfx.io/ as the first search result.
I use --module-path=${PATH_TO_FX} --add-modules=javafx.controls.
Obviously PATH_TO_FX needs to be defined in Preferences->Run/Debug->String Substitution.

Where to find this ReactiveUI.Routing?

I got a sample code that I couldn't get to compile. It is complaining about a missing Reference to ReactiveUI.Routing.dll
The piece of code that is using it is some Xaml code using RoutedViewHost element.
I looked up in Nuget for ReactiveUI-Routing. No help.
I had a look in the latest source code and couldn't find a project of that name or any direct members of the namespace ReactiveUI.Routing. There were some references in the test projects though. I wonder if they re-factored its members into the main dll?
Perhaps try pulling the source from https://github.com/reactiveui/ReactiveUI and compiling yourself?
RoutedViewHost is now in ReactiveUI.Xaml.dll, which is in the ReactiveUI-Platforms NuGet package. Since you haven't specified which major version of RxUI you're using, it's more difficult to help.
In ReactiveUI 4.x and below, this is in an assembly called ReactiveUI.Routing.dll, which is in the ReactiveUI-Xaml NuGet package.

Autofac AggregateService exists in NuGet?

I found Autofac AggregateService awesome but what is the right way to include it in my project: clone it from code.google.com or use NuGet?
I got used to use NuGet but I can't find nothing about AggegateService there. Any help?
It seems that AggregateService and the other Extras are currently "in limbo". There's been a recent change in that the contributions are now being made part of the same solution as Autofac core, while they were previously a separate solution. From the current build file you can see that extras will be made available as a separate Autofac.Extras package and a separate download from the Autofac page.
Meanwhile, you can use AutofacContrib 2.6.1 or to grab the source and compile a dll yourself.
Btw, thanks for finding AggregateService awesome ;)
Update: actually, reading the build file properly (and looking at the current source structure), the Extras parts will be distributed as individual packages. So expect to find Autofac.Extras.AggregateService on Nuget in the future.

I can't get qml to use my custom plugin

I'm working in QtQuick and right now struggling with a weird problem: I can't get my custom plugin to work in Qml. There's a simple demo in the SDK (Examples/4.7/declarative/tutorials/extending/chapter6-plugins) and this doesn't work on my computer either. I don't get any error messages except that it doesn't recognize my custom items. Has anybody seen this problem? Any suggestions?
My setup:
Win 7 Home Premium, Qt Creator 2.1.0, Qt 4.7.3 (MinGW 4.4)
Thanks
Beside the qmldir issue already mentioned by blakharaz, also make sure to set QML_IMPORT_PATH in your pro file or setting the path via QDeclarativeEngine::addImportPath() so the module can be found on your development environment (if you don't install them systemwide before using).
And when using subfolders, make sure they are part of the import (see http://doc.qt.nokia.com/4.7-snapshot/qdeclarativemodules.html)
It would be nice to have some code. One possible issue could be the directory structure or the qmldir file. If you want to have a plugin called Foo you basically need a directory Foo which contains the Foo.dll (or libFoo.so) and a qmldir file (content is at least "plugin Foo")
If you have that "import Foo 1.0" should load the library.
I just had the exact same problem.
Build your .dlls as release instead of debug, that fixed it for me.

SchemaToolTask not found in datanucleus-rdbms.jar

I have started with data nucleus a couple of days ago.
I have downloaded the jdo tutorial and am trying to run it.
I have collected all the jar files related to the tutorial here .
I am using ant for building. "compile" and "enhance" tasks work fine. The "createschema" task is spitting the following error out!
C:\datanucleus\datanucleus-samples-jdo-tutorial-3.0\build.xml:123:
taskdef clas
org.datanucleus.store.rdbms.SchemaToolTask
cannot be found
I have checked datanucleus-rdbms.jar for the SchemaToolTask and I didn't find that class in the jar file.
I downloaded it from here .
Why is that class not there?? Am I using the wrong jar file?
Why would you download 3.0 and use it with a tutorial for v 1.0?
In version 3.x the location of the SchemaToolTask changed from:
org.datanucleus.store.rdbms
to:
org.datanucleus.store.schema
reflecting the fact that the Schema tool is datastore agnostic.
Found that I was using source jar files instead of the binaries.
[Closing the question by marking this as the answer]