Hi I have created a swing application using java 1.5 and i created a distributable jar of that file. I can run the jar in windows OS and linux OS but when i run in Mac it gives me error. I checked I am using java 1.5 version.
I think the program asks for java 1.6 version.
How to resolve the problem.
Thanks
Sunil Kumar sahoo
Some of the swing components eg= JOptionPane is in java1.5 in linux and Windows but its in java 1.6 in Mac. So u have to install java 1.6. Java launches different features in different platform as a new release. So install java 1.6. It will solve ur problem.
Related
Currently I had uninstalled Java6 from my mac. I tried installing Java 10 it did not install properly. One of my colleague bioinformatician uninstalled via terminal. The reinstallation of JAVA 10 or 8 or 6 is failing repeatedly. We tried via homebrewer as well. The java appears in system preferences but can not use it because not found in terminal when typed java -version. Neither Java folder is found in application support after installing. Did anyone faced this problem?
Currently using macOS High Sierra version 10.13.6
Do the big Linux distributions support java when freshly installed?
If i have a Java Swing application, will it work in a freshly installed Linux with no internet connection?
I understand that there are no guarantees, but how likely is it for a Linux machine NOT to have any java/Swing support?
if you can check the o/p of command java -version in a terminal, it'll show if you have java installed or not.
So if Java or JRE is installed you can surely use your Swing application.
But if you are planning to develop a swing app you need to have JDK installed in your system.
you can if the command javac -version is working then you have JDK installed in your system.
But I suspect if any Linux distribution comes pre-installed with a JDK. For once you can find installed JRE by default but it is difficult to get pre-installed JDK in any Linux OS.
my java isn't working anymore, since upgrading to MacOS X El Capitan.
If i type "java -version" in the Terminal i will receive a popup telling me, that i have to install java from the Website.
After downloading and installing the jre8_60 the problem still persists.
Anyone have a clue to solve this problem?
So according to: https://oliverdowling.com.au/2015/10/09/oracles-jre-8-on-mac-os-x-el-capitan/
the .dmg for mac is not working.
But with the guide on this site it is possible to install the JRE8_60 with the .tar.gz version of the java download.
It's best to install the JDK (Java Development Kit) rather than the JRE (Java Runtime Environment) when programming in Java.
The difference?
JRE: Java Runtime Environment. It is basically the Java Virtual Machine where your Java programs run on. It also includes browser plugins for Applet execution.
JDK: Java Development Kit. It's the full featured Software Development Kit for Java, including JRE, and the compilers and tools (like JavaDoc, and Java Debugger) to create and compile programs.
I'm trying to install eclipse on maverick. I've installed Oracle java 1.7 and can launch eclipse using the link I found in the untared eclipse directory. However, when I pin the icon to the mac dock, trying to open eclipse using that icon results in 'Software Update' telling me 'To open "Eclipse," you need a java SE 6 runtime. Would you like to install one now?'
I guess that this method of launching is somehow not using the eclipse.ini file in which I have used the -vm option to specify that eclipse be launched using the oracle 1.7 version of java on my system.
Anyone know how I can fix this? I wondered if I can edit a config file for the doc entry similar to the way I can add items to ubuntu's launcher perhaps?
I was able to fix this by running Apple's Mavericks Java fix. Even though the fix claims to install Java 6 it ended up just reconfiguring my already installed Java 7 and Eclipse is now able to run normally from the dock and command line. My default JVM is still java 7.
http://support.apple.com/kb/DL1572?viewlocale=en_US
Do you have the latest version of 1.7?
Oracle's Java version 7u25 and below have been disabled by Apple on OS X.
https://www.java.com/en/download/faq/java_mac.xml
Ah,your question solves me . After I update my MAC OS X to mavericks,I can not open my eclipse .I use "open Eclipse.app" or click eclipse on dock .It doesn't work .says"your need java se 6 runtime"
Then I follow your advice ,run "Eclipse.app/Contents/MacOS/eclipse",greet! I open it.
It seems this is the only way to run eclipse on mavericks~
I have a sneaky suspicion that I have a fix for this, but as my system has 1.6 in already I can't test it at the moment.
In the eclipse.ini file you will find the following vm arg; -Dosgi.requiredJavaVersion=1.6 I have a suspicion that if you changed this line to
-Dosgi.requiredJavaVersion=1.7
you might find that you could launch eclipse without the need for java 6. OSGi is the technology that Eclipse uses to manage and run its plugins.
The location of eclipse.ini is dependent on the system but on a Mac you can find it in /Eclipse.app/Contents/MacOS/eclipse.in.
I don't HAVE to be able to edit it on Windows, but I do have to be able to run the program made using the mac version of Eclipse on Windows. Is this possible?
Java runs on any system with a JVM, so yes.