Cannot Change Java Version Using Java Preferences
When I attempt a change of the current Java version (say, switching from 1.5 to 6) using Java Preferences, the change is reflected in the preferences, but the update does actually occur and java -version continues to report Java 1.5 as the current version.
If I create another account, this work just fine and I can switch versions at will. Anyone have any idea what might be missing from my account?
Ok, I figured out what was going on: I had explicitly set my JAVA_HOME in ~/.bash_profile, pointing to the symlinked path for the current JSE. It turns out there a new CLI tool /usr/libexec/java_home that can be used to assign JAVA_HOME like this:
export JAVAHOME=`/usr/libexec/javahome`
Using this will ensure that JAVA_HOME is set to the correct value when the shell starts up (if you don't have JAVA_HOME set at all, you can switch the JSE versions in the Terminal 'on-the-fly' when changing the Java Preferences setting).
http://lists.apple.com/archives/java-dev/2009/Jun/msg00139.html
Message was edited by: stonehippo
Similar Messages
-
Finding java version used from compiled code
Is there a way to find the java version used to compile the java file from the compiled files,i.e., class files?
that information is encapsulated within the .class file, I don't think so.
The class file has a minor_version/major_version field.
However using jikes and sun jdk 1.3.1 both produce a version number of 45.3. According to a footnote in the JVM spec that corresponds to a class file format for java of 1.0.2. And both obviously are newer than that version of java.
Based on that I don't think one can expect those numbers to changed based on the java version but rather on any changes in the class file itself. -
Change file mode using java?
Hi
Can I change file mode using java method other than
Runtime.exec()
thx
JacinleHi
Thank you Roopasri. But what I want is not using Runtime.exec
I am using Unix and I want to change some image file access mode
so not a RandomAccess File.
So is there anything like chmod command on Unix?
something like maybe java.io.File.chmod("755");
I read that's a feature requested early on 1.2
Will it be included in 1.4?
Jacinle -
I cannot change the volume using the keyboard of my Macbook. I have to go into preference. How to come back to the keyboard controler.
1. Reset PRAM. http://support.apple.com/kb/PH4405
2. Reset SMC. http://support.apple.com/kb/HT3964
Choose the method for:
"Resetting SMC on portables with a battery you should not remove on your own". -
To get JRE or JDK version using Java Programs
How do get JRE or JDK version using Java Programs?.
Kindly Reply...
By
ManiIf you're talking about current program's runtime environment (as opposed to all installed JDK/JRE) : System properties
-
Changing Windows Registry using Java
hi...all,
Any1 knows how to change windows registry using java. wheather is it possible ?? or there is any other alternative for same....Write a Java class which will create a temporary REG file... use regedit /s from Runtime.exec() and pass that file as argument.
***Annie***
(Where the hell do these ideas come in my head!) -
Can i change system time using java
hi guys can i change system time using java iam doing one app in that i have to change the system time (my os is windowsXP) please tell me how to change the time
What does this have to do with Swing?
Well, there is no Java API that I'm aware of.
However you can execute any Windows command by using the Runtime class. So you should be able to invoke the Time command.
Search the Java Programming forum. There are plenty of examples on using the Runtime.exec(...) command. -
Java -version bash: java: command not found
Hi all.
I wanna install java on linux (OpenSUSE). When I checked java -version, it shown that :
java -version
bash: java: command not found
Can any solution about it, please!Sukirmanster wrote:
I wanna install java on linux (OpenSUSE). When I checked java -version, it shown that :
java -version
bash: java: command not foundNot surprising if you have not installed java yet.
Can any solution about it, please!If you have installed java, read a unix/linux manual,
pay particular attention to bash (or any shell) and the role of $PATH. -
Deploying no java applications using Java Web Start
Hi,
I am new to java web start. Is it possible to distribute non java applications using java web start. I have an APP which can run on a desktop in standalone mode. The app has jusy HTML and Java script files. Is it possible to package this app and deploying using java web start? I am assuming If it is possible, I can make updates to the packaged app in the web servers and the updates will be downloaded next time the app is used provided configurations are correct?
thxThe app has jusy HTML and Java script files. Is it possible
to package this app and deploying using java web start? Not really. Resources for JWS need to be zipped,
while this HTML/JS app. will (I guess) not work from
inside the depths of a Jar (or Zip) archive.
Note that you can organise for those files to be
downloaded and expanded onto a known place
on the user's disk, by using an 'installer' element,
but..
...I am assuming If it is possible, I can make updates to the
packaged app in the web servers and the updates ..installers are only called once, and do not 'update'. -
Get Native Java Window using Java Access Bridge 2.0.1 & Java 1.6 and above
I want to get the native java window (Like Java Monkey Application and Java Ferret Application) using java only, for that I tried different ways/options but unable to get the native java window and perform actions on that.
It would be really great if you could guide me for that. I am still unable to start the Java Access Bridge.
Please let me know the steps to get native java window using Java Access bridge and JDK 1.6.20.
Also Note that, As per your previous suggestion, I tried to search and call initializeAccessBridge() and shutdownAccessBridge(), But unable to succeed it. I did not find such method in Accessbridge.jar.
Please help me out.
Best RegardsYou might want to check out this thread:
Java Access Bridge and JRE 1.6
If you have Java 6, you'll need to manually install Java Access Bridge 2.0.1. The JAB 2.0.2 installer for Java 6 is also available as a beta:
http://jdk6.java.net/6uNea.html -
How to add new Java version to Java Preferences?
Greetings,
I know Java 7 is not officially supported, but I know it works.
I built 1.70.jre and put it in /Library/Java/JavaVirtualMachines, but I do not know how to add to Java Preferences.
Does anyone know where the list of Java versions is stored and how to add a version to it?
ThanksFixing the permissions did not fix it.
I think there to be a record somewhere of what version are where. That is probably set if you use am installer which I do not have. I only have the file I copied there.
I found out that typing this in Terminal...
export JAVA_HOME=/Library/Java/1.7.jre/Contents/Home
...temporarily sets that version to the one being used, but it is only for that Terminal session, and it still does not show in Java Preferences.
I need to know how to get it into Java Preferences. It might be some command I don't know. -
CHANGE SECURITY SETTING USING JAVA
Hi all,
Please Help!!!
I am using, JAVA / STRUTS for developing an web application.
In the Client/ Server Technology, I need to set the client Browser Security Level.
Can it be done through JavaScript or how it can be achieved.
Thanks & Regards
Glass_Fish.........I am using, JAVA / STRUTS for developing an web application.
In the Client/ Server Technology, I need to set the client Browser Security Level.Not possible.
Can it be done through JavaScript or how it can be achieved.By asking the end user to change their Security level if your application really needs them. For example there are ways to detect whether scripting language is enabled or not, whether cookies are enabled or not. If your application really needs that features, Ask user to enable the particular feature by displaying proper messages. -
Detecting Java Version using Javascript??
Hi,
This is a Javascript & Java question really. The problem i have is i want to detect what version of Java a user has.
So using Javascript i can find if java is enabled like so:
navigator.javaEnabled();
but i want to know what version as well.
I tried:
var version = java.lang.System.getProperty("java.version");
but had not luck. does anyone know if this is possible and if so how?
thanks,
Chris.Because Sun chooses to use a weird format for their version numbers, and since Internet Explorer uses ActiveX objects instead of normal plug-ins, you'd have to write a script that could skim through the Windows registry to dig up what the latest version of the Java Plug-in is.
Scanning through the registry isn't a problem, so much as the non-conventional versioning system that Sun has in place. With Netscape, Opera, and other non-ActiveX browsers, it's a piece of cake. -
Expand Collapse Feature in OBIEE 10.1.3.4 version using Java script Issue
Hi All,
Tried to implement this script in OBIEE 10.1.3.4, but throughs error. Can any one help me in this regards
Steps followed
1. Create an answers report pulling Top Relations, Sub Relationship and Customer from the dimension and sales amount from the Sales fact
2. For Sub Relationship and Customer give the left padding as 25.
3. Create a pivot table view make Top Relationship, Sub Relationship hidden and select show the total before and select labels only (no totals) in the pivot table.
4.Add the image files in and the following code for Top Relationship, Sub Relationship columns select the data format to as HTML image and change it to custom text and add the following.
@[html]<img onclick="ExpandCollapse(this)" src="res/s_oracle10/images/PropertyGroup_minus.gif">@H
5. Add a narrative view and add the following java script.
// Java Script
function ExpandCollapse( el )
// Grab the ROW that was clicked and the TABLE that contains it
var tr = el.parentElement.parentElement;
var tbl = tr.parentElement.parentElement;
// Set the alternating display values for hiding/showing the row
var sDisplay = ( el.src.indexOf( "minus" ) == -1 ) ? "" : "none";
var sDisplayReverse = ( el.src.indexOf( "minus" ) == -1 ) ? "none" : "";
//Switch the icon for the clicked row
el.src = "C:/Manohar/HTMLTest/PropertyGroup_" + ( el.src.indexOf( "minus" ) == -1 ? "minus" : "plus" ) + ".gif";
// Starting with the row below the clicked row, start checking each row
for ( var i = tr.rowIndex + 1; i < tbl.rows.length; i++ )
// Set the Current row indicator nad the left padding value
var trCurrent = tbl.rows( i );
var trCurrentLeft = trCurrent.cells(0).style.paddingLeft;
// if the current row contains an IMG in it, it's a clickable level and we either have to stop processing,
// or reset the icons to a + as it's being collapsed
if ( trCurrent.cells( 0 ).firstChild && trCurrent.cells( 0 ).getElementsByTagName( "IMG" ).length )
// If the current row is at the same level or above in the tree, then stop processing,
// else reset all the signs below it, essentially collapsing all branches underneath the one that is beig collapsed.
if ( stripTrailing(trCurrentLeft , UOM_SIZE) <= stripTrailing(tr.cells(0).style.paddingLeft , UOM_SIZE) )
{ break; }
else
if (el.src.indexOf( "minus" ) == -1 )
trCurrent.cells(0).getElementsByTagName("IMG").item(0).src = "C:/Manohar/HTMLTest/PropertyGroup_plus.gif";
// Now, we determine if the row should be hidden or shown.
if ( eval(stripTrailing(tr.cells(0).style.paddingLeft, UOM_SIZE)+ INDENT_SIZE) < stripTrailing(trCurrentLeft, UOM_SIZE) && el.src.indexOf( "minus" ) >0 )
trCurrent.style.display = sDisplayReverse;
} else
trCurrent.style.display = sDisplay;
Thanks,
Kumaravel
Edited by: 840515 on Feb 28, 2011 10:00 PMSince the SP is on connection pool (and looks like expecting a input value), that may causing for error.
Column in the report, pass PS variable and hide it if it not required in the report.
Pls mark if helps -
Taking screenshot with java applet using java robot class not working
Hi Everyone,
I am using the java applet to take screenshot of the web browser using the java's robot class.
Robot objRobot = new Robot ();
BufferedImage objBufferedImage = objRobot.createScreenCapture(objRectArea);
The thing work good in windows system taking screenshot but in case of mac osx i get the blank image.When i check the event viewer in mac osx i get the following error.
invalid context
invalid pixel format
CoreAnimation: rendering error 506
The problem is coming for all the browser safari,firefox and chrome.My applet is signed applet.
What might be the reason.An early reply is very valuable.
My machine configuration is as follows.
OS : MAC OSX
Version : 10.6.4
Is that a system level issue , java plugin issue?I'am confused with this error.
Thanks sagar.870613 wrote:
invalid context
invalid pixel formatHm, seems like the Mac implementation of the Robot class is doing some bad initializations there. I can't be a 100% sure of course, but this smells like a bug to me. Are you sure you have the latest version of Java installed?
Maybe you are looking for
-
How do I scroll down my mail box folders as they are not all in view
HHow do I scroll down my mailbox folders as they are all not in view
-
Changing black background on slide show
does anyone know how to change the background on the iWeb slide shows so that the black background is not visible and there is no "picture reflection"? I would prefer the slide show to have the whole picture with no background.
-
How do you install 10.7 onto a new hard drive
I have a 2008 Mackbook pro with a 200 gb hard drive which is full.( it filled up very quickly after installing 10.7. I have the 10.5 disks that came with it and the 10.6 disks that I got from Apple last year. Then I upgraded to 10.7 by downloading it
-
Considering Switching from Contribute Win to Contribute MAC
Can Contribute 6.5 be used to manage a website constructed with Contribute for Windows?
-
Appstore won't show app updates
After my iphone5 updateed to IOS 6.0.2, my iphone won't show any app updates anymore. If I go to the appstore app on my iphone, I tap updates, it tells me "All apps are up to date". But if I search the apps one by one, it shows "updates"... connectio