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').
Related
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?
Is there's any java embedded web browser(free) that support applet running ?
I don't mind if its use some native libraries.
Currently ,I already tried javafx web view and DJnativeswing and they dont detect java(doesn't support applet).
Most of the modern browsers (Chrome v42+, Firefox 64 for Windows, Microsoft Edge, etc) have dropped support for NPAPI which is required for applets to run. Oracle is recommending that developers switch over to Java Web Start instead of using applet as the technology is fading. If you still need to use applets (eg. for school programming projects) you may need to uninstall your current browser(s) and install a legacy browser that still includes NPAPI.
Browser do not support applets nativly. That's because applets need a java runtime environment and an browser adapter to display the content in the browser. But if you install a jre it always will install an plugin into you browser(s) if not already present.
I have created a java application.
I also created another java application which install the first application.
The program runs perfectly.
However the program isn't displayed in control panel->programs.
I also want to create an uninstaller (let's say unintaller.bat). But i want to works like any other uninstaller. When someone goes to Control Panel->serach program->uninstall this program it will run the uninstaller.bat
In other words, the concept is how to declare the java application in windows...
Any idea???
Installing an application doesn't necessarily mean registering it with the operating system. For example, for a Mac, I can open an App without having it added to the Applications folder.
Same with Windows. Just because a new file can be added to the Start menu, it doesn't mean it was registered.
Use a Windows installer. There are tons that are open source, and even MS provides a free one: http://support.microsoft.com/kb/942288.
This will allow you to install an uninstall an application using standard tools. Yes. It can be called from a bat file.
Java open source installers: http://java-source.net/open-source/installer-generators
How do I launch a URL in the user's default browser, in code from a Java Swing application?
There is this Netbeans library, but the jar dont seem to contain the classes mentioned in the example.
And there seems to be a number of old bespoke examples around.
But are there any killer solutions?
If you're running on JDK 1.6, you java.awt.Desktop.
Desktop.getDesktop().browse(new java.net.URI("www.google.com"));
If running on an earlier JDK, I believe that you can download the JDIC library. Or hack something together by spawning processes.
To expand upon kdgregory's answer, the The Java Desktop API, available from Java 6, provides integration with the desktop with functionality such as launching default web browsers and mail clients.
Launching a web browser can be achieved by using the Desktop.browse method.
For example, launching http://stackoverflow.com can be acheived by the following:
Desktop.getDesktop().browse(new URI("http://stackoverflow.com"));
More information:
Using the Desktop API in Java SE 6
How to Integrate with the Desktop Class
You can look at BrowserLauncher, although the latest version of the JDK are trying to make that obsolete.
i'm trying to build a Java applet and i'm having a major problem trying to set up my development environment because my applet has bugs in it but I can't fix them easilly because Java won't get the latest version of the applet. I've turned off caching in "Java Preferences.app".
I want to set it so that applet wil not be cached at all, as any bugs can easilly be ironed out.
I'm using the latest (on Leopard) XCode and Safari 4.
Thanx,
kenny
Applet Caching
SUMMARY:This new feature is activated
by including the new PARAM
NAME="cache_option" and PARAM
NAME="cache_archive" values in the tag
that specifies the use of Java Plug-in
as below: The cache_option attribute
can take one of three values:
No
Disable applet installation. Always
download the file from the web server.
Browser
Run applets from the browser cache
(default).
Plugin
Run applets from the new Java Plug-in
cache.
EDIT:
Caching Option
Steps to Turn off Java Applet Caching