How to run java 6 and java 7 simultaneously [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
I have java 6 installed in one of my servers running application x. Now I was giving application y that is supposed to run in the same server. However, they "forgot" to tell me that application y needs java 7, not 6.
After reading a bit on the internet, I realized that it's possible to run multiple versions of java in the same windows box, but I cannot make sense of what to do with the environment variable and how it know when to use java 6 or 7. Does anyone either know what I need to do or of a website where I could find good information?
Thank you!

Do not rely on JAVA_HOME environment variables, most applications can be run using an absolute path. You don't even need to run Java setup.exe on server machine. This quarantees you don't accidentally get Java browser Plugin and version controlling is easier.
Run Java6 and Java7 setup.exe in one machine say your personal laptop
Go to c:\program files\Java\Java_xxx folder and zip it
Unzip to a server, say c:\java\Java_xxx folder, you should see Java_xxx\bin\java.exe file
Uninstall Java6 and Java7 from laptop if you don't need it
Server machine may not need JAVA_HOME envvar to mess versions up
Use JavaJRE or JavaSDK both are fine or side by side everything
Run java application using an absolute path, you may create a shortcut or .bat script to run application.
c:\java\Java_xxx\bin\java.exe -cp ./lib/myapp.jar;./classes com.package.MyAppMain param1 param2

Related

Java not running on Windows server 2019 [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm on this for a really long time. I need to have JRE 6 running on a new nonactivated Windows server 2019 essentials to be able to use a very old remote controller for some servers (old IBM & DELL racks).
No matter what version of java I install, it's just not running. I don't see it in the bottom right corner or in the running services. I know it seems very basic but I couldn't find a solution online.
Am I missing something? All I could find online is suggestions to add java to the environment variables but that is for a different issue. I tried it desperately but of course it didn't solve the problem.
Java, or more precisely the Java Virtual Machine (JVM), is not something that runs in the background. JVM is used to start specific applications. How the java.exe or similar executable will be resolved and invoked will depend on the specific application.
What you usually see in the Windows task tray area is a the Java update checker (Jucheck.exe). Whether or not this service is present will depend on selected installation options. It also might be that a very old Java 6 simply does not ship it.

How to install java through windows command prompt? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 4 years ago.
Improve this question
I was working for a testing team, where we will be testing the application End-to-End. Every time before I test I have to install the java of different version and need to uninstall the same. We tried to do this using AutoIt but we failed to Automate the installation and un-installation part of java. I hear that we can install the java through command prompt, but not sure how to do it.
I use Window greater version with different flavors of java.
Can any one help how to Install & Un-install java through command prompt, which can reduce some of the manual efforts...!
Thanks in advance.
In order to install java silently you can simply make a batch file(.bat) with the following command
javaSetup.exe /s ADDLOCAL="ToolsFeature,SourceFeature,PublicjreFeature" INSTALLDIR=C:\Java\x86\ javaVersion /INSTALLDIRPUBJRE=C:\Java\x86\ jreVersion
A proper example for above skeleton will be
Here JDK 1.8.60 (x86) with source code is going to C:\Java\x86\jdk1.8.0_60 and JRE to C:\Java\x86\jre1.8.0_60:
jdk-8u60-windows-i586.exe /s ADDLOCAL="ToolsFeature,SourceFeature,PublicjreFeature" INSTALLDIR=C:\Java\x86\jdk1.8.0_60 /INSTALLDIRPUBJRE=C:\Java\x86\jre1.8.0_60
Just make sure you keep the batch file in the same directory as your setup file

java install already in progress clean software [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 5 years ago.
Improve this question
My computer turn off when i install jdk 9, and now any java program cant be install.
Error message :
another java installation is in progress you must complete that installation before you can run this installer
I tried alredy :
Can't install JDK 9 because "Another Java installation is in progress"
https://www.itsmdaily.com/another-installation-already-in-progress-error/
http://windowsreport.com/another-installation-already-progress-error-windows-10/
https://www.java.com/en/download/help/error_1500.xml
By the way i Don't try the option to disable WindowsIntaller service, because this option in the service properties lock on "manual" and i cant change it...
Thanks for any help
UPDATE: As researched by the original poster, this issue turned out to be a know problem that is not related to Windows Installer. The solution is described here: https://bugs.openjdk.java.net/browse/JDK-8184984 (essentially involving cleanup of some lock files).
Original answer here:
Before trying anything else, please try this option and let us know if it solved the problem (I haven't had any concrete problems to test it with for a while - these tools tend to get deprecated):
Microsoft Fixit: unregister programs that can't be installed or uninstalled
Several such cleanup tools have come and gone - all deprecated and unsupported as of now (MsiZap.exe for example).
I am not sure if your installer is Windows Installer based - since you have added that tag to your question I just assume so.
Please don't ever listen to advice telling you to disable the Windows Installer service. Those "hacks" can wreck your system. In fact if you have done any changes and the service won't start and you are unable to change things back, then your best options might be the "Last Known Good Configuration" feature (activated by pressing F8 during system boot on Windows systems before Windows 10), or "System Restore" (the latter may also fix your stuck Java package, but I don't like this feature - I have seen other, unrecoverable installation / uninstallation problems occur when it is used - try as a last resort - maybe if the above tool doesn't help).
Some links - just for reference and easy retrieval:
Uninstall without an MSI file.
Why does MSI require the original .msi file to proceed with an uninstall?
Uninstalling an MSI file from the command line without using msiexec

What is the appropriate solution for os? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Closed 8 years ago.
Improve this question
Java software is not working in ms xp OS service pack 2. What are the problem that would change my OS to allow working of java ?
From your question there is plenty of possible answers.
First: You have to download and install JDK (or at least JRE) in order to run jar files.
Download and entire installation process is described here.
EDIT 1:
Regarding to your questions in comments I am edited this answer.
Okay sir Bosko Mijin, thanks for your kind help.. how to check java is
working?? and should i change my OS to win 7? please give suggestions.
You should to check is JDK installed on your machine. Fastest way is that you run following commands (noted below) in command promt to check version and compiler.
Checking Java version: java -version
Checking Java compiler: javac -version
If there is installed JVM (attention: not Microsoft JVM) then you have to check environment variables and ensure that JAVA_HOME variable is set and it is in you PATH also.
You can do check this with following command: echo %JAVA_HOME%
If you have installed Microsoft JVM, I suggest to change OS (easier way, but clean) because Microsoft JVM supports Java up to v1.1 (it is very very old!). Harder way is that you get old versions of JVM and try to install them to your XP, but there is questionable are that packages 'young enough'.
FYI: Win7 have no such problems with JVM.
If you have Microsoft JVM, it would be great that you read this link. It will help you to decide what next.
Regarding to OS, I am not good person for this type questions because I like Unix/Linux systems (I am using them for long time ago) and I am afraid that my answer regarding this part will be very 'primary opinion based'.
Anyway, I wish you to solve this quickly. Best luck.

How to run Java when C drive is not the default in CMD prompt? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am facing following scenario:
Win XP Machine, 2003 SP, jre7
No admin rights to even set class path via my computer properties
CMD prompt shows a local drive as user drive instead of C
Thus unable to execute following command:-
c:\program files\Java\jre7\bin
It says C:\program files isn't recognized as an internal or external command.
Tried to change directry to C but not successful
What I want:
To be able to compile and run java files from CMD prompt
Setting up path from CMD
I hope it ia not too much to expect in such an unreasonably restricted development environment.
Ok, you can try this
set PATH="C:\Program Files\Java(YOUR JDK FOLDER) eg. jdk1.5.0_14\bin";%PATH%
so enter set PATH="C:\Program Files\Java\jdk1.5.0_14\bin";%PATH% but make sure it matches your JDK install folder.
If you need anymore help please let me know.

Categories

Resources