• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two Problems

 
Sujoy Mukherjee
Ranch Hand
Posts: 51
Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends, a very happy new year to all of you!
I'm new to this java world. I've two problems to solve out....or should I say a question and a problem?

(1)Concept of JRE
==================
The first one is, I don't understand the concept of jre. What for this jre is used? Ok I know its java runtime environment...and probably its for running the java codes to those machines where java sdk isn't installed....but why we who've installed java sdk also have to install it? And if Iinstall an updated version of jre, then what about the prev. version already installed in my pc? What about that java web start icon?

(2)CLASSPATH Problem
=======================
This one is really bugging me! I already found one post with the same problem...and already tried several solution including Sun's instruction, but without any result. But before that, let me give you a picture of my machine.......>
I've a dual boot system...Win98 SE & WinXP Professional....in both cases, java sdk 1.5.0 beta installed. I got 4 partitions on my hdd, on C:, its win98, on D:, its winXP, I installed java on both C for win98) & E for winXP) & created a folder "javaworld" on E: where I keep all the codes....that's it.

The problem is that when I tried to run java.exe it's giving error -
Exception in Thread "main" java.lang.NoClassDefFoundError
But if I give the command set classpath= from the command line, then it works fine....so I understand its due to my classpath.

Here's my classpath on XP environment -
D:\Program Files\Novosoft\C2J\Bin\c2jruntime.zip;E:\j2sdk1.5.0\lib;E:\j2sdk1.5.0\jre\lib\rt.jar;E:\j2sdk1.5.0\lib\dt.jar;E:\j2sdk1.5.0\lib\tools.jar;
E:\j2sdk1.5.0\jre\lib\ext\sunpkcs11.jar;E:\j2sdk1.5.0\jre\lib\ext\sunjce_provider.jar;E:\j2sdk1.5.0\jre\lib\ext\localedata.jar;
E:\j2sdk1.5.0\jre\lib\ext\dnsns.jar

[line breaks inserted for readability - Jim]

Does anything missing or wrong? Plzz help.
[ January 05, 2006: Message edited by: Jim Yingst ]
 
Stuart Ash
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Sujoy Mukherjee:
Hello friends, a very happy new year to all of you!
I'm new to this java world. I've two problems to solve out....or should I say a question and a problem?

(1)Concept of JRE
==================
The first one is, I don't understand the concept of jre. What for this jre is used? Ok I know its java runtime environment...and probably its for running the java codes to those machines where java sdk isn't installed....but why we who've installed java sdk also have to install it? And if Iinstall an updated version of jre, then what about the prev. version already installed in my pc? What about that java web start icon?




Welcome to Java and the Ranch.

JDK = JRE + Developer stuff

I think separate installation of JRE is not necessary if the JDK is already there, the installer's insistence on installing JRE as well along with JDK is perhaps redundant. Others, correct me if I am wrong in my observation.

Classpath problem?? Welcome to Java!!
[ January 05, 2006: Message edited by: Stuart Ash ]
 
Sujoy Mukherjee
Ranch Hand
Posts: 51
Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankz Stuart. But still one thing isn't cleared about jre. Say I have installed jre 1.4.1, then using the update feature of java icon(on control panel) if I update to jre 1.4.2 or even jre 1.5.0, then what happened to the earlier jre 1.4.1? Is it still needed or can I remove it safely? And althouth during the installation of java sdk, the installer doesn't insist on installing the jre,still I've to install it on the machine , otherwise there appears problem(I've seen that)....so the question remains unsolved. Why I've to install jre if jdk is already there?

And you didn't answered my 2nd one abt classpath. But anyway thx again. It feelsgreat to have such senior java programmers like you.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
See if these examples help with classpath. It's just a list of places the compiler or JRE should look to find classes referenced in your code.
 
Sujoy Mukherjee
Ranch Hand
Posts: 51
Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thx Stan, that's a nice link. Thx for the "Quote" too.
By the way, is it a style or a rule that everybody here give a quote or place some intellectual words as the bottomline of their post(as a signature)?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nah, the tag lines are just fun.
 
Adam Richards
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tip: Try to use more specific subject lines. The more meaningful your subject, the more meaningful your replies.
 
Layne Lund
Ranch Hand
Posts: 3061
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1) When you install the JDK the JRE is installed automagically as well. When you install an updated version of the JDK or JRE, it installs the whole thing. This is not a patch like many other software vendors use. If you don't want to use the older version of the JDK or JRE, then you can safely remove it.

2) At this point, you don't need to set the CLASSPATH, unless you have installed other software that uses it. In this case, you need to make sure that the local directory . (DOT) is included in the classpath. I suggest that you remove the CLASSPATH entirely, if possible.

Layne
 
Sujoy Mukherjee
Ranch Hand
Posts: 51
Netbeans IDE Oracle Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankz Layne for clearing my doubts abt JRE. Thank you very much.
And dear Mr. bartender, I mean Adam, I'll be cautious in future of my subject lines to be more specific..thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic