NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Overriding JAVA_HOME

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
Eric Kolotyluk
Posted via mailing list.





PostPosted: Sun Dec 07, 2008 9:19 pm    Post subject: Overriding JAVA_HOME Reply with quote

On Windows I have my JAVA_HOME environment variable set to Java 5, which is my normal development environment.

I’m using the recent NetBeans 6.5 for Java FX and everything in it seems to be configured to point at JDK 6U11, but every time I run my program it runs with Java 5.

Is there some setting somewhere in NetBeans or my project files where I can override the JAVA_HOME environment variable and use Java 6 to run my program?

I do not want to change my JAVA_HOME environment variable.

Cheers, Eric
Back to top
Wade Chandler
Posted via mailing list.





PostPosted: Sun Dec 07, 2008 11:13 pm    Post subject: Overriding JAVA_HOME Reply with quote

Yes, you can either run NB from the command line to change it the times you want JDK 1.6+:

NBINSTALLDIR\bin\netbeans --jdkhome C:\top\path\of\your\jdk

or you can find your NB installation and go into etc\netbeans.config and edit or add:
netbeans_jdkhome="C:\top\path\of\your\jdk"

and that will do it.

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org


From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 4:18:58 PM
Subject: [nbusers] Overriding JAVA_HOME


On Windows I have my JAVA_HOME environment variable set to Java 5, which is my normal development environment.

I
Back to top
Melongo Annabel
Posted via mailing list.





PostPosted: Sun Dec 07, 2008 11:25 pm    Post subject: Overriding JAVA_HOME Reply with quote

Here's how it goes:
- Whenever you run your application with the command line or outside of NB, the JAVA_HOME environment variable is used
- If you compile your application within NB and runs it from there, the NB java is used.

That's why, whenever you run your application, it runs with Java5. If you want to override for Java 1.6 then you can set your environment variable to point to it. Hope this helps.

From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 3:18:58 PM
Subject: [nbusers] Overriding JAVA_HOME


On Windows I have my JAVA_HOME environment variable set to Java 5, which is my normal development environment.

I
Back to top
Wade Chandler
Posted via mailing list.





PostPosted: Sun Dec 07, 2008 11:31 pm    Post subject: Overriding JAVA_HOME Reply with quote

Indeed, if you mean that you are running something from NB which calls a script looking for the actually environment variable in the OS then that is a totally other issue than the fix I gave you in my last reply. Now, if you just need the IDE to use JDK 1.6 for everything, then see my last reply as that will fix it.

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org


From: Melongo Annabel <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 6:25:01 PM
Subject: Re: [nbusers] Overriding JAVA_HOME

Here's how it goes:
- Whenever you run your application with the command line or outside of NB, the JAVA_HOME environment variable is used
- If you compile your application within NB and runs it from there, the NB java is used.

That's why, whenever you run your application, it runs with Java5. If you want to override for Java 1.6 then you can set your environment variable to point to it. Hope this helps.

From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 3:18:58 PM
Subject: [nbusers] Overriding JAVA_HOME


On Windows I have my JAVA_HOME environment variable set to Java 5, which is my normal development environment.

I
Back to top
Eric Kolotyluk
Posted via mailing list.





PostPosted: Sun Dec 07, 2008 11:31 pm    Post subject: Overriding JAVA_HOME Reply with quote

I am compiling and running my application within NB – so how do I tell NB to use Java 6?

Funny – this is totally easy to do in Eclipse.

Cheers, Eric


From: Melongo Annabel [mailto:address-removed]
Sent: Sunday, December 07, 2008 3:25 PM
To: address-removed
Subject: Re: [nbusers] Overriding JAVA_HOME


Here's how it goes:

- Whenever you run your application with the command line or outside of NB, the JAVA_HOME environment variable is used

- If you compile your application within NB and runs it from there, the NB java is used.



That's why, whenever you run your application, it runs with Java5. If you want to override for Java 1.6 then you can set your environment variable to point to it. Hope this helps.



