Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
How can I manually check if jdk is installed on my machine, and if yes, what version?
If I had jdk in Windows 7, and now I installed Windows 8 separately on the same machine, do I need to reinstall the jdk? Or can I reuse it?
When you install java on windows it can go by default in one of the following locations:
C:\Program Files (x86)\Java
C:\Program Files\Java
If you look in both of these locations, you will see exactly which JDKs and JREs are installed.
If you installed it somewhere else and don't remember, you can still search for java.exe
If by "Can i use it", you mean for use with an IDE like Eclipse or Netbeans, the answer is yes. They can use the JDK files no matter where they are, and whether it has been installed on the OS or not.
java -version will only tell you about a java version that would be on the path, which is not always the case.
If you have two Windows Version and the java installed in a place where both can share it, you can reuse it.
In cmd window type
java
If you see java usage information then you have java installed.
java -version
which display current version of your java.
You may reuse it windows 7 java in windows 8.
Related
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
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 have installed Netbeans 8 with JDK version 1.8. I recently downloaded iReports 5.6.0 for the creating reports. After installation the program doesn't open. There is an error saying
Cannot find Java.exe
Neither (null)\jre\bin\java.exe nor (null)bin\java.exe exists.
How can I solve this?? I have created my project using Netbeans8 and if I downgrade my netbeans to version 7 or something won't my GUI interfaces get messed up?
You'll have to modify the ireport.conf file to specify the JDK you want iReport to use.
Going through the install Windows 7 x64 will specify the default path to the x86 program files. I.E. "Program Files (x86)" Change this to "Program Files" then make the changes in the config file.
You'll find the ireportpro.conf file under [ireport_install_directory]\etc\ireportpro.conf. If you installed iReport with the installer, there's an ireport folder in the folder where you installed JasperReports Server.
There are two lines in that file that I would change:
Uncomment out the jdk home setting, and point it explicity to where you've installed th 64-bit JDK 1.7. Change it from:
jdkhome="/path/to/jdk"
To something like what you see below:
jdkhome="C:\Program Files\Java\jdk1.7.0"
I would also change the "default_options" line from:
default_options="-J-Xms24m -J-Xmx512m -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=256m"
to something that gives the JVM running iReport more memory and a lower MaxPermSize value. An
default_options="-J-Xms1024m -J-Xmx1024m -J-Dorg.netbeans.ProxyClassLoader.level=1000 -J-XX:MaxPermSize=128m"
Enjoy!
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.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
i'm using Netbeans on Ubuntu, when i write top command i notice that Java causes like 100%+ cpu usage. Is there anything to do to speed up Netbeans ? can i download another JRE on ubuntu to speed it up (i'm using OpenJDK).
Thanks .
Another item that helps me, apart from replacing OpenJDK with SunJDK is the "Scanning Sources" which can be disabled if you goto Tools -> Options -> Misc -> Files and uncheck the Enable "auto-scanning" of sources.
I am not 100% sure what that option does, but it speeds up my projects. Also I would try NetBeans 7, they have made massive leaps and bounds in the newer versions from the older (not knowing what version you are using).
Yes, it's well known that Netbeans runs slower with OpenJDK.
Your question has been answered on AskUbuntu before:
https://askubuntu.com/questions/5567/how-to-install-the-sun-java-jdk
Enable the partner repository and then install Sun Java with:
sudo apt-get install sun-java6-jdk
I would:
Replace OpenJDK with Sun's JDK. OpenJDK's performance is still not upto par.
I would read this (a bit dated, but most of works with some changes).
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
In Ubuntu 9.10 is there any way to confirm/ check if swing is installed and thus check its version!
Swing will be included in the JVM, if it's new enough.
See this page.
If you are looking for a JRE to run a desktop application, you can check for the 'java' executable in $PATH, look for $JRE_HOME or $JAVA_HOME environment variables. Once a JRE is found use java -version to get its version.
If you are trying to deploy an applet, use the Java Deployment Toolkit.
Swing is included in the default Java JRE. So just:
sudo apt-get install openjdk-6-jre
If you need the JDK (to develop on), it's:
sudo apt-get install openjdk-6-jdk
As far as the version, it should be compatible with Java 6. You can check the exact package version with:
apt-cache show openjdk-6-jre
Here's the Java installation page for Ubuntu that covers everything from SDK to web browsers.
Open a terminal
Type: java -version
If it says something meaningful, you're fine; you have swing on that machine.