Link to home
Create AccountLog in
Avatar of Michael Lam
Michael Lam

asked on

how to control which version of jdk Netbeans uses

hi,

i am using the latest netbeans ide to build a simple jms java file,

but i am getting this:

init:
deps-jar:
Compiling 10 source files to

C:\wrox\pro_jms\Chapter04\Test\build\classes
C:\wrox\pro_jms\Chapter04\AccountsDepartment.java:4: package

javax.jms does not exist
import javax.jms.*;
C:\wrox\pro_jms\Chapter04\AccountsDepartment.java:11: cannot find

symbol
the netbeans ide i am using uses jdk_1.6, which when i use directly

to compile in command line mode, works.  can anyone tell me why this

is happening?

also, if possible, can someone tell me how to get Netbeans to switch

from jdk_1.6 to jdk1.4?  i tried modifying the JAVA_HOME env

variable, but didn't work.
ASKER CERTIFIED SOLUTION
Avatar of UrosVidojevic
UrosVidojevic
Flag of Serbia image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of Michael Lam
Michael Lam

ASKER

thanks. but now during netbeans startup, it's complaining about not being to install:
JUnit Tests, Web Services Core, etc.  because java 1.5 was requested but only 1.4 is running.
SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
thanks for all your help, i just found out the netbeans 5.5 only accept jdk 1.5 or above, so i had to use netbeans 5.0.  but i still can't figure out why even when i was using netbeans 5.5, i can compile jms code:

javax.jms does not exist
import javax.jms.*;
...