From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 3:18:58 PM
Subject: [nbusers] Overriding JAVA_HOME
On Windows I have my JAVA_HOME environment variable set to Java 5, which is my normal development environment.

I
Back to top
Eric Kolotyluk
Posted via mailing list.





PostPosted: Sun Dec 07, 2008 11:36 pm    Post subject: Overriding JAVA_HOME Reply with quote

Looking in my netbeans.config I see the line

netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_11"

Yet my program still runs based on my JAVA_HOME environment variable which is set to Java 5.

Cheers, Eric

From: Wade Chandler [mailto:address-removed]
Sent: Sunday, December 07, 2008 3:13 PM
To: address-removed
Subject: Re: [nbusers] Overriding JAVA_HOME


Yes, you can either run NB from the command line to change it the times you want JDK 1.6+:

NBINSTALLDIR\bin\netbeans --jdkhome C:\top\path\of\your\jdk

or you can find your NB installation and go into etc\netbeans.config and edit or add:
netbeans_jdkhome="C:\top\path\of\your\jdk"

and that will do it.

Wade


==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org




From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 4:18:58 PM
Subject: [nbusers] Overriding JAVA_HOME
On Windows I have my JAVA_HOME environment variable set to Java 5, which is my normal development environment.

I
Back to top
Wade Chandler
Posted via mailing list.





PostPosted: Sun Dec 07, 2008 11:46 pm    Post subject: Overriding JAVA_HOME Reply with quote

What do you mean "your program still runs"... Is this an NB project you are running? Do you mean NB is running with JDK 1.5? Have you checked "Help|About" to see which JDK it is running NB? What exactly is the "program" you are running?

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org


From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 6:36:22 PM
Subject: RE: [nbusers] Overriding JAVA_HOME


Looking in my netbeans.config I see the line

netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_11"

Yet my program still runs based on my JAVA_HOME environment variable which is set to Java 5.

Cheers, Eric

From: Wade Chandler [mailto:address-removed]
Sent: Sunday, December 07, 2008 3:13 PM
To: address-removed
Subject: Re: [nbusers] Overriding JAVA_HOME


Yes, you can either run NB from the command line to change it the times you want JDK 1.6+:

NBINSTALLDIR\bin\netbeans --jdkhome C:\top\path\of\your\jdk

or you can find your NB installation and go into etc\netbeans.config and edit or add:
netbeans_jdkhome="C:\top\path\of\your\jdk"

and that will do it.

Wade


==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org




From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 4:18:58 PM
Subject: [nbusers] Overriding JAVA_HOME
On Windows I have my JAVA_HOME environment variable set to Java 5, which is my normal development environment.

I
Back to top
Wade Chandler
Posted via mailing list.





PostPosted: Sun Dec 07, 2008 11:53 pm    Post subject: Overriding JAVA_HOME Reply with quote

I'm asking because when I change my .conf file it definitely changes the one NB is using. Now, if what ever it is you are running requires JAVA_HOME then you'll have to run NB from the command line. Start a command line then:
set JAVA_HOME=c:\jdk\path
NBINSTALLDIR\bin\netbeans

and that will change the actual OS environment variable for the JAVA_HOME for that specific run. In other words each command line instance (every application really) has its own environment. Each child of that environment gets a copy of the parents.

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org


From: Wade Chandler <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 6:46:36 PM
Subject: Re: [nbusers] Overriding JAVA_HOME

What do you mean "your program still runs"... Is this an NB project you are running? Do you mean NB is running with JDK 1.5? Have you checked "Help|About" to see which JDK it is running NB? What exactly is the "program" you are running?

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org


From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 6:36:22 PM
Subject: RE: [nbusers] Overriding JAVA_HOME


Looking in my netbeans.config I see the line

netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_11"

Yet my program still runs based on my JAVA_HOME environment variable which is set to Java 5.

Cheers, Eric

From: Wade Chandler [mailto:address-removed]
Sent: Sunday, December 07, 2008 3:13 PM
To: address-removed
Subject: Re: [nbusers] Overriding JAVA_HOME


