Deploy a Java app on FX7500 RFID reader - rfid

I have developed a Java program using eclipse provided by Motorola. The program runs well in windows.
In that particular eclipse, there is a tool for application package builder, which will build a .deb file to be installed in FX7500 RFID reader.
Image 1
When I try to use that builder, the command prompt asks me for a few input, one of them is files directory. I input my jar file directory, and there is an error "Invalid file path".
Image 2
What should I input then?
I view the log, it is due to xcopy.
*
--> Running 'FX7500 Embedded SDK App Package Builder' (Mon 13/03/2017- 9:47:27.38) ...
---> User input ...
---> Clean up ...
The system cannot find the file specified.
---> Creating folders ...
---> Creating 'debian-binary' file ...
---> Creating 'control' file ...
---> Adding files into 'data' folder ...
'xcopy' is not recognized as an internal or external command,
operable program or batch file.
---> ERROR - Invalid file path
Anyone knows the correct way?

It looks like the packaging tool can't find the xcopy program on your machine. You might need to configure your path.

Related

Cannot get assembly name for "obj\iPhone\Debug\MyApp.iOS.exe". Could not load file or assembly The system cannot find the file specified

Cannot get assembly name for "obj\iPhone\Debug\MyApp.iOS.exe". Could not load file or assembly 'MyApp.iOS.exe' or one of its dependencies. The system cannot find the file specified. Fail to build IOS app, exe is missing in directory
we have already cleaned and rebuild multiple times...
We would like the build to succeed and launch the app on the ios device

Jenkins npm build fails to unzip a package on Windows slave

