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?
Related
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.
I'm working on a little Java app and I'm currently putting the installer together. This checks for perquisites, such as Java being installed, and prompts the user to download anything that's required.
I need to set a requirement for the minimum Java version I support (I'm building with 7). Is there a simple way I can detect what this would be? So if I'm using any classes etc. not available in earlier versions. BTW I'm using IntelliJ.
I'm not sure if the entire 'system tray' complicates things, but..
For deploying Java desktop apps., the best option is usually to install the app. using Java Web Start. JWS works on Windows, OS X & *nix.
The best way to deploy a JWS app. or applet is to use the Deployment Toolkit Script. (That script will do the 'version checking').
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.
I'm trying to expand upon the basic Java that I've learned by taking an example that I've found in a general Java programming book and growing it with more capability. I've been trying to use Xcode's v3.5.2 Java project template for a Java application using the Eclipse Juno IDE and I see some of the methods and classes are deprecated. After clicking around the internet for the past two or three days, I'm confused.
I have two primary questions:
What is the proper start in developing a Java application (not for the web) on a Mac? Is the template available through Xcode 3.5.2 the right way to go? I'm trying to find how the apple.laf.useScreenMenuBar (discussed in the Apple Developer User's Guide for Java) interplays with the Xcode template. Does one outdate the other? Should I start from scratch?
I have yet to come across any documentation/template for the bare-bones/stub setup of a Java application on the Mac other than what is available in Xcode! I would think that such a stub would be available given Apple's Human Interface Guidelines. If some reference is available, I would appreciate a link. I've been consulting Apple's Java Development Guide for Mac and the API documentation, Oracle and other places on the web but so far no luck and just confusion.
I get the idea that the true answer is to give up on Java on the Mac and program on the PC or just go with Objective-C! (I'd like to learn Objective C but unfortunately right now, I have better survivability in my company with Java and Python.)
Thanks for any kind suggestions.
Give unto XCode that which is objective c. Use Eclipse for everything else.
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.