I'm installing JRE using this command line in my NSIS script:
jre-7u45-windows-x64.exe /passive REBOOT=Suppress JAVAUPDATE=0 WEBSTARTICON=0 /L
this is no silent installation, as I want the user to see the install progress etc.
it works fine, but there is a huge annoyance.
When the JRE installer finishes it launches the web browser with this web page:
http://java.com/en/download/installed.jsp
Is there any way to prevent the JRE browser launch?
See this for Offline installation options: http://www.oracle.com/technetwork/java/javase/install-windows-141940.html
Then adjust command line for executing jre/jdk installer from NSIS script.
Good luck. Report back your progress, if you may. Thanks.
As I understand, you already have a JRE installer and you want to change its behaviour from the one you're developing. This is not possible since you don't have control over the installation script that created the JRE installer. The only workaround is to roll your own JRE installer - but you'd have to know exactly what else it does besides copying files.
One very strange possibility is to use /s option and provide your own visual feedback: either static, or dynamic by looking for expected files that are created in expected locations.
Related
On a Windows server, I am looking for a robust way to download latest Java SE Runtimes from command-line .
My requirement is to check if java is installed on the system.
If java is not found, our MSI installer (created with WIX) need to connect oracle java download page and silently download java installer in the background and invoke the installer silently.
Download option can be in VB script/PowerShell/batch/Java
Installing java silently is easy with jre-8u121-windows-x64.exe /soption.
I could find couple of solutions to download jre on *nix with curl/wget
from this post
However, couldn't find any robust solution on Windows.
Please let me know is there a fool proof way to download JRE installer on Windows from command line.
I'd go with chocolatey, its simple, easy and handles all the pain for you (like keeping up with the new versions or when the link changes, etc)
cmd.exe /c "MD C:\Install-temp&bitsadmin /transfer Download /download /priority high https://javadl.oracle.com/webapps/download/AutoDL?BundleId=236886_42970487e3af4f5aa5bca3f542482c60 c:\Install-temp\Java.exe&start /wait c:\Install-temp\Java.exe /s & RD c:\Install-temp /S /Q"
Here is my setup:
System76 Gallago Pro
Fedora 30
OpenJDK 1.8.0_201 (I did try Oracle as well)
I installed per IBM's instructions, using the installer script from the command line. I went through the installer menu and got to the success screen. I have done this a half dozen times on other machines and with OS upgrades on this same machine.
When I use the super key to find the program it is there; I click on the icon and my box returns to the desktop - but i Access doesn't start.
If I start via the command line using the start script, I get MSGGEN045 - A graphical user interface is not available.
If I run the java program directly
java -Xmx1024m -jar /opt/ibm/iAccessClientSolutions/acsbundle.jar I get the same message as when using the start script.
How can I get past this error? Or,what else can I do to track down what is happening?
I've had two issues when running iACS on Fedora. The first was the OS had a headless JVM installed by default. The second was something to do with sound.
Based on "MSGGEN045 - A graphical user interface is not available", I'd suspect a headless JVM.
HTH
Edit:
I checked for the headless JVM at the direction of IBM support. I don't remember the exact wording, but the name of the installed package was a dead giveaway. A simple "rpm -qa" was all it took.
I don't have anything Fedora specific but it seems that you either didn't install a Java Runtime Environment or just a headless version of it (jre-headless). Install a full JRE and everything should be fine.
You could check this with yum:
yum list installed | grep jre
Fedora is running wayland and not X11. Java doesn't play nice with wayland as of yet. As far as I know there are no plans yet to fix that. This is a good place to start https://www.ibm.com/developerworks/community/forums/html/topic?id=1b366edf-0e70-40d5-8d92-30d401edd97a
I am trying to install the latest Java JRE for Windows 8.1:
http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
And none of the installers work. Online/Offline/x86/x64
I double-click the installer, get the UAC popup, approve, and then it thinks for a second and then just does nothing. How can I troubleshoot this more?
Things I've Tried:
Disabling UAC
Disabling all anti-virus
Disabling Windows Firewall / Defender
Downloading older version of Java (still does nothing when run)
Running as Administrator
Launching from admin-command-line
Changing compatibility mode (all of vista -> windows 7)
Running in Safe Mode (same behavior)
Uninstalling all older Java installations (big mistake)
Monitoring Process List - the java installer pops up for a second and
disappears
Installing through the JDK - JDK installer also does nothing when launched
Event Viewer shows no errors
I can't find any logs or errors that might help narrow down what the issue could be.
Any help would be very much appreciated. If there are any additional tools I could check out to help with troubleshooting, or any logs people know of, I could use any help I could get.
Thank you!!
After hours of fiddling around, I think I finally have something working. It seems that there's some weirdness for any system that has ever upgraded their version of Windows (I went from 8 to 8.1) with some sort of MSI ID sort of thing. So, here's how I finally ended up:
HOW I FIXED:
1) The issue started after the Java 8 "51" installer. So the 51 still works, get it here:
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html
You want: jdk-8u51-windows-x64.exe (or i586)
Install older version
2) download latest Java .zip archive (like jre-8u91-windows-i586.tar.gz ) and unzip it in any location, preferably "c:\Program Files\Java"
3) Go to "C:\Program Files\Java" and rename jre1.8.0_51 to something else ("jre1.8.0_51_bak" maybe)
4) Copy the contents of the extracted .tar.gz contents into a new folder named "c:\program files\java\jre1.8.0_51" (or rename the directory)
So basically using the install directory for 51, but adding the latest Java files into the folder that the installation is pointing at.
Quick fix, for now, just to help anybody in a pinch. I'll update as I continue to sort it out and if there's any new information.
Good luck!
I have a Java program, let's say it's called MyApp.jar
To run it on Linux, I just write a shell script called myapp.sh, which simply runs java -jar MyApp.jar and double click on it. Everything works well.
On Windows 7, I cannot assume that the java command will be in everyone's path (if that's what you call it on Windows), so I have to have a workaround and do something like create a batch script with this in it: "C:\Program Files (x86)\Java\jre6\bin\java.exe" -jar MyApp.jar, which is obviously a Bad Solution... and it doesn't work on XP or Vista. It works on most Windows 7 machines though.
My application ships as a .zip file, the user extracts it to a folder MyApp, and then ideally will double click on something to invoke the program. So far it has a .sh script for Linux users to double click on, and a batch script for Windows 7 users (it works in most cases). It creates and consumes files in its own directory (MyApp).
What is the best way to invoke this program in a cross platform way?
Thanks!
As mentioned by biziclop, Java Web Start is commonly used to install/launch/update Java desktop apps.
As far as the JRE goes, it is usually sufficient to use the deployJava.js linked from that page above to ensure minimum necessary JRE is installed, and the elements in the JNLP file to specify any JRE micro-versions that are supported for the app.
Application launch
JWS can install desktop shortcuts and menu items when supported by the OS. Those can be specified in the launch file, or added/removed at run-time using services of the JNLP API.
If you can't deliver Java with your application, it might be a good solution to use JAVA_HOME to start it. It is set on, well... not all but many systems.
Definitly you should not use C:\Program Files (x86)... it is much better to use the environment variable %ProgramFiles%
Java application require a java runtime environment with a certain version to be installed on the target system.
The most convenient way, to my opinion, is to ship all libraries and documentation in a single archive and add start scripts for windows and *nix systems.
You could ship a JRE with your application too but then you'd have to support builds for different platforms...
I seem to have a 32bit vs. 64bit problem here. It should be simple to solve, but I'm hoping you can help me by pointing out the problem. I really want to avoid re-installing OSs, Eclipse, several plugins, JDKs and JREs over and over again to find a working solution. Many thanks in advance!
I build on a 64bit Thinkpad, in 64bit Windows 7.
I have built an Eclipse RCP application in Indigo (3.7.1.), 32-bit version.
The only "Javas" I have on this machine is a 1.6.29 32bit JRE, and a 1.6.29 32bit JDK. I've installed these (perhaps in false assumption) to be able to build for 32bit systems, and not screw things up by building on a 64bit machine.
Seems I was wrong: when I export the application (as Eclipse product) I get the dreaded Java exit code=13:
I am sure this is somehow to do with the combination of 32bit software on a 64bit system (if you can prove me wrong, even better!).
Does one of you know how I can set this up properly and still be able to build for win32?
Again, many thanks!
UPDATE
I have installed 64-bit Eclipse 3.7.1, and JRE 1.6_30 + JDK 1.6_30, both 64-bit versions. However, the error remains! I think this might either be a bug, or I'm doing something else wrong.
First of all, here is the error message:
For this build, I didn't use the Delta Pack but instead added the RCP SDK Software Site to the target definition, choosing the option "include all environments" (or similar).
Also in the target definition, I set the target environment to win32 (OS and WS) and x86_64 (arch). Furthermore, I set the Environment to use the default JRE.
In the product configuration, I set the Execution Environment to JavaSE 1.6, and set the JRE to be packaged.
Also, here's my eclipse.ini:
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
Any ideas?
I would recommend you to install everything as 64bit or 32bit system. That's a common problem with eclipse and I haven't found a better solution.
The Eclipse website tells me that
"Exit code 13 is returned from Main when it wants the launcher to display an error message. Generally, the error message will just be "an error has occurred, check your log file". Look for a log file in your configuration directory."
Some of these errors have been caused by not having the correct java version installed (Cannot run Eclipse; JVM terminated. Exit code=13), while others seem to have been caused by a "#" character in their eclipse directory (http://www.eclipsezone.com/eclipse/forums/t105198.html).
Maybe one of these reasons causes the crash.
Seems this had nothing to do with 32-bit vs. 64-bit and everything with my lack of experience. The product configuration simply wasn't set up correctly. I've bypassed this by creating a new one which uses the automatically created plugin run config from when you start the application via the "Launch an Eclipse application" link in Eclipse itself.
For those who come across a similar problem, here is how it can be done.
Launch the application via "Launch an Eclipse application"
Go to Run > Run Configurations... and memorize the name of the run configuration
Create a new Product Configuration, and choose "Use a launch configuration:" in the wizard. From the dropdown list, choose the run configuration you have memorized in step 2.
Give the new product configuration an ID, Version and Name, and add further info (e.g., in the Product Definition section) as needed.
Synchronize and Launch from within Eclipse to see if everything works fine.
Export and be happy.
Install all in 64bit.
Then to run (emulate) your Eclipse in 32bit
Just: insert an argument in:
Run Configurations... -> Arguments (tab) -> Program arguments : Type -d32
Old question but it seems worth answering. I just had this problem with an RCP based on features. It turned out that I was exporting the RCP with the feature projects closed. When I opened them and exported the product again, everything worked fine.
try moving the project to the root of the drive
c:\test\eclipse\
solved:D
1. check the operating system is it 32 bit or 64 bit.. but i think its not problem on my computer because i am using 32 bit jdk and 32 bit eclipse on my windows 7 64 bit.
2. if u still have problem ... try to move eclipse to C:/ its work for my friends.. with problem returned error 13