I have added a windows slave to do npm build, in my package.json i have a step in which it performs "unzip pack.zip".
When i do npm build directly on the box it does everything successfully but when it gets done using Jenkins job, it fails to unzip the file i.e pack.zip
The file even gets extracted properly using tools like Unzip, Winrar and 7z etc.
I wrote the bat file to do npm build. when i ran it using cmd it worked without any issue but when i executed the same bat file from jenkins, it failed in the same extraction step.
Added log below:
inflating: saui-client/node_modules/sig-quote/node_modules/sig-core/node_modules/underscore/underscore-min.map
error: expected central file header signature not found (file #73741).
(please check that you have transferred or created the zipfile in the
appropriate BINARY mode and that you have compiled UnZip properly)
inflating: saui-client/node_modules/sig-quote/node_modules/sig-core/node_modules/underscore/underscore.js
D:\jenkins\workspace\BUILD>exit 3
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
The only thing that comes to mind without the log is that you set your slave environment after connecting it to Jenkins - maybe even installed NodeJS after connecting it - meaning the session you have on your computer is not the same as was loaded when Jenkins was connected to it. The simple solution is to disconnect the slave and reconnect it with the new environment so the session will have all it needs to run. When you will have the log I will update my answer.
Good luck!

Running .jar File on Linux

I have a .jar file that reads two files from within its current folder and produces as output a .txt file and a separate folder with multiple other .txt files. This works perfectly in Windows using this code to create the directory:
static String dir = System.getProperty("user.dir");
I used the instructions here: https://askubuntu.com/questions/192914/how-run-a-jar-file-with-a-double-click to set up my .jar file to run on a simple double-click, but as of right now, it does nothing when double-clicked. My guess is that the above line of code does not translate well to Linux. Anybody know how to resolve this?
First, try running it on the command-line, with
java -jar <file.jar>
The user.dir property is cross-platform (see here) so it should not be the problem. However, are you using correct file separators? Remember it's '/' on UNIX and '\' on Windows.
Try java -jar Jarname.jar and pass other files as arguments after this command
The code line you gave works fine on linux.
My best guess is that you're then trying to use this directory path by adding a windows-specific path separator (like path + "\subdir") which isn't appropriate for linux (you should build a new File object instead).
Either that, or your jar file isn't being executed at all. Have you tried doing something very simple in your jar file to see if anything is being run? Have you tried running your jar with java -jar myapp.jar to see if any exceptions are thrown or error messages displayed?
You will need to manually tweak your build process to get the jar file marked as executable. In your build xml file, there is a target, "-post-jar", that is called after the jar is built. You'll need to make that target and use Ant's chmod task to modify your jar. Once you do that it will occur every time you make a jar file in that project.
It will run fine as long as you have a JRE installed.
Read this article to know more.

trouble creating an axis 2 .aar file: xml/services not found error

I am trying to create an aar file using OSX 10.7.5 (as a part of this tutorial). To generate the .aar, I navigate to the directory holding my webservice in my eclipse workspace and type
jar cvf FirstWebService.aar ./*
This is the command that Apache says to use to generate the aar in their Code Listing 9 from the apache axis 2 documentation.
The command creates an.aar -- but something is wrong with the process that I am using to create the .aar because when I go to load the .aar file into tomcat's /webapps I get an .xml/services not found error.
I am not sure what to do to fix this error. If I search my computer's file system for the services.xml file, I can find it in /path to eclipse workspace/workspace/MyFirstWebService/WebContent/WEB-INF/services/FirstWebService/META-INF
but I am not sure if this file is supposed to be rolled in to the .aar file somehow or if I can just manually plunk this file somewhere into the apache directory structure to get the thing to run.
Note: I do not think I am manually unzipping or unpacking the aar like in this question. Axis2 web service error: services.xml not found I am just running the command listed above from the apache documentation.
Here is the .aar file
note I am using all of the same versions of the software as in the tutorial -- but I am using OSX 10.7.5 where they use windows in the tutorial. Accordingly, I have changed the make-aar command for windows shown in the tutorial (jar cvf FirstWebService.aar com META-INF) into the one shown above. If I just try to run the command from the tutorial jar cvf FirstWebService.aar com META-INF I get the same xml/services not found error. It gives this output in the terminal...
com: no such file or directory
META-INF: no such file or directory
added manifest
I found the issue. When you type the command to create the aar file you have to be in the directory .../EclipseWorkspace/EclipseProjectName/WebContent/WEB-INF/services. This directory contains /META-INF/services.xml. The process that makes the .aar file must be looking in this folder.

Why does my pyinstaller created executable require admin privileges?

I've written a Python program which I distribute using pyinstaller. I've been using the onefile option so far to create a standalone executable. That's been great up until now, but as the application has grown the startup time is getting a bit long. I'd also like users to install the application properly to make upgrading simpler.
I've been trying to create a single directory version of the app using pyinstaller's onedir option. However, the resulting .exe file that is created requires admin privileges to run, which the onefile version did not. The program itself doesn't need any such privileges so I assume this is something that pyinstaller is doing. How do I create an application that doesn't require admin privileges?
Additional info:
Python 2.6, pyinstaller v1.4
Application uses PyQt4 and pygame modules.
Trying to create executable for Windows 7.
Using -w pyinstaller option to create a windowless executable.
admin privileges could be asked in few cases:
A. if the executable name contains relevant keywords (like setup, install, update or patch)
B. the application requests it in it's manifest.
C. the .exe file name do not match the name in the manifest file.
if you create a .spec file for your application package, you can add
exe = EXE(
...
manifest=None,
...
)
and it won't ask for password, unless you rename it to setup or install.
I have recently run into this issue, and my experience in solving it was thus:
PyInstaller with --onefile option creates a manifest file in the 'executable'. This manifest file on Windows tells the OS a few things about the application it is bundled with. One of the things it specifies, is the application name/manifest file. The format of the manifest filename is appname.exe.manifest. If your program is frozen with PyInstaller, the executable name that it stores in the manifest will be the name given to the completed EXE under the /dist folder of PyInstaller. IF you rename the EXE, the manifest file packed with it is no longer matching! Therefore, create a manifest file with the same name as the final EXE filename and run PyInstaller with the --manifest option, OR don't rename the EXE that PyInstaller creates.
When you package the PyInstaller project with the custom --manifest, the renamed program no longer requests administrator elevation.

Resources