Eclipse is java application and should run on OS that has compatible jvm, eg: Linux distribution of eclipse should work on linux whatever may be the hardware, but still Eclipse has a separate distro based on arch , like ppc, x86 etc.
I tried the eclipse source build and it has parameter for hardware.
Is this because eclipse is built that way? or its jvm limitations
Eclipse uses SWT, which is a GUI that uses platform-native UI facilities.
http://eclipse.org/swt/
If you look into the plugin directories, you'll see lots and lots of dlls, at least under windows. This is for stuff like SWT, for the GUI. Also, for the builtin web browser, which is based upon XULRunner.
Related
I am rather new to programming and have begun designing a text-adventure game in Java. I am currently having difficulty finding out how to make the text-adventure playable on machines that don't have a JRE such as BlueJ or Eclipse installed. I would like to share my game with friends but don't want to install the JDK and a JRE for them to play it.
Thanks for the help in advance.
1) Using Java Web Start
Java Web Start software provides the power to launch full-featured applications with a single click. Users can download and launch applications, such as a complete spreadsheet program or an Internet chat client, without going through lengthy installation procedures.
2) The Java Packager Tool (For Java 9)
The Java Packager tool can be used to compile, package, sign, and deploy Java and JavaFX applications from the command line. It can be used as an alternative to an Ant task or building the applications in an IDE
3) Wrapping Java to EXE
Multi-platform tools can generate native installers for multiple platforms —
Windows, OS X, Linux
Advanced Installer for Java
install4j
InstallAnywhere
JWrapper
IzPack
InstallShield
Terminology
JDK
This is the Java SE Development Kit, which contains all of the JRE and also tools for building java programs.
JRE
This is the Java Runtime Environment, which only had the bits needed to run java programs
IDE
This is the Integrated Development Environment, which only the developer needs, such as Eclipse, BlueJ or IDEA.
What do users need
To run a JAR or class file the user needs:
Any dependencies that the program needs
Either a JDK or a JRE
Using JLink
You can use JLink to make a small version of the JRE, with only the packages which your program needs to run, reducing the install size, this can then be packaged with your game.
Advantages
Smaller than a full JRE
Faster to load
Disadvantages
If lots of apps have their own JRE then space may be wasted
You will need to update the JREs individually if an update happens
The Problem
Currently I use exe4j 4.4.2 to wrap our client app in a Windows native executable, but the result does not integrate with Windows 7 so well.
For example: When I right click in the task bar it only offers a pop-up to close the application but no pinning. Eclipse' Equinox launcher on the other hand does that with bravado.
I'm looking for a java exe launcher which has the following features:
Wraps jars in Windows native executables (no Java Web Start or similar)
Doesn't extract the jar from the executable
Doesn't need write access in "Program Files"
Uses executable filename as process name (only one process)
Integrates well with Windows 7 (esp. pinning in the taskbar)
Allows setting of JVM arguments (esp. heap size)
Flexible customization for JRE search
Lightweight
Actively maintained
Integrates well in Ant build
Preferably free
I have checked the following:
exe4j
Windows 7 integration lacking
It's not expensive but ordering and
distribution of licenses to the build machines is a pain.
JRE search not flexible enough
Eclipse Equinox
Not lightweight
Seems to do everything I want, except that I have no idea how
to use it with a non-eclipse-based app.
Can I use it outside of OSGI, PDE-Build world?
WinRun4J
JRE search not well documented
Seems not widely used despite incredible feature set, what am I missing?
Launch4J
Doesn't support setting the process name in Windows 7 (Bug ID 3353972).
There is a patch (Bug ID 1670471) but it has been rejected with reference
to jliftoff which is dead.
JRE search not flexible enough.
JSmooth
Seems not to be actively maintained.
Latest release is from 2007, well before Windows 7.
Are there any other options?
Is there a chance to use the Eclipse launcher with a non Eclipse-base application?
Try Advanced Installer http://www.advancedinstaller.com/java.html (There is a free edition available in this).
I'm happy with WinRun4J. The JRE search works fine for me. It sometimes chokes especially on 64bit systems if multiple JREs and JDKs are installed and registered in the Windows registry, but this can usually be fixed by supplying the correct path in the corresponding .ini file.
I did not use Launch4J because it creates a new (temporary) .exe in the JRE installation folder which seems a bit strange to me. The advantage of that method is, that it can use a single .exe for both 32 and 64 bit JVMs though
It sounds to me like you just need to go with Launch4J. The process name matches the .exe name that you launch with. A great example of a program that is wrapped this way is "Keystore Explorer 4.01".
I would create a bat file. Wrap this bat file into a exe. You can create an exe with an icon and everything. Try this bat to exe converter:
http://download.cnet.com/Bat-To-Exe-Converter/3000-2069_4-10555897.html
In this way, you have better control. The size of the exe is very small.
Edit: Also, the creation of the exe is one time thing.
What are the standard options for creating install packages for your software application? I notice that most install packages on windows seem to look the same, which leads me to believe that there is probably one standard/default option for building an installer?
My application is java based. My install "requirements" are pretty standard: kick off third party installations; run command-line scripts; move files around
Also, I would prefer an option that allows me to build an installer for both windows and linux.
If you are ready to pay for license, "InstallAnywhere" is a good solution.
I have used open source ant installer a while ago. If you are good with ANT builds, you can use ant installer; it s cross-platform.
If you were doing only Windows, the standard is MSI. This is Microsoft's own technology for Windows installations, and there are software bits out there to help you build MSI installers. MSI is a Windows-only solution though. If you want to support both Windows and Linux, you're going to need something else.
Give InstallJammer a look. It's free, open source and supports Windows and Linux beautifully.
This has come up before...
Multiplatform Installer
The answer given there sounds like the kind of thing you're looking for. http://izpack.org/
As other posters have mentioned, on Windows MSI is a standard solution. For crossplatform installers there are several options, most of them Java based. My company product, InstallBuilder, is one of the few that creates native, non-Java based installers. I mention this specifically because as your app may be Java based, you want to the installer to have minimal overhead and not have any requirements for bundling or searching for a Java runtime during install time, since that will cause all kind of problems
Is eclipse platform independent?
As per my knowledge, eclipse is written in java. If it is so eclipse should be platform independent. But there are different eclipse for different OS???
No, you need to download a platform specific version because of SWT which accesses the native GUI libraries of the operating system using JNI. Note that Eclipse provides versions for most platforms (see for example All Platforms for the Eclipse SDK 3.5.1).
There are distributions of Eclipse for most Intel/AMD based platforms and for major UNIXs.
You are also supposed to be able to compile and build it yourself on other platforms.
The differences stem primarily from three issues:
1) Availability of needed Java distribution on the platform (e.g., late introduction of newer Java versions on Mac).
2) 32bit vs. 64bit
3) Underlying UI toolkit
While Eclipse can run under Swing, it may look like crap and perform pretty badly.
People often expect more from the IDE, so the SWT can use some native widgets. Some plug-ins also need more direct access to the graphic subsystem. This, there are specific distributions of Eclipse that use specific platform graphic infrastructure. The most notable example is again Mac OS, where there was initially a version for Carbon, but only much later did a Cocoa version show up.
Most OS should support Eclipse. As long as it supports Java and SWT
If it is 100% java-based application, yes it will be platform independent. The problem is some code of Eclipse is not Java, so it's obvious that because of this code, Eclipse is not 100% platform independent. You can however just change that particular native jars with the suitable jars for your platform and Eclipse will then run correctly.
I have used these three open source tools for packaging my java apps, but they all look like abandon-ware now. All three are very good pieces of software. What are the options now? (or is using Java for desktop app development no longer a "hot" market for app developers to build & maintain these tools?).
1) exe wrapper:
jsmooth - no new development in 2.5 years - does not support 64 bit.
launch4j - no new development in over a year, supports 64 bit, but you can't sign the exe created by launch4j, so I prefer jsmooth, but it does not support 64 bit.
2) onejar:
It works, but there has been no new development or web site update in more than 2.5 years. So, just want to switch to something that's supported / have a backup plan if it suddenly breaks with a new build of Java.
Thanks
Edgar
Launch4j has just been updated ! http://launch4j.sourceforge.net/changelog.html
Did you check IzPack? This is a great piece of software to create cross-platform installers:
IzPack is an installers generator for the Java platform. It produces lightweight installers that can be run on any operating system where a Java virtual machine is available. Depending on the operating system, it can be launched by a double-click or a simple 'java -jar installer.jar' on a shell. The most common use is to distribute applications for the Java platform, but you can also use it for other kinds of projects. The main benefit of IzPack is that it provides a clean and unique way of distributing a project to users using different operating systems.
Some really famous companies and projects use it for many years (Sun Microsystems, JBoss/RedHat, the Scala language project, some ObjectWeb/OW2 projects, XWiki and many more). If it's good for them, it should be good for you :)
Since none of the answers were approved, and JavaFX 2.2 has not been mentioned above (was not available at the time of the answers) here goes:
JavaFX 2.2 (part of Java Runtime and SDK since 7u6) allows building native exe/dmg/rpm's that tag along the full RT component as well. I believe this is a valid answer to your need, as well as an officially supported solution from Oracle.
https://blogs.oracle.com/talkingjavadeployment/entry/native_packaging_for_javafx
Have you tried IzPack (http://izpack.org/)?
You can try
http://winrun4j.sourceforge.net/
Has an exe with 64bit support and is quite easy to configure with an ini file.
As I was fed up with recent security changes in Java Webstart, I created my own tool, JNDT. It's under GPL.
It goes farther than akauppi's suggestion because it allows to create GNU Linux packages even under Mac and Windows :) I use it to create Mac bundle under GNU Linux too. For the moment, it's just a single Ant library with a few dependencies that allows to create native self-contained application bundles for GNU Linux, Mac OS X and Windows. I use it for my first person shooter and I'm very happy with it. It bundles the JRE but it can use the system JRE if you want.
P.S: JNDT is able to create a native Windows installer as an executable with NSIS even under GNU Linux.
I understand that the GPL license discourages some developers to use my tool. In this case, rather use PackR.
Maven 2 provides the ability to create a jar which contains all the dependencies as part of its assembly plugin. This combined with the jar plugin configuration of the manifest file (and specifically setting Main-class to the Class with main) is all you need to do basic packaging.
To some extent Java web start is now considered the better way to distribute Java applications and Maven 2's assembly capability combined with web start gets you everything you need without going via the exe route.
If you just want an exe (instead of a full-blown installer) you can make one with NSIS:
http://nsis.sourceforge.net/Java_Launcher_with_automatic_JRE_installation
Yes, NSIS is an installer but you can have it just run a jar in the same directory by stripping out all of the installer stuff. Basically it works like launch4j but is a lot more configurable.
If you are using gradle, there is a plugin that uses launch4j (under the hood) and works great. It doesn't even require you to download or install launch4j, it is totally automated.
https://github.com/TheBoegl/gradle-launch4j