Hello other developers.
Today I came here with a doubt and to verify if I can find a solution.
I work for a company that created a java application for MAC. The problem arose with the new Catalina.
Now when the application is installed two new permissions appear on the security. "Full Disk Access" and "Input Monitoring"
The application requires keyboard input and downloads a file to a temporary folder, then moves it to the USB.
For mouse input what we use on our application is JavaFX
We also use java/awt/DefaultKeyboardFocus and NodeBuilder
JavaFX - version 8
I wanted to check if there is any possibility do make these permissions not to show up, as the client doesn't want them to appear.
Or should we use other APIs for these kinds of accesses?
Thanks in advance and best regards.
Related
several years I used to come on the bible of coding and I have (maybe) a question rarely asked. First of all thanks to all people which takes time to answer us.
I have a network with a Linux server and some Windows clients. On the server I have to use a Java application (I don't have source code) but it's hard to use it on the server : graphic card drivers are not update then the resolution of the screen is "small" and not expandable. It's a problem because layouts of the app are not dynamics then some important buttons are not displayed (is it so hard to use a JScrollPane ???). And I don't really want to learn how many times I have to use Tab for each hidden button.
Then one solution is to launch the app on a Windows client through MobaXterm. It works well but at one moment a process need a library.
I tried to launch the app by adding the library path of the library, a *.so file, but didn't work.
The question is : a java application installed on Linux and launched through a windows client need *.so or *.dll library ?
Thanks.
Florent
I'm relatively new to programming, I've been developing a lot lately in the eclipse environment and had the idea to build a small application for windows 7 that when I remove the power cord from my laptop it will enable my touch-pad and when the power is reconnected disable the touch-pad.
My question is how exactly do I go about building such an application?
Is there a package I can import that gives me access to the Windows 7 API?
And is it possible to compile a java application so I can have it run at startup?
I agree with Andrew that java is probably not the best choice for such kind of application but anyway here is what you can do.
Java 7 file API is able to listen to file system. You should listen for the changes is root folder of your card. I guess you will get exception when card is disconnected.
Touch pad may be invoked as an external application. Take a look on this discussion for details: Java - invoke on-screen keyboard
Alternatively you can use JNI, JNA or one of java-to-windows libraries (JaWin, Jintegra, Jinterop). But I think this is much more complicated. I'd recommend you to start from the first solution.
I am currently trying to create an installer for a application that i created. And i want the installer to be able to run on mac, windows and linux for now. Hence, i chose to make my installer in java.
Now, the problem that i am facing is i have to install mysql from within java without giving the user all those unnecessary choices during the setup phase because it really necessary for them to know it. I know this can be done because while installing wamp, this is how mysql is installed. I only need to bother the users for the right things.
So, can somebody tell me how it can be done?
Thanks in Advance
For Mac and Linux I would let your installer start a shell script. However on Macs it is not common to have "installers". You should consider to just deliever binaries which the user can copy via drag&drop with his mouse. For that you usually only make an immage file (*dmg) which gets mounted by the finder and opens in its own finder window. You can have a symbolic link of the Applications folder on that *.dmg and a background image with some text: "drag here --->"
This might not be exactly what you're after, but how dependant are you on using mysql as the DBMS? If you use fairly standard SQL and this suits your application, maybe you could switch to Apache Derby? That will allow you to include the whole DB as a part of the installation, and completely invisible to the user.
See: http://db.apache.org/derby/
(caveat: I don't remember the details of the Apache license, but I'm assuming there's no issue there)
I wish to give some demo copies of a Java application on a DVD to a client. Does it make sense to have a preinstalled JRE and Java application on a DVD so that they can just click and run it?
Also, if anyone has done this what are your views on this?
I would suggest you skip the DVD and go for a flash drive instead. This way you can use portable Java and run your app from the flash drive without having to install anything on your client's computer. With the low costs of flash drives these days you should easily earn back what you spend in money in convenience and time.
Here is a tutorial that shows you how to set this up.
Indeed you can simply put a JRE into a directory of the DVD.
Then you start the application with a .bat file that runs a command such as :
jre\bin\java.exe -jar Main.jar
(If your jar and the jre folder are in the same directory)
Be careful about one thing : you can't know in advance what the DVD's drive letter will be, so in your .bat file you must give relative paths to the JRE and to your jar (or starting class).
If you are dealing with a one or two people then just throw a JRE on the DVD and explain how to install it or even just include a link to the page where they can install Java themselves. In the past when dealing with a large set of recipients that needed to install a JRE and run an application, I have used tools like InstallAnywhere, to create a simple setup to walk the user through a wizard for setup.
I've in the past copied a windows JRE directory to a USB flash drive, and run a java app off that.
If:
The users have an internet connection
The demos. have a GUI
You can deliver them off a site
..I would recommend using deployJava.js to ensure a suitable minimum JRE, & Java Web Start to download/install & launch the demos.
JWS has a number of advantages in this situation:
Server hits for the resources will reveal what proportion of the people to whom the demo. was delivered, are actually trying it.
JWS offers 'lazy downloads' so that if a potential user is only interested in one small section of a large application, they do not have to download the entire binary.
If the user turns a demo. into a registered version, (at least parts of) the app. will be already installed.
But in the event that it is a constantly changing app., JWS will automatically update any new parts of the app.
All this is part of the 'one click' installation experience for JWS. It is more tricky for a developer to set up, but once done well, is a breeze for the end-user.
You might include an HTML page on the CD (DVD would be a waste for a single HTML, a couple of images & some CSS based style sheets) that links to the demos. But since the hardest thing about getting a user to try a demo. is getting them to put the disk in the drive, I would side-step the disk entirely & send the 'Here are some free demos.' HTML to the user as email.
This was included as a comment a couple of days ago. Since the thread was resurrected, I decided to include it as an answer & expand on it.
I developed small cross-platform (Windows and Mac) SWT desktop application. It is distributed with WebStart. So far so good, everything works.
I've got a new requirement to make my app start on system startup (with no user interaction). What is the best way to accomplish that?
In JNLP file I've got this:
<shortcut online="false">
<desktop/>
<menu submenu="CompanyName"/>
</shortcut>
On Windows WebStart creates a desktop link [app_name].lnk and it points to
javaws.exe and then some Java cache file as a parameter with funny name like ..\Sun\Java\Deployment\cache\6.0\4\2c0a6a781-213476. I can possibly programmatically find that link on user's machine by name... erm... and then copy it into user's Startup folder. I can see a problem here though as user can disable WebStart desktop shortcut creation option all together.
On Mac WebStart pops up a dialog to prompt user for the location where to create an [app_name].app (user is allowed to change link name there!) file that launches an application. On Mac I don't event know where the Startup folder is located (and it seems to be much more complex there).
Is there Java library out there that abstracts start app on system startup concept on different platforms as SWT does for GUI abstraction?
There is, but it's very new, so it's not widely available.
The IntegrationService was introduced in 1.6.0u18. The method of interest is requestShortcut.
You can take a look at Java Service Wrapper. This can wire your program as a windows service.
Bump!
Seems like http://yajsw.sourceforge.net/ is the currently active project that achieves this.