JavaFX 2 is not support Linux yet. Does this mean a client Linux machine (user machine) cannot run it or a server Linux machine (host machine) cannot run it or both?
*EDIT:*
JavaFX is for rich client. So the server will not run it, but store it and client will get it and run it, right?
JavaFx depends on hardware acceleration to run. This is currently not supported on linux (expected 2012). So if your server is executing JavaFx code, then it would not run on the server. If it is only delivering code to clients, like in an applet, then it would work.
It means you can't use the JavaFX libraries on a machine running Linux. Neither a client Linux machine, nor a server Linux machine can use them.
Response to Edit
You can still store and serve JavaFX code on Linux machines. You just can't execute the JavaFX code on a Linux machine.
Note that JavaFX is different from Java. You can still use Java on Linux machines.
I realize this question was posed a while back (11/2011), but I thought it might help to point out the related Open Source project from the OpenJDK community called OpenJFX. Feel free to help out with development, if you're qualified to do so as well. Given the secure nature of Linux, this project should prove a secure/safe way to utilize the "hardware acceleration to run"; though, it's still in the development stages.
Take a look at the project wiki to learn how to build OpenJFX on Linux.
Related
I work on a Macbook and I would like to close some running applications such as Remote Desktops through using Java.
I'm quite new to programming in Java and other than Google and StackOverflow I'm not sure where to go. I already looked for a solution on Google but all I can find are instruction on how to close Java on Mac OS, not actually how you close a running application through Java code.
So I am looking for some pointers on what Java commands I should use to close a running application in Mac OS. Thank you very much :)
While programming in Java, you only have access to do things inside the JVM. But your code inside the JVM wouldn't usually have permissions to affect other processes running on the operating system.
You can definitely call an external command with something like this:
Process process = Runtime.getRuntime().exec("kill 12345");
That would run the kill command on process id 12345. This would work, assuming you have the right permissions.
You can get more information on the exec command in the docs: https://docs.oracle.com/javase/7/docs/api/java/lang/Runtime.html#exec(java.lang.String)
I need to debug a Java applet. For now, just getting a heap dump would be a big help, although running something like JavaSnoop would be even better.
The complication is that the applet is part of a complex website that only works in Internet Explorer. While it's theoretically possible to isolate the applet and run it independently, initial attempts to do this have failed.
I have attempted these instructions. However, the debug settings are not taking effect for the Java VM that is running the applet. Port 2502 is not listening. I have tried basic tweaks such as rebooting and running IE as administrator, which have not helped. I've also confirmed that the same command line allows me to debug a standalone Java application.
I'm running JDK 8 and IE 11 on Windows 7.
I'm wondering if IE interfaces with Java slightly differently, so it doesn't obey the Runtime Parameters I have specified in the Java Control Panel.
When I run any project java desktop application in netbeans (F6) or run any .jar file java desktop application, it's always delay about 20 seconds or more.
I tested this project on another computer, it works ok (no delay).
Does my computer have an error with Java? Any solution for this problem?
Edit 12/11/2011
Is it true? I check my system, and I think my java application load too much because I can't turn on "Java Quick Starter". It is in Control Panel > Java > [tab] Advanced > Miscellaneous > Java Quick Starter
In my laptop, I can't enable Java Quick Starter.
Thanks for your help!!!
Netbeans will compile your project first, this takes a while. A directly ran java application with a reasonable size jar file should not take more than a second to launch. Of course this does not account for the system you use, if everything you do is slow, so is launching java applications.
Maybe you could try to rise the JVM memory and see what happens...
I think there are 2 params you can give to the Javac to do that they are Xmx( max ) Xms(starting mem)
Or you could try to run jviVisualVM which is a app that comes with java for memory throubleshooting it should be inside java\bin directory
In response to your question about Java Quick Starter. The introduction on the sun website show the following:
JQS is enabled by default in Windows XP and Windows 2000 operating systems and is not necessary on Windows Vista as Vista offers its own pre-loading mechanisms.
and later:
Note: JQS service will perform runtime checks and stop running when a laptop is running on batteries. JQS service will resume when the power cord is plugged in, as performance benefit of JQS is largely dependent on overall system configuration.
Perhaps this is one of your problems.
I am going to create a Desktop application in Java. I don't know whether user having JAVA VIRTUAL MACHINE or not.
My questions are:
I want to know whether its possible to run Java application in a machine that doesn't contains JVM.
If its possible, I want to know whether this case is possible, I will created a application say MyApps, I will to convert this as .exe file and if user clicks MyApps.exe it should run my Java application and install JVM and run in that machine.
Use webstart, and to install java automatically, see the great comment of Andrew Thompson.
Then the user is free to use Solaris, Mac or Linux if he likes.
and updates for the JVM will be shipped to him. You don't need to rollout a new update for every bugfix in the JVM or Java-libs.
You can run a Java application on a machine which does not have a JVM, provided you install the version of Java you need first.
You can create an application which will install java as required and then run your application. However you cannot write this in Java (unless you have a JVM installed already)
This is not completely pointless as many system have some version of Java but may not have the version you need.
Nope, you need a JVM to run the Java bytecode. The only solution would be to transform the bytecode into a different executable format.
Finally I got the solution for running my Java application without Java Virtual Machine, by bundling JRE in the exe file. I did this by using the following link.
It's really working awesome.
JAVA without JVM using Launch4J
If we maintain the Directory Path as given we can get .exe with JRE bundled that will run without JVM.
Background:
Windows-xp mode of windows-7 does not give full windows instance (unlike VMWare virtual machine instance). There are restrictions on writing files to 'c:/Program Files' etc, which comes into effect when user is installing our software on windows-xp-mode of windows-7 (it works correctly when installation is done directly on real windows-xp machine)
Is it possible to detect if the program is running under "windows-xp" mode of "windows 7"?
The installer( generated using InstallAnywhere) is java program, but we can run normal executable(say c++ based one) to gather information about the machine.
Don't test for whether you are in Windows XP Mode specifically. Instead, test to see if you have problems writing to program files; if so, put in whatever workarounds you need to.
I suspect your problems aren't specifically caused by Windows XP mode, but rather by something that is coincidentally caused by XP mode, but might occur in other circumstances as well; doing a test for the specific problems you have would allow you to put in a workaround in all such situations.