I am trying to package a JavaFX application using NetBeans & Inno setup. I have placed the custom .iss file and the images under Sample/package/windows folder. Ant CLASSPATH is also updated.
When I an trying to build the project, the compiler picks up the custom .iss file, but throws a file not found error.
Reading file (WizardImageFile)
File: C:\Users\Me\AppData\Local\Temp\build3064710805837836647.fxbundler\imageswin-app.image\Sample.bmp
Error on line 34 in C:\Users\Me\AppData\Local\Temp\build3064710805837836647.fxbundler\images\win-app.image\Sample.iss: Could not read "C:\Users\Me\AppData\Local\Temp\build3064710805837836647.fxbundler\images\win-app.image\Sample.bmp".
Error: The system cannot find the file specified.
Compile aborted.
Sample.bmp file is present under Sample/package/windows
I figured out the problem here. The custom iss file should have the absolute path of the image file.
Related
When I run my gazebo, I get the following error:
[ERROR] [1515141508.242475977]: Skipped loading plugin with error: XML Document '/opt/ros/kinetic/share/gmapping/nodelet_plugins.xml' has no Root Element. This likely means the XML is malformed or missing..
[ERROR] [1515141508.249164933]: Skipped loading plugin with error: XML Document '/opt/ros/kinetic/share/gmapping/nodelet_plugins.xml' has no Root Element. This likely means the XML is malformed or missing..
Even with the errors, gazebo seems to work fine but I would like to fix it just to be safe. However, I'm not sure what the error messages mean and how I can fix it.
Can you verify if there is any "nodelet_plugins.xml" file is present in the /opt/ros/kinetic/share/gmapping directory?
Add
nodelet_plugins.xml
to your CMakeLists.txt file within your catkin_workspace
install( DIRECTORY launch
FILES nodelet_plugins.xml
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)
Then do a catkin_make from your worksapce. The error should go away.
Note: Make sure /opt/ros/kinetic/share/gmapping/ has no xml files, just a folder called cmake. if there is a xml file, delete the file usng sudo
I'm trying to set up the dart-rails gem. When I created my first dart code file, I got this error:
ERROR: Target of URI does not exist: 'package:rails_ujs/rails_ujs.dart' ([dart_app] dart_app.dart:1)
When I double click on the error, it brings up the following file.
app/vendor/bundle/gems/dart-rails-0.4.3/lib/dart/rails/generators/templates/dart/dart_app.dart
This is the contents of the file:
import 'package:rails_ujs/rails_ujs.dart';
RailsUjs ujsHelper;
void main() {
ujsHelper = new RailsUjs();
}
I have this same file in my app/assets/dart directory as well as the package itself. That file is not showing an error. If I change the code to something invalid, an error pops up. This proves the analyzer is looking at it as well.
The error pops up when I run Reanalyze all Dart source files (without restarting Dart Analysis Service). This is a button in the RubyMine IDE. I tried restarting the service and reanalyzing. I get the same error. This issue seems to be that the analyzer is scanning the entire project for dart files. Is it possible to control where the analyzer looks? It's RubyMine that is running the analyzer, not me at a terminal prompt.
This turned out to be a RubyMine issue. I fixed it by placing a file called .analysis_options in the root of the project with the following contents:
analyzer:
exclude:
- 'vendor/**'
I just excluded everything in the vendor directory. Even when I was getting the error, the analyzer continued to process all the valid code files.
If you import the file using
import 'package:rails_ujs/rails_ujs.dart';
the file rails_ujs.dart has to be in thelibsub-directory of the directory where thepubspec.yaml` file is
he pubspec.yaml file needs a name: rails_ujs property.
pub get needs to be run from the directory that contains the pubspec.yaml file
I have a problem concerning log4j2 which does not load the log4j2.xml configuration file in a project.
The project is bundled into an uber jar file. When running the application using java -jar jarfile.jar the application starts but log4j prints the following error to the console:
ERROR StatusLogger No log4j2 configuration file found. Using default
configuration: logging only errors to the console.
I checked the jar and it definitely contains a log4j2.xml file in the root location.
Because I could not figure out why this does not work I debugged to log4j2 bootstrap code. I found out that log4j never tries to read the log4j2.xml. This should happen in org.apache.logging.log4j.core.config.ConfigurationFactory.Factory#getConfiguration.
Unfortunately the list of factories used in this method is empty thus the method always returns null.
Any ideas on this?
If you want to check this clone https://github.com/cryptomator/cryptomator, cd to the main directory in the cloned repo and run mvn clean install -DskipTests -P uber-jar afterwards you will find the jar file in question under main/uber-jar/target.
I suspect this is the same issue as Log4j2 configuration not found when running standalone application builded by shade plugin since it sounds like you are building an uber jar.
I have a similar issue, but not using shade.
I have a jar file, with dependencies in /lib
I have a log4j2.xml file in the same location as the main jar file.
I can (obviously) run the jar file by calling:
java -Dlog4j2.configurationFile=.\log4j2.xml -jar myjar.jar
However, in Windows, it's possible simply to double-click the jar file to load it. Everything loads and works, except that it doesn't find the log4j2.xml file - so no logfile is written.
What I would like to be able to do is have a simple jar file I can hand to someone and have it run on their machine, with the ability to configure logging in the event they run into issues.
EDIT:
To do that, you need to amend your code thus:
public class MyClass
{
static
{
System.setProperty("log4j.configurationFile", "log4j2.xml");
}
private final static Logger LOG = LogManager.getLogger();
//OTHER STUFF HERE
}
Thanks to Load Log4j2 configuration file programmatically for the answer.
I'm trying to reference FakeLib.dll from my local Fake.Deploy installation in my deployment script but can't seem to find the correct path to use. I found that Environment.CurrentDirectory points to my Fake.Deploy installation, but just using
#r #"FakeLib.dll"
doesn't work:
Deploy messages
{
2015-05-12 09::22:50.413
2015-05-12 09::22:50.417
2015-05-12 09::22:50.417 Install.fsx(2,1): error FS0082: Could not resolve this reference. Could not locate the assembly "FakeLib.dll". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. (Code=MSB3245)
2015-05-12 09::22:50.432
2015-05-12 09::22:50.432
2015-05-12 09::22:50.433 Install.fsx(2,1): error FS0084: Assembly reference 'FakeLib.dll' was not found or is invalid
}
Examples I found on the web suggest to deploy FAKE along with my application in the NuGet package and reference it like this:
#r #"tools\FAKE\tools\FakeLib.dll"
but this seems like overkill and an unnecessary reference.
Does anyone know what path to use to reference the local Fake.Deploy installation?
Just found the answer myself: the base directory used for references in the post-deployment fsx script is __SOURCE_DIRECTORY__, the directory of the deployment itself.
So assuming your Fake.Deploy is installed in
.\Fake.Deploy\
then Environment.CurrentDirectory will point to this directory, whereas __SOURCE_DIRECTORY__ will point to
.\Fake.Deploy\deployments\\{your_app}\active
So you can reference FakeLib.dll from your post-deployment fsx script as follows:
#r #"..\..\..\FakeLib.dll"
I will try to get this added to the documentation page.
That being said, there are in fact points to be made for deploying FAKE together with your application:
It makes sure the correct version is used to run your deployment script
The Fake.Deploy installation might not be be under your control, so you could be prevented permission-wise from accessing its binaries
The configuration of Fake.Deploy allows to specify a different deplyoment location (via "WorkDirectory"), so this hardcoded path will break when using a non-default location
Note that when your NuGet package is sent over via Fake.Deploy, the agent runs the script in the root of the package from the same folder as the fake executable. So, when your fake.exe is in C:\Fake\tools\fake.exe, your files are in C:\Fake\tools\deployments\YourApplication\active. If you need to read a properties file or something from that directory, your script won't see it. So, you'll need to do the following in your script:
open System
open System.IO
let arguments = System.Environment.GetCommandLineArgs()
let script = arguments.[1]
let scriptDirectory = script.Replace(#"\NameOfMyDeployScript.fsx", #"")
System.IO.Directory.SetCurrentDirectory(scriptDirectory)
I wanted to put that out there so no one loses their mind over trying to access some file. You'll see an error like this if you don't change directories:
System.IO.FileNotFoundException: Could not find file 'C:\Fake\tools\myfile.properties'
I am having a java project having the directory structure as
java->applet and a few .java files
the applet folder further contains two folders and some .java files
I need to develop a jar file out of this project
I did so by writing the command line
jar cvfm myfile.jar *.java
(obviously by moving into corresponding directory)
when I checked by extracting the file(it was zipped as a Nokia application installer file)
it showed me only the classes in the applet folder not the folders in it
moreover i needed to use this jar file in a jquery plugin where i had written
var dasherApplet = $('applet');
dasherApplet.attr({
'height':'100%',
'width':'100%',
'archive':farfalla_path+'plugins/dasher/jardasher.jar',
'code':'JDasherApplet.java'
});
but it showed me the class not found exception
for this I checked the previous versions of the java applet; there the java files were replaced by .class files so i tried compiling a java file into .class by using the command line
C:/>javac filename.java
still all in vain this time it showed me
"cannot find symbol" error
what was interesting was that the errors generated were imitating the java files present in the same folder. I navigated to the directory where the file was stored still the same error
when i tried to simply run it by using
java filename.java
error was main class not found:JApplet.java
Please help me develop this applet
Firstly you need to compile all the jar files before running.
Secondly , you CANNOT run Applets using java filename.java .
As this link explains http://download.oracle.com/javase/tutorial/deployment/jar/build.html ,
jar cvf TicTacToe.jar TicTacToe.class audio images
Here audio and images are folders , so that is how you add folders to jar.
Also .jar files are not Nokia Application Installer files . Nokia simply associates them for installing apps (that is J2ME)