LibreOffice OOoBean. How to connect using UNO_PATH from Java app? - libreoffice

In order to connect to LibreOffice instance, I need to have UNO_PATH environment variable set (otherwise, I get java.io.IOException: UNO_PATH environment variable is not set (required system path to the office program directory)). If I run my app from a batch file and set it beforehand, all works fine. However, the best approach would be to read it from the app settings and set it before calling loadFromURL(...) method of OOoBean object which I use to interact with my Office object.
Does anybody know how to manage to do that? I've been trying different methods including injection even but all of them have failed so far.

Related

Launching an application in UEFI

I have a UEFI application that needs to download (TFTP) the file "bootmgfw.efi" which is the Windows EFI boot loader. I can successfully call Mtftp(), LoadImage(), and StartImage() to download and execute the image. However, the Microsoft boot loader determines it is executing locally instead of over the network and looks for required files locally instead of downloading them via TFTP. How do I spawn an application such that it knows it is from a network?
I have two ideas, but so far I have been unable to make either work.
After calling LoadImage() but before calling StartImage() I need to obtain the EFI_LOADED_IMAGE for the new image and modify it. I think I need to modify the DevicePath to indicate it is network loaded, but I do not know how to do this.
Skip Mtftp() and call LoadImage() with TRUE for BootPolicy. I believe this will download and load the file, but I do not know how to tell it what file to load. My guess is the DevicePath passed into LoadImage() would contain this, but I do not know how to construct the DevicePath.
We had a UEFI developer who wrote this application, but he left the company before completing the work. So I am forced to pick up this code base and learn UEFI to try and complete this. Thanks for any help!
The behaviour of bootmgfw.efi is that it always looks for files it needs to load on the same path that it itself was loaded from it. So to make it download its files via TFTP you need to do this:
In your boot application a new LoadFile protocol which gets files using TFTP behind the scenes by calling Mtftp()
Create a "virtual" device path and associate it with this LoadFile protocol
Load bootmgfw.efi using the virtual path instead of calling Mtftp() directly
If you do this bootmgfw.efi, when it tries to load its own files, will do so using the virtual device path and therefore end up downloading them via TFTP.
You can create the virtual path with the DevicePathUtilitiesProtocol. You can use your own application's device path as the base path and then append some subpath to it with devicePathUtilities::AppendDevicePath().
You can get your own application's device path by opening LoadedImage protocol on it followed by opening DevicePathProtocol on the loadedImage's DeviceHandle like this:
EFI_LOADED_IMAGE_PROTOCOL* loadedImage;
EFI_DEVICE_PATH_PROTOCOL *thisImageFilePath;
EFI_DEVICE_PATH_UTILITIES_PROTOCOL *devPathUtilities;
bootServices->OpenProtocol(imageHandle, &gEfiLoadedImageProtocolGuid, &loadedImage, imageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
bootServices->OpenProtocol(loadedImage->DeviceHandle, &gEfiDevicePathProtocolGuid, &thisImageFilePath, imageHandle, NULL, EFI_OPEN_PROTOCOL_GET_PROTOCOL);
At this point thisImageFilePath will be the path of your own application's image. You'll now have to call AppendDevicePath() on it and append another path of your choosing to it to get your virtual device path.
To create the new LoadFile protocol, refer to the UEFI spec.

Trouble shooting Oracle Form Builder error FRM-10044

I'm trying to create & save a new form using Oracle Form builder however, I get the error FRM-10044: Cannot create file.
The same thing happens when I open and save an existing form (.fmb)
I've check the folder permissions where the form is being save, it has read write access.
I've tried saving it into a differ folder and also tried creating a new folder but it still throws the same error.
I'm able to create and save a word, excel document in the new or existing folders (as mentioned-above) without any issues.
I suspect it could be something to do with the Windows Registry or System Configuration settings because I had recently shutdown/disabled so of the services in the System Configuration (using
msconfig.exe). Unfortunately, I don't remember all the options that were modified.
I've gone through numerous discussion forums, but still no luck.
Any help is appreciated.
Thanks in Advance
I've experienced the same thing. But in my case, i compiled the form on server side. The error appeared because it was remote-controlled by more than 1 person. One of the remote session was possibly locking the file creation. So I logged off the other session and try to use 1 session only when compiling the form. This happens sometimes when we're using an OS with multiuser and multisession capability.

GWT Properties file configuration

I am new to GWT, and facing one problem.
How we have .properties file for initial configuration at startup.
I want to create one in GWT App.
Also, GWT has client and server package.
I want to setup the configuration at client package because all configuration belongs to client side.
My actual need,
I have one textArea which takes up only fixed number of characters and length is defined in my properties file like below.
So I have to read a properties file for validation.
my.properties
smsConstraintEnabled=true
smsConstraintCharLimit=160
I found few link but all are talking about properties file regarding Locale, I don't have any need on Locale side but need simple key-value configuration.
I want this file to be loaded at startup or at Entry point itself and then I can use it at any client package classes for my validation.
Thanks in advance.
Use a Constants interface. It's built with I18N in mind but will work just as well in this case, where you provide the constant values for a single locale, the default one (therefore used for every locale you'll compile your app with).
That however means the file is read at compile-time, not runtime (i.e. you'll have to recompile your app each time you change the properties file).
If you want something more dynamic, then read the file on the server-side and pass the information to the client-side. Easiest, and with minimal overhead, is to use a dynamic host page. To read the values in your client code, then either use a Dictionary (and Integer.parseInt et al.) or use JSNI (possibly with an overlay type).

Web deployment tool

I would like to know if in IIS manager, when I export an application, there is a way to save components selected so, when I export next time, to select them by default (like appHostConfig). Thank you.
Unfortunately that is not possible today, if you are constantly using it you should consider using the command line instead that will easily allow you to save those in an external file and run them as frequently as needed without having to specify everything again.

Whic file of my C# project i wll give to a user for just use my software but they cant modified it

im making a software using C#.net ..and want to give it to users
Which file of my C# project i should give to a user for just use my software but they cant modified it.....how i make that type of file?
Which file of my C# project i should
give to a user
You should give none of the files that are part of your C# project. Provide only the compiled assemblies or if you already have a setup project that generates a deployment package such as an MSI, provide the resulting MSI.
You must create setup file and provide that much only.And your set up must contains serial key.If you dont know how to create serial key during setup creation then click here