I am using javapackager for making installer from .jar. I need to give some params to my installer(splash screen icon, remove version from app name etc), that can't be given directly by javapackager. Instead javapackager has an paramfile option, but I don't know how to use it, and what structure will it have?? Can anyone help me??
it is a java properties file. You can look in https://github.com/Debian/openjfx for the parameter you want to override and then set it in the properties file.
Related
I think I'm missing some fundamental way of working with various prefixes in the Qt Creator qrc environment.
If I place a qml component in the default prefix, the application builds and runs fine. But if I add a new prefix and then add a new component with this new prefix, the application output tells me it is not a type when I run the app (it builds without error).
Qt Creator recognizes it when it is assigned a different prefix, and I can work with it in the IDE. It shows up in the qrc editor & it becomes a component that I can select within 'Designer'. It also builds without problem... but when I run my application, the application output tells me it is not a type.
If I then open qrc editor and move that component to the default prefix, the application will then run fine.
It seems like I've not given it the direction to find the component at runtime when it is assigned to an alternative prefix.
I'm at a loss as to where I would direct the application to the other prefixes.
I've tried using the "import" in the component that I wish to use it in without success.
I've tried giving it an alias without success.
What needs to happen for this component to be recognized in my app as a type... even though it's already recognized within Qt-Creator?
If it's a prefix, it seems I should add it as a prefix to something I can type in; where would that be?
I was able to solve my problem with a syntax adjustment.
If a qml file wants to use a qml component from a different qml file that is listed in the qrc under a different prefix, it must import the prefix.
I was trying this without success: import "/myOtherPrefix"
However, it needs it to be like this: import "qrc:/myOtherPrefix"
I was not able to find a reference for this in the Qt documentation (it's probably there somewhere)
javafx set application ico
when i create java project , add jfxrt.jar
it's right
new Image(getClass().getResourceAsStream("../images/customLogo.png"))
but this in javafx project
it's wrong.
how can i get relative path do this in javafx project.
I think that you should take a look on the Image API and this another link where how to put the icon is answered.
If you were generating a jar, you can use
new Image("/path/to/image")
The path to the image starting with "/", will be an absolute path inside the jar. I strongly recommends go to the Image API to check all the options, is really well documented.
Hope it helps
So what is the exception? Where did you create the project (which IDE). As a general rule never use ..-paths when doing look ups although the might work on the filesystem they e.g. break inside jar-files IIRC.
I'm not able to access the playn.core.json.* classes inside eclipse even though everything else works in general. I have used this http://code.google.com/p/playn/wiki/GettingStarted in setting up my eclipse project.
However the following classes are visible -
JsonImpl
JsonParserException
JsonSink
JsonTypedArray
JsonWriterException
When I go to the referenced libraries in Eclipse, I can see playn.core.json and
can see all classes inside it. I'm just not able to use them inside my
code.
Thanks!
Just saw the samples.
You're supposed to use the interface Json.Object/Json.Array.
Use PlayN.json().createObject() to create a new Json.Object instance, and PlayN.json().createArray() to create a new Json.Array instance.
Make sure you have statically imported playn.core.PlayN.*
Qt Creator give the possibility to attach some resource to the project.
I created in the project directory a folder called: Images. inside i have the file splash1.jpg
I created then the Resources file and attached the file as shown in the following figure:
Which is now the correct way to access from code such a file?
I tryed
QPixmap pixmap( "Images/splash1.jpg" );
QPixmap pixmap( "./Images/splash1.jpg" );
but none of them worked.
if i put just ./Images/splash1.jpg work at least if i compile by hand with qmake and make because has the correct path at runtime but no way to make it work within qt creator
Any idea??
Cheers,
Qt5 resources explains all you need. You have to put the colon before the path in the source tree. You also have placed a prefix, so :/Images/Images/splash1.jpg. This will give you a path.
If you need a URL, then use the qrc: scheme.
The correct way to load with Qt resources is: :/Images/Images/splash1.jpg.
What you could also do, is assign an alias to the resource. This way you don't need the .jpg: :/Images/splash
You can use ":/prefix/name of your image".
I am using Adobe Flash Builder 4.
I've run into this issue with my latest project, but I was able to re-create it with an almost empty project.
Here is what I've done.
Created a new Flex Project
Created a locale/en_US folder within this project.
Added a class that extends SparkDownloadProgressBar. All this class does is attempt to create a Label.
When I try to debug this application, I get the following error.
Error: Could not find compiled resource bundle 'components' for locale 'en_US'.
at mx.resources::ResourceManagerImpl/installCompiledResourceBundle()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\resources\ResourceManagerImpl.as:340]
at mx.resources::ResourceManagerImpl/installCompiledResourceBundles()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\resources\ResourceManagerImpl.as:269]
at mx.resources::ResourceManagerImpl/processInfo()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\resources\ResourceManagerImpl.as:387]
at mx.resources::ResourceManagerImpl()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\resources\ResourceManagerImpl.as:122]
at mx.resources::ResourceManager$/getInstance()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\resources\ResourceManager.as:111]
at mx.core::UIComponent()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\core\UIComponent.as:3728]
at spark.components.supportClasses::TextBase()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\supportClasses\TextBase.as:154]
at spark.components::Label()[E:\dev\4.0.0\frameworks\projects\spark\src\spark\components\Label.as:384]
at Preloader()[C:\SVN\Games\Social\Test\src\Preloader.as:21]
at mx.preloaders::Preloader/initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\preloaders\Preloader.as:253]
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::initialize()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:1925]
at mx.managers::SystemManager/initHandler()[E:\dev\4.0.0\frameworks\projects\framework\src\mx\managers\SystemManager.as:2419]
The Flex Compiler/Additional Compiler Arguments section does contain "-locale en_US", but I do not want to just remove this as I am planning to have this load different property files based on the localization region at run-time and how I understand it, I will need to add each locale that I am planning to use on the compile argument line.
I am at a loss as to how to attack this problem. If you need anymore information from me to help with this, I will be more than happy to provide it. Thanks ahead of time for the help!
This might be caused by the fact, that Preloader loads the actual framework, so you can't use the Flex's classes until it loads. Use standard TextField for it and it should work fine.