这两天我发了两个帖子共两百分。http://211.157.102.21/expert/topic/584/584738.xml?temp=.133465 明天一定结掉它去。我希望达到两个目的。 1:我是否还要继续用JBUILDER 6。(希望能谈的尽量详细) 2:如果我改用UltraEdit 我希望首先能帮我解决这个问题文件名 multitest。java //Define our simple threads.They will pause for a short time //and then print out their names and delay times class testthread extends Thread { private String whoami; private int delay; //Our constructor to store the name(whoami) //and time to sleep(delay) public testthread(String s,int d) { whoami=s; delay=d; } //Run the thread method similar to main() //When run is finished,the thread dies. //Run is called from the start()method of Thread public void run() { //Try to sleep for the specified time try { sleep(delay); } catch(InterruptedException e) { System.out.println("HelloWorld!"); } //Now print out our name System.out.println("HelloWorld!"+whoami+""+delay); } }public class multitest { public static void main(String args[]) { testthread t1,t2,t3; //Create our test threads t1=new testthread("Thread1",(int)(Math.random()*2000)); t2=new testthread("Thread2",(int)(Math.random()*2000)); t3=new testthread("Thread3",(int)(Math.random()*2000)); //Start each of the thread t1.start(); t2.start(); t3.start(); } } 在DOS下能编译成功但在UltraEdit 中按下F9 运行 D:\jdk1.3\bin\javac.exe multitest.java 后出现错误错误:不能读:multitest.java 1 个错误
在jbuilder下: file->new project 在弹出的对话框填project name; select the project type and the path then click the finish button. click the project then file->new->select javabean 输入名字什么的然后把你的代码贴进去,注意,每个java文件中只能由一个class,向你上面的代码你要么做成两个bean,要么做成两个方法,否则不错才怪。
文件名 multitest。java //Define our simple threads.They will pause for a short time //and then print out their names and delay times class testthread extends Thread { private String whoami; private int delay; //Our constructor to store the name(whoami) //and time to sleep(delay) public testthread(String s,int d) { whoami=s; delay=d; } //Run the thread method similar to main() //When run is finished,the thread dies. //Run is called from the start()method of Thread public void run() { //Try to sleep for the specified time try { sleep(delay); } catch(InterruptedException e) { System.out.println("HelloWorld!"); } //Now print out our name System.out.println("HelloWorld!"+whoami+""+delay); } }public class multitest { public static void main(String args[]) { testthread t1,t2,t3; //Create our test threads t1=new testthread("Thread1",(int)(Math.random()*2000)); t2=new testthread("Thread2",(int)(Math.random()*2000)); t3=new testthread("Thread3",(int)(Math.random()*2000)); //Start each of the thread t1.start(); t2.start(); t3.start(); } } 在DOS下能编译成功但在UltraEdit 中按下F9 运行 D:\jdk1.3\bin\javac.exe multitest.java 后出现错误错误:不能读:multitest.java 1 个错误
2.编码、编译环境:建议使用EditPlus + JDK,小巧灵活,让你专注。具体用法可以从论坛上搜索EditPlus关键字。需要下载可以到www.google.com,用"EditPlus,下载"进行搜索。不推荐用JBuilder。
3.数据库。MySQL。可以去www.mysql.org下载。
MySQL的JDBC驱动,可以去http://sourceforge.net/下载最新版本.
4.推荐站点。www.google.com。有问题的时候,用它就能找到答案。当然,别忘了CSDN.
最好只在里面留一些与数据表现有关的代码,将较长和与数据生成有关的代码封
装进Beans里。还有,试试Macromedia UltraDev
{
public static void main(String args[])
{
Thread t=Thread.currentThread();
t.setName("This Thread is running");
System.out.println("The running thread:"+t);
try
{
for(int i=0;i<5;i++)
{
System.out.println("Sleep time"+i);
Thread.sleep(1000);
}
}
catch(InterruptedException e)
{
System.out.println("thread has wrong");
}
}
}这样一个类。
在JBUILDER中如何调试
QQ 10207229
{
public static void main(String args[])
{
Thread t=Thread.currentThread();
t.setName("This Thread is running");
System.out.println("The running thread:"+t);
try
{
for(int i=0;i<5;i++)
{
System.out.println("Sleep time"+i);
Thread.sleep(1000);
}
}
catch(InterruptedException e)
{
System.out.println("thread has wrong");
}
}
}我以建了名为testthread的类,编译时报错
"testthread.java": Error #: 901 : package . stated in source D:\程序原码\test319\src\test319\testthread.java does not match directory test319
建议二:看看提问的智慧http://www.csdn.net/expert/topic/543/543328.xml?temp=7.464236E-02
建议三:还没想好……:P
{
public static void main(String args[])
{
Thread t=Thread.currentThread();
t.setName("This Thread is running");
System.out.println("The running thread:"+t);
try
{
for(int i=0;i<5;i++)
{
System.out.println("Sleep time"+i);
Thread.sleep(1000);
}
}
catch(InterruptedException e)
{
System.out.println("thread has wrong");
}
}
}在JDK1.3下执行 javac testthread.java
java testthread的效果
我想在jbuilder 中看到给我具体的步骤
现在被开发工具搞的晕头转向,很不值得吧?
这个简单的class 在其他编译工具里很好调的。
比如:UltraEdit.
要不,你先看看JB的书吧
以前装过去weblogic感觉开发调试不太好(jsp)有一本书
jsp完全探索(韩国人写的)感觉还不错
可是我不喜欢在DOS下调试。
明天一定结掉它去。我希望达到两个目的。
1:我是否还要继续用JBUILDER 6。(希望能谈的尽量详细)
2:如果我改用UltraEdit 我希望首先能帮我解决这个问题文件名 multitest。java
//Define our simple threads.They will pause for a short time
//and then print out their names and delay times
class testthread extends Thread
{
private String whoami;
private int delay;
//Our constructor to store the name(whoami)
//and time to sleep(delay)
public testthread(String s,int d)
{
whoami=s;
delay=d;
}
//Run the thread method similar to main()
//When run is finished,the thread dies.
//Run is called from the start()method of Thread
public void run()
{
//Try to sleep for the specified time
try
{
sleep(delay);
}
catch(InterruptedException e)
{
System.out.println("HelloWorld!");
}
//Now print out our name
System.out.println("HelloWorld!"+whoami+""+delay);
}
}public class multitest
{
public static void main(String args[])
{
testthread t1,t2,t3;
//Create our test threads
t1=new testthread("Thread1",(int)(Math.random()*2000));
t2=new testthread("Thread2",(int)(Math.random()*2000));
t3=new testthread("Thread3",(int)(Math.random()*2000));
//Start each of the thread
t1.start();
t2.start();
t3.start();
}
}
在DOS下能编译成功但在UltraEdit 中按下F9 运行
D:\jdk1.3\bin\javac.exe multitest.java
后出现错误错误:不能读:multitest.java
1 个错误
大多数人都用不上,但就象windows一样,强大就意味着必然有被牺牲掉的部分,
最常见的就是运行速度了,当然,如果你的机子配置非常的牛,我无话可说,不过
要完成一些比较低级的东西,很简单的编辑器就可以胜任啊,何必非JB6不可呢?
你不觉得编译一些东西,功能太强大的东西容错性太好的话,会给你带来很大的
惰性?windows就是一个很好的例子?初学者应该注重编程的严谨性,这相当
关键,我推荐EditPlus,很小的一个玩意儿,还不错。
file->new project
在弹出的对话框填project name; select the project type and the path
then click the finish button.
click the project then file->new->select javabean
输入名字什么的然后把你的代码贴进去,注意,每个java文件中只能由一个class,向你上面的代码你要么做成两个bean,要么做成两个方法,否则不错才怪。
我没有新建 javabean 而是新建CLASS。
而且我同样这个文件我可以在DOS下
编译且执行。
//Define our simple threads.They will pause for a short time
//and then print out their names and delay times
class testthread extends Thread
{
private String whoami;
private int delay;
//Our constructor to store the name(whoami)
//and time to sleep(delay)
public testthread(String s,int d)
{
whoami=s;
delay=d;
}
//Run the thread method similar to main()
//When run is finished,the thread dies.
//Run is called from the start()method of Thread
public void run()
{
//Try to sleep for the specified time
try
{
sleep(delay);
}
catch(InterruptedException e)
{
System.out.println("HelloWorld!");
}
//Now print out our name
System.out.println("HelloWorld!"+whoami+""+delay);
}
}public class multitest
{
public static void main(String args[])
{
testthread t1,t2,t3;
//Create our test threads
t1=new testthread("Thread1",(int)(Math.random()*2000));
t2=new testthread("Thread2",(int)(Math.random()*2000));
t3=new testthread("Thread3",(int)(Math.random()*2000));
//Start each of the thread
t1.start();
t2.start();
t3.start();
}
}
在DOS下能编译成功但在UltraEdit 中按下F9 运行
D:\jdk1.3\bin\javac.exe multitest.java
后出现错误错误:不能读:multitest.java
1 个错误