Yes, you can either run NB from the command line to change it the times you want JDK 1.6+:

NBINSTALLDIR\bin\netbeans --jdkhome C:\top\path\of\your\jdk

or you can find your NB installation and go into etc\netbeans.config and edit or add:
netbeans_jdkhome="C:\top\path\of\your\jdk"

and that will do it.

Wade


==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org




From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 4:18:58 PM
Subject: [nbusers] Overriding JAVA_HOME
On Windows I have my JAVA_HOME environment variable set to Java 5, which is my normal development environment.

I
Back to top
Melongo Annabel
Posted via mailing list.





PostPosted: Sun Dec 07, 2008 11:54 pm    Post subject: Overriding JAVA_HOME Reply with quote

I don't use NB that often but can you right click your project, you should get a link to "Properties", which should tell you the JDK that your project is running on. Your NB can be configured with 1.6 but your project settings can override that setting. So look under your project properties for the JDK it's running on. Hope this helps.


From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 5:36:22 PM
Subject: RE: [nbusers] Overriding JAVA_HOME


Looking in my netbeans.config I see the line

netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_11"

Yet my program still runs based on my JAVA_HOME environment variable which is set to Java 5.

Cheers, Eric

From: Wade Chandler [mailto:address-removed]
Sent: Sunday, December 07, 2008 3:13 PM
To: address-removed
Subject: Re: [nbusers] Overriding JAVA_HOME


Yes, you can either run NB from the command line to change it the times you want JDK 1.6+:

NBINSTALLDIR\bin\netbeans --jdkhome C:\top\path\of\your\jdk

or you can find your NB installation and go into etc\netbeans.config and edit or add:
netbeans_jdkhome="C:\top\path\of\your\jdk"

and that will do it.

Wade


==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org




From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 4:18:58 PM
Subject: [nbusers] Overriding JAVA_HOME
On Windows I have my JAVA_HOME environment variable set to Java 5, which is my normal development environment.

I
Back to top
Eric Kolotyluk
Posted via mailing list.





PostPosted: Mon Dec 08, 2008 12:03 am    Post subject: Overriding JAVA_HOME Reply with quote

The NetBeans About|Help says it’s running Java 6U11

Yes, I have a NetBeans project, and when I select run from the NetBeans menu, when the program runs it shows it’s running with a Java 5 runtime.

The program is a little Java FX Script application I am running. It is executed by the javafx.exe command, not the java.exe command. Maybe there is something stupid going on with the javafx.exe command?

Cheers, Eric


From: Wade Chandler [mailto:address-removed]
Sent: Sunday, December 07, 2008 3:47 PM
To: address-removed
Subject: Re: [nbusers] Overriding JAVA_HOME


What do you mean "your program still runs"... Is this an NB project you are running? Do you mean NB is running with JDK 1.5? Have you checked "Help|About" to see which JDK it is running NB? What exactly is the "program" you are running?

Wade


==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org




From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 6:36:22 PM
Subject: RE: [nbusers] Overriding JAVA_HOME
Looking in my netbeans.config I see the line

netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_11"

Yet my program still runs based on my JAVA_HOME environment variable which is set to Java 5.

Cheers, Eric

From: Wade Chandler [mailto:address-removed]
Sent: Sunday, December 07, 2008 3:13 PM
To: address-removed
Subject: Re: [nbusers] Overriding JAVA_HOME


Yes, you can either run NB from the command line to change it the times you want JDK 1.6+:

NBINSTALLDIR\bin\netbeans --jdkhome C:\top\path\of\your\jdk

or you can find your NB installation and go into etc\netbeans.config and edit or add:
netbeans_jdkhome="C:\top\path\of\your\jdk"

and that will do it.

Wade


==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org




From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 4:18:58 PM
Subject: [nbusers] Overriding JAVA_HOME
On Windows I have my JAVA_HOME environment variable set to Java 5, which is my normal development environment.

I
Back to top
Eric Kolotyluk
Posted via mailing list.





