Win a copy of Head First Agile this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Unable to initialize threads: cannot find class java/lang/Thread  RSS feed

 
Kia Phia Ben
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all.
I installed Oracle 8i in windows 2000 advanced server. after that I setup jdk1.4.2.10 and run HelloWorld.java but had error:
Unable to initialize threads: cannot find class java/lang/Thread.
Here are environment variables
CLASSPATH=C:\j2sdk1.4.2_10\jre\lib\rt.jar.
JAVAHOME=C:\j2sdk1.4.2_10
please tell me how to fix it.
Thanks in advance!!
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16029
87
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a nasty habit of Oracle that they install a Java 1.3 JRE besides the Oracle software. So most likely your Java configuration is messed up by the installation of the Oracle software.

Edit the PATH environment variable and remove the path to the JRE that's included with Oracle.

You do not need to have C:\j2sdk1.4.2_10\jre\lib\rt.jar in the CLASSPATH.

Setting the environment variable JAVAHOME doesn't do anything. Some programs use JAVA_HOME (note: with underscore) but the JDK and JRE itself don't use that environment variable.
[ October 16, 2006: Message edited by: Jesper Young ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!