I'm not able to run a majority of programs from my work computer due to JRE <= 1.6 does not support switch statements for Strings. As I'm not able to install or update due to admin restrictions, would it be possible to create a portable Eclipse on a USB that incorporates the JRE (1.7) as well?
The Eclipse part is easy. Just unzip Eclipse on your USB.
You'll have to install Java to your USB. Afterwards, go into Eclipse Window -> Preferences; Java -> Installed JREs and make sure your Java JRE or JDK is listed and the default.
Create your workspace on the USB, and you should be ready to go.
It's fairly easy to run Eclipse on a USB drive. You just need to make sure it knows to look for Java on your USB drive rather than on the host computer.
If you have Java Portable installed on your drive, you can tell Eclipse to use it by adding the following to your eclipse.ini file.
-vm
/PortableApps/CommonFiles/Java64/bin/javaw.exe
Note that Eclipse Portable stores the file as EclipsePortable\App\eclipse\eclipse.ini.
In my experience, since Eclipse upgraded from Indigo to Juno, the .zip they provide is already portable. It no longer creates any folders or files in the Windows user data folder.
Just put your eclipse and jdk7 on the flash and run from flash. Set JDK in eclipse: Window->Preference->Java->Installed JRE...
Related
I am currently working on java application project. My application need to run on Java Runtime Environment (JRE). I have wrap my jar file into .exe file,
When the user clicked our .exe file, if the user dont have JRE installed in their device(Windows OS computer), they will be direct to java download here. This link will download and install the jre to user computer.
to ease user, my superior instruct me to automatically open our java application after the jre have finish installed into user computer. is it possible, if yes what is the common practice of how to do it.
After a while of research, i conclude it is not possible to do that in this current time but instead the best alternative is to let the installer to check for JRE environment before installing our application. User will have to download and install first JRE and only after that they will be allowed to finish the installation. i use advance installer for installation package.
I've made a little GUI program to enter contents then send "javamail" to my email. I have to import many jar libraries from javamail-1.4.5 and then I build it (shift + f11) to jar, then use exe4j to make it exe (also add all the jars from the libraries in the /dist/lib) and version of jre from 1.5 to 1.7 (I'm using 1.7 to make this app). It works smoothly on my computer but when I give the exe to others computer. It said:
"No JVM could be found on your system. Please define EXE4J_JAVA_HOME to point to an installed 32-bit JDK or JRE or download a JRE from www.java.com"
I think they must install the JDK in order to be able to run the app. But it may be confusing to many of my friends who don't know about computing. Is there anyway can they use that send-javamail-app without asking them to install the JDK?
Thanks in advance and sorry for my English!
It's quite simple.
After you have done basic steps as set the name, icon, etc, in step number 6 JRE is where the magic happens:
Click Advanced Options and select Search sequence
Click to add new item + and select directory
Select your jre directory, it must be a relative path
Put your new item at the first position in list
After that what you have to do is release your exe with the jre directory together, to do that usually I use Inno Setup Compiler to create a installer.
You can bundle the JRE with your product, this is the best way you can achieve without bothering your buddies. The size of your application will increase.
JRE is required to run any java application.
Hope this helps.
Java Runtime Environment (JRE) is required to run the Java application. In order to install JRE on a computer without Java installed, you must either bundle it (put it inside your application), or ask your friends to download JRE.
I don't know exactly how to bundle JRE, but the question Bundling the JRE with a Java application can probably help.
Maybe my personal project Java Customization Builder can help you, it analyzes the classes used by your program, and slim these classes from jars, and it also analyzes jvm files used by your program. Then it make an executable file and pack200 the jre runtime and your program.
JCB Project Introduction:
Java Customization Builder is a tool which customizes your java application and JRE.
It is a java application building tool enabling you to generate a very small java archive package which has a slimmed jre. For the swing application, the archive is less than 5M, for the SWT application, the archive is less than 3M usually. And the customed java applicaton can run on the Windows which doesn't install a JRE, and be loaded by an executable.
JCB project page: http://jcb.sourceforge.net
I'm using the android_sdk.zip version, since I don't feel comfortable using installers on Windows systems. However, I understand that I need to set the Home variable in order for the SDKManager.exe to run properly. I tried another method posted on stackoverflow, but if I do that, then both Eclipse and Netbeans, won't find Java anymore.
"C:\Program Files\Java\jdk1.6.0_25\bin';'"
Any ideas?
Thanks!
I believe there may be a bug in the installer for Windows, as I haven't seen it work properly at detecting a JDK on Windows 7 at all.
If you are planning on developing in Eclipse, it isn't even required. You'll save yourself a lot of time and headache if you just download and install the SDK zip file (instead of the installer EXE).
Download and unpack this file somewhere on your machine
Install the ADT plugin into Eclipse
Point ADT to the location you unzipped the SDK in Preferences
HTH
How can i make up am installer for my java application (jar file) . The same as that of windows installer which proceeds by clicking next and installs the application. What i want with my java app is, the open source library xuggler to get installed if it is not already present in the system.Then i want JRE to get installed if it is not already present in the system.
If the user does not have xuggler or JRE installed , installer should automatically install the xuggler and JRE. Or it should tell the user to get that version of libraries from the given URL and then continue.
Your question is similar to this one:
how to package a java application
Advanced Installer has a separate edition especially for creating installers for Java apps, so this might be what you are looking for. I would recommend other tools but since they're scriptable, they're a hassle to work with, lots of things can go wrong.
Hope this helps
If your app. has a GUI, use deployJava.js for the JRE and then Java Web Start to install/launch the app.
An installer-desc can be specified in the JNLP file to install Xuggle. JWS can partition the download between OS.
JWS is supplied by the makers of J2SE JREs for desktop PCs (e.g. running Mac OSX, *nix or Windows).
NullSoft have a very good scriptable, opensource installer called NSIS.
http://nsis.sourceforge.net/Main_Page
I'm not aware of a cross platform way to do this. In the Windows world, you can use Wix to generate an MSI file, and in that file you can specify dependencies such as the JRE. In the Linux world you can generate a file with the dependencies read by the package manager, a deb file for Debian based releases for example. It's a bit of a faff to set things like this up separately, but once it's done you can just integrate it into your ant script and build everything automatically.
This is similar to How can I create a .msi file for a Java program ? (eclipse) but is specifically about bundling a JRE as well.
I am currently working on building an MSI for my product so it can be installed as an add-on with Windows Home Server. The installer must be a silent MSI installer.
My product depends on Java 1.6. I want to bundle Java inside the MSI but not necessarily install the JRE, simply copying the files to my product directory and executing from there would be fine.
Initially I tried installing the JRE anyway as a first step. I used the JRE's silent installer, however it turned out that because the JRE installs itself via another MSI, under the covers, the one-MSI-installation-running-at-once rule was broken, and so a JRE could not be installed.
So I changed to copying the JRE files instead. I have managed to create an MSI with all the items, but it comes in at a whopping 60MB! That's around 33MB for my app and the rest is the JRE. My normal setup.exe which bundles the JRE is about 30MB, so I am assuming compression is much better in the latter case (I also use Pack200 compression there).
I am using WiX to build the MSI and have compression turned on.
What is the best way to bundle a JRE, with dependent application, inside an MSI?
IMHO you should simply add whole (unpacked) JRE directory to your installer files. Then run your JRE from the given, known path. Many products (for example DB2, Oracle 11g and even WebSphere Application Server) are doing it exactly like this.