PostPosted: Mon Dec 08, 2008 12:28 am    Post subject: Overriding JAVA_HOME Reply with quote

OK, I solved my problem.

NetBeans is launching my program with the javafx.exe command. It is naturally using the JAVA_HOME environment variable. The fix is to pass the javafx.exe command –version:”1.6.0_11” which I can set in my project.properties file with

run.jvmargs=-version:"1.6.0_11"

Now my program runs as expected with the right jre.

I keep forgetting the NetBeans relies more on configuration files and less on settings in the IDE GUI. <humor>I just have to think like a Unix developer again.</humor>

Thanks everyone for the advice – it forced me to think about the problem differently.

Cheers, Eric


From: Eric Kolotyluk [mailto:address-removed]
Sent: Sunday, December 07, 2008 4:02 PM
To: address-removed
Subject: RE: [nbusers] Overriding JAVA_HOME


The NetBeans About|Help says it’s running Java 6U11

Yes, I have a NetBeans project, and when I select run from the NetBeans menu, when the program runs it shows it’s running with a Java 5 runtime.

The program is a little Java FX Script application I am running. It is executed by the javafx.exe command, not the java.exe command. Maybe there is something stupid going on with the javafx.exe command?

Cheers, Eric


From: Wade Chandler [mailto:address-removed]
Sent: Sunday, December 07, 2008 3:47 PM
To: address-removed
Subject: Re: [nbusers] Overriding JAVA_HOME


What do you mean "your program still runs"... Is this an NB project you are running? Do you mean NB is running with JDK 1.5? Have you checked "Help|About" to see which JDK it is running NB? What exactly is the "program" you are running?

Wade


==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org




From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 6:36:22 PM
Subject: RE: [nbusers] Overriding JAVA_HOME
Looking in my netbeans.config I see the line

netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_11"

Yet my program still runs based on my JAVA_HOME environment variable which is set to Java 5.

Cheers, Eric

From: Wade Chandler [mailto:address-removed]
Sent: Sunday, December 07, 2008 3:13 PM
To: address-removed
Subject: Re: [nbusers] Overriding JAVA_HOME


Yes, you can either run NB from the command line to change it the times you want JDK 1.6+:

NBINSTALLDIR\bin\netbeans --jdkhome C:\top\path\of\your\jdk

or you can find your NB installation and go into etc\netbeans.config and edit or add:
netbeans_jdkhome="C:\top\path\of\your\jdk"

and that will do it.

Wade


==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org




From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 4:18:58 PM
Subject: [nbusers] Overriding JAVA_HOME
On Windows I have my JAVA_HOME environment variable set to Java 5, which is my normal development environment.

I
Back to top
Melongo Annabel
Posted via mailing list.





PostPosted: Mon Dec 08, 2008 12:38 am    Post subject: Overriding JAVA_HOME Reply with quote

You're welcome.


From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 6:28:01 PM
Subject: RE: [nbusers] Overriding JAVA_HOME


OK, I solved my problem.

NetBeans is launching my program with the javafx.exe command. It is naturally using the JAVA_HOME environment variable. The fix is to pass the javafx.exe command
Back to top
Wade Chandler
Posted via mailing list.





PostPosted: Mon Dec 08, 2008 1:36 pm    Post subject: Overriding JAVA_HOME Reply with quote

Hmm. If you have to set that from the properties file then the JavaFX stuff is lacking. You can easily set those type parameters in regular Java projects in the IDE. On the Run tab in your project properties you have a JVM parameters field.

Wade

==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org


From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 7:28:01 PM
Subject: RE: [nbusers] Overriding JAVA_HOME


OK, I solved my problem.

NetBeans is launching my program with the javafx.exe command. It is naturally using the JAVA_HOME environment variable. The fix is to pass the javafx.exe command
Back to top
Eric Kolotyluk
Posted via mailing list.





PostPosted: Mon Dec 08, 2008 3:53 pm    Post subject: Overriding JAVA_HOME Reply with quote

Right you are… I found where in the GUI to set the Java run arguments.

