Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JRE and settings

 
geetha chandran
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
I copied JDK1.2.2 alone from one of my friends machine and had set the path and classpath of autoexec file with this said folder and developed a swing program. It was working very fine...Yesterday, I downloaded "j2re-1_4_1_01-windows-i586.exe" from the "www.java.sun.com" site and installed it in my machine. Right now while executing my swing program, the JFrame is getting loaded, but i cant able to see my components in that JFrame...
once if i go to the Control Panel ---> Java Runtime Environment---> Remove the said. Now, i can see the JFrame with all its components. Pl. tell me, what is the problem with the software. should i do some settings some where, after installing the said .exe file. Pl. advice me...
waiting for ur reply,
Geetha C.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like you put your classes in the same classpath with the original JDK. Then when you installed the new JDK it changed the classpath for the machine, so now your stuff can not be found.
Either move your stuff to be in the new classpath, or add the directory that your stuff is in to the new classpath. If you do the later be careful that you do not end up including TWO directories that hold different JREs and confuse the system.
 
geetha chandran
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Pal,
The thing is, at any type of situation(whether j2re installed or not), my FRAMES (not JFRAMES) are getting executed/visible (Also the components placed inside are visible). But as far as the JFrame is considered, only if i uninstall my "j2re-1_4_1_01-windows-i586.exe", I can able to see my components inside my JFrame. It is not that, I CAN'T see my JFrame. JFrame is getting loaded/visible. But the components placed inside it are not visible.(At the time, when the above said j2re is installed).
So i tried of giving a new classpath in my autoexec.bat file as follows:
set CLASSPATH=C:\Program Files\Java\j2re1.4.1_01\bin;C:\Program Files\Java\j2re1.4.1_01\lib;C:\Program Files\Java\j2re1.4.0_02\bin;C:\Program Files\Java\j2re1.4.0_02\lib;
Also in the control panel, i changed as: (windows NT Workstation):
Control Panel--->System---->Environment(TAB)------->the variable is CLASSPATH and the value is .;.;.;C:\Program Files\Java\j2re1.4.1_01\bin;C:\Program Files\Java\j2re1.4.1_01\lib;C:\Program Files\Java\j2re1.4.0_02\bin;C:\Program Files\Java\j2re1.4.0_02\lib;

But still i am facing the same problem...
pl. advice me....hope i should change some thing in the Reg edit.....
bye & waiting for ur reply,
GEETHA C.
P.S: I am using windows NT Workstation. The thing is It is NOT that, i CAN'T able to see my JFRAME...I can see my JFRAME....but the components placed inside them are INVISIBLE....(At the JRE installed state)...Pl. advice me...
 
sram bahl
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to recompile your swing stuff under 1.4. Alot of things have changed between 1.2 and 1.4, when you compile with 1.4 you may hit some deprecation warnings, correct them and run your swing under jre1.4
[ November 26, 2002: Message edited by: sram bahl ]
 
geetha chandran
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Pal,
As you suggested, I changed my classpath as follows:
My autoexec.bat file as follows:
set CLASSPATH=C:\Program Files\Java\j2re1.4.1_01\bin;C:\Program Files\Java\j2re1.4.1_01\lib;C:\Program Files\Java\j2re1.4.0_02\bin;C:\Program Files\Java\j2re1.4.0_02\lib;
Also in the control panel, i changed as: (windows NT Workstation):
Control Panel--->System---->Environment(TAB)------->the variable is CLASSPATH and the value is .;.;.;C:\Program Files\Java\j2re1.4.1_01\bin;C:\Program Files\Java\j2re1.4.1_01\lib;C:\Program Files\Java\j2re1.4.0_02\bin;C:\Program Files\Java\j2re1.4.0_02\lib;
But right now, I cant able to run "javac" in my command prompt...the error i am getting is:
"The name specified is not recognized as an
internal or external command, operable program or batch file."
But i can able to run "java" in the command prompt...
hope i have to change the class path. could u pl. suggest me...
bye & waiting for ur reply,
GEETHA C.
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you download the SDK (JDK)? Or did you just download the JRE? The JRE has only the java.exe program. The SDK has both the java.exe and the javac.exe (among others).
 
sram bahl
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
compile ur swing for 1.4 compatibility using javac -target <version> *.java
eg: <version> = 1.2 means 1.2 and above
[ November 27, 2002: Message edited by: sram bahl ]
[ November 27, 2002: Message edited by: sram bahl ]
 
gautham kasinath
Ranch Hand
Posts: 583
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
exactly what is your question lady??
the error about the winbox command prompt not recognising *javac* is correct.
The path is not set for the *java_home*/bin directory where all the executables for Java reside.
Now, if you can get to the my computer and set the environment variables for the path to point correctly to the *java_home*/bin then the javac will work.
*java_home* is the jdk install diretory. If you have only copied the jdk from some other machine or source, I would advice you to delete it all and download and install the same.
Try using jdk1.3.1 as there is common belief that the 1.4 version is not completely stable yet.
After the installation, all that you need to do is set the path in the my computer/environment variables, and viola!! you can open a new command prompt and execute javac!! and java!! too!!
I hope this helps. if it doesnt please explain your question, will save me breaking my head.
lupo
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic