Error: could not find java.dll

flowerbacket 2003-06-06 01:38:11
怎么解决?
我的是jb8自带的, 使用jb7的就能正常运行

我的注册表没有这个键值
'Software\JavaSoft\Java Runtime Environment\CurrentVersion'


C:\>cd C:\JAVACode\BeginningJava2SourceCode\Chap11\01_CreatingThreads
C:\JAVACode\BeginningJava2SourceCode\Chap11\01_CreatingThreads>javac TryThread.j
ava

C:\JAVACode\BeginningJava2SourceCode\Chap11\01_CreatingThreads>java TryThread
Registry key 'Software\JavaSoft\Java Runtime Environment\CurrentVersion'
has value '1.4', but '1.3' is required.
Error: could not find java.dll
Error: could not find Java 2 Runtime Environment.


...全文
1177 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
flowerbacket 2003-06-10
  • 打赏
  • 举报
回复
//帮忙看下是不是我的JB问题... THANK


import java.io.IOException;

public class TryThread extends Thread
{
private String firstName; // Store for first name
private String secondName; // Store for second name
private long aWhile; // Delay in milliseconds

public TryThread(String firstName, String secondName, long delay)
{
this.firstName = firstName; // Store the first name
this.secondName = secondName; // Store the second name
aWhile = delay; // Store the delay
setDaemon(true); // Thread is daemon
}

public static void main(String[] args)
{
// Create three threads
Thread first = new TryThread("Hopalong ", "Cassidy ", 200L);
Thread second = new TryThread("Marilyn ", "Monroe ", 300L);
Thread third = new TryThread("Slim ", "Pickens ", 500L);

System.out.println("Press Enter when you have had enough...\n");
first.start(); // Start the first thread
second.start(); // Start the second thread
third.start(); // Start the third thread
try
{
System.in.read(); // Wait until Enter key pressed
System.out.println("Enter pressed...\n");
}
catch (IOException e) // Handle IO exception
{
System.out.println(e); // Output the exception
}
System.out.println("Ending main()");
return;
}

// Method where thread execution will start
public void run()
{
try
{
while(true ) // Loop indefinitely...
{
System.out.print(firstName); // Output first name
sleep(aWhile); // Wait aWhile msec.
System.out.print(secondName + "\n"); // Output second name
}
}
catch(InterruptedException e) // Handle thread interruption
{
System.out.println(firstName + secondName + e); // Output the exception
}
}
}
hoxisoft 2003-06-09
  • 打赏
  • 举报
回复
是不是冲突了???
haode 2003-06-09
  • 打赏
  • 举报
回复
估计是你用的这个JB8文件不全,换一个JB8重装应该可以解决

62,634

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