Guidance on Java issue on Mac - java

I have come across a major wall and hopefully someone can help me out.
Preface:
We have a desktop application (JavaFX based). It speaks to Canon camera using Canon's SDK. Hence one can download the latest Image taken, get notifications about camera events and so on. And it works all well on Windows.
Now the SDK is 32-bit based and hence the JVM we use has to be 32-bit based (64-bit JVM is incompatible, fullstop).
Coming to Mac
There is no Java-7 for 32-bit Mac. Hence we have got to us Java-6 which is no Issue (WIth -d32 VM argument). But it turns out that there is no Java-FX for Java6 on Mac. How can I bundle my application with Java6 and Java-FX? Any nightly build wil help? Or any other manual tweaks? Else it will demand a lot of restructuring of the code.

Related

Can't find a guide for building my own SWT dylibs

I don't know how exactly this problem is to be tackled but I have an Eclipse RCP (indigo) application which used to be deployed on Mac (10.6.8) Snow Leopard that must now be deployed on Mac (10.14.3) Mojave.
Our team, out of the options of VM-ing the app, migrating up the Eclipse RCP version (which due to the behemoth of an app we're dealing with would have led us hoplessly out of our time constraints), and keeping the app as is but simply providing a compatible SWT platform, chose the final option.
The idea being that SWT is the only real thing causing this Java app to not run when changing target platform.
the thing is we'd need an SWT targeted to Mac 10.14 and also answers Mac 10.6 calls.
Ergo a version that doesn't exist. (the end goal here, being to bundle our .dylibs with our project)
As my online searches have come up short I'd like to know what the procedure is for accomplishing this.
Here's what I did find :
https://wiki.eclipse.org/SWT/Devel/Gtk/Dev_guide#SWT_source_code_and_binary_repositories
https://wiki.eclipse.org/SWT/Developer_Guide
but I think they are trying to address how to develop with SWT not how to develop and build SWT.
also since I've never done anything like this I'm not sure I'm completely off the mark. is it SWT I'm aiming to build? is it JNI? is it os.java?

Java would only run on Compatibility Mode set to Windows 98 or older

My Java SE (8u111) just won't work. I can't open java programs. Not even the Java Control Panel. I have reinstalled 5 times over, and java just won't work. Everytime i try to open Java (The CP or Program) it appears in Taskmgr, does some work (CPU and Disk rate is picking up), then the rates goes back to 0 (except memory), and Java closes itself without any error notices.
The first time i installed Java, it worked without compatibility mode.
Now, it doesn't.
The only things i did before it breaks are:
I updated Intel HAXM
I turned on Intel VT
I ran Remix OS Player
Java breaks.
After it breaks, i did these to solve:
Uninstall Intel HAXM
Disabled Intel VT
Reinstalled Java 5 times over, one in a different drive
Still doesn't work.
If i apply compatibility mode set to Windows 98 / Windows Me or older, it works. But if i set it to Windows XP or newer, it will not work. Do anybody know why?
I run Java SE 8u111 (on first install, never updated), on Windows 10 version 1607
Intel Core i5-7200U, Nvidia Geforce 920MX, all running on a new 2 week old laptop.
One more thing, i doubt this'll help but, I use custom DPI Scaling (145%)
Test by launching from the console. it's as simple as typing java -jar path-to-your-jarfile into the terminal (can be opened with "win+r" and typing "cmd"). That might at least give you an idea what is the actual problem. --Paul
Thank you Paul for suggesting! After i run my java programs from the console, i found that all of the programs' crashes was caused by java.lang.IllegalArgumentException: 33 incompatible with Text-specific LCD contrast key.
I did a quick google search and read https://www.rarst.net/software/cleartype-install4j-java-bug/.
Then i remembered that, i have modified the registries of cleartype before java breaks. So i re-calibrated the cleartype settings through Windows Control Panel, and now... Everything works! All of the java programs, Java Control Panel, and java on the web is now working!
I might have figured out why the compatibility mode only works on Windows 98 or older. My cleartype parameters was invalid and java could not process the cleartype. Cleartype was implemented on Windows XP (i think). With compat. mode telling Java that this machine is Windows 98, Java would not start collecting configs and information on cleartype and/or load cleartype, making it not crash.
My problem is solved! Thank you!

How to get Apple Java Extensions (com.apple.eawt) work on JDK 7 and higher?

TL;DR: Apple has dropped native feature support in Java. Especially touchpad gestures are not working any longer. I wrote a library that does the job using JNI. Take a look at my answer below.
I'm searching for about hours to make the Apple Java Extensions work on JDK 7 or 8. I have been trying all I can think of. All threads on the internet about this simply blame the JDK for this. I think this should be solvable, because it worked in JDK 6. For clarity: I can make it work in JDK 6, but I don't want this legacy dependency, because not everybody that will use my application has JDK 6 or knows how to install it, let's say. The goal is to make a double-clickable JAR file that will run as expected with the OS X features (menu bar, gestures, about handler, etc...) with every version of Java installed (greater than JDK 6).
Since the developer preview release of OS X El Capitan, it became impossible for 99% of average computer users to install Java 6, so this was no longer an option for me. I finally decided to write a native library that will inform Java about gestures through JNI. The project works great and is hosted on GitHub.
Take a look at it here:
https://github.com/mcourteaux/MultiTouch-Gestures-Java
I just happened to run across your question and noted that it has not been answered yet. I have a Java program that I have been developing on the Mac, and noted that when I ran it under Java 7, the menu bar, Preferences, Quit and About all worked fine using rt. jar in the program's libraries folder and using a MacAppMenuHandler class that I wrote to provide functionality for those items.
However, when I switched to Java 8, they no longer worked. I'm not sure what the issue is though reading other web sites today suggest a "permissions" issue in Java 8 regarding these files.
However, I solved the problem by copying the rt. jar from Java 7 into the program's libraries, and it has continued to work for me while continuing to develop under Java 8.
I suggest this as one possible solution to the problem.
Hope this helps.
Go on your project Properties and select the Java Build Path Libraries, your JRE System Library should have an Access rules field like the one displayed in the image
Hit the Edit button and add an access rule to allow access to the com.apple.eawt package.
I had the same problem with "pinch to zoom" - it works in java 6 but not 7 or 8. I came across this bug in the jdk which seems to be responsible. It says it is fixed in Java 9.

Can't run in browser on latest Linux and Mac with Java7u13 JFX2.2.5

I can't start JavaFX 2.2.5 applications in browser(all possible browsers) in Oracle Linux 6.3 x86 and latest MacOS. I have the latest Java 7 u 13 from Oracle.
Neither JavaFX Netbeans sample, my applications nor Ensamble(http://download.oracle.com/otndocs/products/javafx/2.2/samples/Ensemble/index.html) work.
The applications work if I start them as normal apps, but not from the browser.
Java works perfectly on those systems, just that I can't start JFX 2 in browsers.
What should be done? My clients need the flexibility of starting their apps from browsers.
It worked a few versions ago, but now I can't start them. Browsers tell me that I don't have Java. (they show that image with Java that redirects to the page from where I can download Java). I also tried to install just the JRE from that link. I have removed and reinstalled Java.
Is anyone else facing this problem?
Any help would be really useful.
I have also posted this on oracle forum: https://forums.oracle.com/forums/thread.jspa?threadID=2494131
In addition, after installing JRE 7u13 on XP/sp3 (IE8), the "verify Java Version" page (http://java.com/en/download/installed.jsp) produces a Data Execution Prevention (DEP) exception
I've got access to my customer's Mac machines.
My apologize. They had 7u12 on their Macs.
Happily enough, it seems that Oracle managed to get JFX working in browser with 7u13.
Regarding Linux, I finally got it to work, but don't forget about "firefox/plugins" and "firefox/plugin" (the latest is wrong). Oracle should update this error from their description available at: http://java.com/en/download/help/linux_install.xml#enable

Java UI on macOS X Lion

I'm having a strange bug wich i suspect to be specific to either MacOS X Lion and/or Java VM implementation on this OS.
When a java app summons a secondary window like a dialog box, i'm often unable to interact with its content ie. click, use menus, etc.
At first i though my app was buggy but since i had developped it on windows (where it worked fine) and switched to mac. I though some weird swing setting was to blame and i had noticed on the console that a compatibility mode with cocoa was enabled when i launched my app.
But i encountered the same bug with eclipse itself (a well known java based ide) tough it does not always happen in it while it's all the time with my app.
I have browsed for this issue but found nothing. Meanwhile i found that there is an issue between oracle and apple about java. I downladed a java update specific to Lion but the bug is still here
My question is : have you encountered the same bug ? is it macos lion specific ? have you found a workaround ??
Thanks
Made some research. Eclipse seems to be the cause of the bug. More precisely SWT support in eclipse under MacOS environnement.
The bug is not present with netbeans.

Categories

Resources