Load Linux library through a Windows client - java

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

Related

New permissions showing up on MacOS Catalina with Java application

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.

Burning source files onto a CD/DVD [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have created a game called "WordHunt" and I want to burn it to a cd/dvd..
Is there a proper way to burn java files especially GUI into the cd/dvd?? Is there a tutorial about it? can u please show it to me. I really want to learn it badly.
I'm assuming you have a game that you'd like to install a game you've written in Java from a CD/DVD. For that, you might want to use one of a series of freely available installer generators (found here).
If in fact you are simply trying to create a CD/DVD which autostarts a Java game, this explanation of Windows autostart procedures might help you:
[...]
If Windows finds a (plain text) file called AUTORUN.INF in the root directory of a CD then it follows the instructions in this file to run a program, as per the above descriptions. This example AUTORUN.INF file tells Windows to run program shellrun.exe (from the root directory of the CD) which in turn will show web page default.htm in the user's default browser. The other options are described below.
[autorun]
open=shellrun.exe default.htm
icon=shellrun.exe
action=Start ShellRun-CD
label=ShellRun-powered CD
Use the Windows Notepad application to edit plain text files (it is in the Start+All Programs+Accessories menu).
Your CD users may have switched off AutoRun. This might be because they are concerned about viruses. Also, if they press the Shift key down while inserting the CD, AutoRun is disabled.
There is no way to force your users to use AutoRun. It is therefore good practice to provide instructions so that users know how to start your CD, eg tell them to open file default.htm in their browser. These instructions are also required if your CD might be viewed by non-Windows users.
[...]
Having said that, the more "Java-like" solution to this problem would probably be something like a Java Web Start application. You might want to look into that technology before you go with physical distribution :)
Is there a proper way to burn java files especially GUI into the cd/dvd?
Don't do it!
The best way to distribute software to users these days is over the net. For deploying Java based desktop clients from a link, look to Java Web Start.
Java Web Start (JWS) is the Oracle Corporation technology used to launch rich client (Swing, AWT, SWT) desktop applications directly from a network or internet link. It offers 'one click' installation for platforms that support Java.
JWS provides many appealing features including, but not limited to, splash screens, desktop integration, file associations, automatic update (including lazy downloads and programmatic control of updates), partitioning of natives & other resource downloads by platform, architecture or Java version, configuration of run-time environment (minimum J2SE version, run-time options, RAM etc.), easy management of common resources using extensions..

Can I use Java applications to control Windows 7 functions?

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.

How to write a Icon Handlers for explorer.exe in Java

First of all, I'm a java developer and I am currently working on a small application for Windows only.
In my application, I wish to do as dropbox or tortoise do : add an overlay icon in windows explorer to show the user some state of files managed by my application. (I want the icon of the file change depending on some data stored in the file)
Is it possible to do so in Java ? Do you have examples ?
If it is doable but not efficient, how would you do instead ?
Thanks in advance
Fluminis
It would be possible to do this via JNI - you would need to hook into the Windows registry and from there into the Explorer shell, probably into the various file classes held there.
However, unless you have at least some familiarity with C++ and the windows API, you are unlikely to be able to achieve this.
Java is not the ideal language for what you want to do.

Demo Java application runnable from a DVD

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.

Categories

Resources