Thanks for pointing that out.

I still had to learn the hard way about the –version argument, first time I’ve had to use it.

Cheers, Eric


From: Wade Chandler [mailto:address-removed]
Sent: Monday, December 08, 2008 5:36 AM
To: address-removed
Subject: Re: [nbusers] Overriding JAVA_HOME


Hmm. If you have to set that from the properties file then the JavaFX stuff is lacking. You can easily set those type parameters in regular Java projects in the IDE. On the Run tab in your project properties you have a JVM parameters field.

Wade


==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org




From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 7:28:01 PM
Subject: RE: [nbusers] Overriding JAVA_HOME
OK, I solved my problem.

NetBeans is launching my program with the javafx.exe command. It is naturally using the JAVA_HOME environment variable. The fix is to pass the javafx.exe command –version:”1.6.0_11” which I can set in my project.properties file with

run.jvmargs=-version:"1.6.0_11"

Now my program runs as expected with the right jre.

I keep forgetting the NetBeans relies more on configuration files and less on settings in the IDE GUI. <humor>I just have to think like a Unix developer again.</humor>

Thanks everyone for the advice – it forced me to think about the problem differently.

Cheers, Eric


From: Eric Kolotyluk [mailto:address-removed]
Sent: Sunday, December 07, 2008 4:02 PM
To: address-removed
Subject: RE: [nbusers] Overriding JAVA_HOME


The NetBeans About|Help says it’s running Java 6U11

Yes, I have a NetBeans project, and when I select run from the NetBeans menu, when the program runs it shows it’s running with a Java 5 runtime.

The program is a little Java FX Script application I am running. It is executed by the javafx.exe command, not the java.exe command. Maybe there is something stupid going on with the javafx.exe command?

Cheers, Eric


From: Wade Chandler [mailto:address-removed]
Sent: Sunday, December 07, 2008 3:47 PM
To: address-removed
Subject: Re: [nbusers] Overriding JAVA_HOME


What do you mean "your program still runs"... Is this an NB project you are running? Do you mean NB is running with JDK 1.5? Have you checked "Help|About" to see which JDK it is running NB? What exactly is the "program" you are running?

Wade


==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org




From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 6:36:22 PM
Subject: RE: [nbusers] Overriding JAVA_HOME
Looking in my netbeans.config I see the line

netbeans_jdkhome="C:\Program Files\Java\jdk1.6.0_11"

Yet my program still runs based on my JAVA_HOME environment variable which is set to Java 5.

Cheers, Eric

From: Wade Chandler [mailto:address-removed]
Sent: Sunday, December 07, 2008 3:13 PM
To: address-removed
Subject: Re: [nbusers] Overriding JAVA_HOME


Yes, you can either run NB from the command line to change it the times you want JDK 1.6+:

NBINSTALLDIR\bin\netbeans --jdkhome C:\top\path\of\your\jdk

or you can find your NB installation and go into etc\netbeans.config and edit or add:
netbeans_jdkhome="C:\top\path\of\your\jdk"

and that will do it.

Wade


==================
Wade Chandler, CCE
Software Engineer and Developer, Certified Forensic Computer Examiner, NetBeans Dream Team Member, and NetBeans Board Member
http://www.certified-computer-examiner.com
http://wiki.netbeans.org/wiki/view/NetBeansDreamTeam
http://www.netbeans.org




From: Eric Kolotyluk <address-removed>
To: address-removed
Sent: Sunday, December 7, 2008 4:18:58 PM
Subject: [nbusers] Overriding JAVA_HOME
On Windows I have my JAVA_HOME environment variable set to Java 5, which is my normal development environment.

I’m using the recent NetBeans 6.5 for Java FX and everything in it seems to be configured to point at JDK 6U11, but every time I run my program it runs with Java 5.

Is there some setting somewhere in NetBeans or my project files where I can override the JAVA_HOME environment variable and use Java 6 to run my program?

I do not want to change my JAVA_HOME environment variable.

Cheers, Eric
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo