Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
话题锁定
该话题已被锁定 - why , 2004-11-03 22:03
如果您尚不清楚该话题被锁定的原因,请参考论坛规则以及本版公告或者联系本版版主。
作者 我写了如下一个HelloWord,但放到网页上不显示,为什么?
cnamos





发贴: 22
积分: 0
于 2004-09-06 19:53 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
import java.applet.Applet;
import java.awt.Graphics;
public class HelloWorld extends Applet {
public void paint (Graphics g) {
g.drawString ("我们一起来!",35,30);
}
}


cnamos edited on 2004-09-08 13:07

作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
why

問題兒童

总版主


发贴: 4629
积分: 388
于 2004-09-06 20:16 user profilesend a private message to usersend email to whysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
这不是applet,不是在网页上运行的。
先好好读一读入门书吧。

一般写 HelloWorld,不是HelloWord


请勿滥用 FAQ 版



作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
lansoft134300



发贴: 0
积分: 0
于 2004-09-07 17:21 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
你是菜鸟啊,你的加把劲了


作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
cnamos





发贴: 22
积分: 0
于 2004-09-08 12:52 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
已然知道了,为何又不拉人家一把呢?只会当旁观者,国人的悲哀


作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
nothing

天外飞仙.....

CJSDN高级会员


发贴: 1636
积分: 131
于 2004-09-08 13:01 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
cnamos wrote:
已然知道了,为何又不拉人家一把呢?只会当旁观者,国人的悲哀


不经风雨,不见彩虹.




躲得过的怪物,躲不过的刺激

作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
why

問題兒童

总版主


发贴: 4629
积分: 388
于 2004-09-08 13:01 user profilesend a private message to usersend email to whysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
cnamos wrote:
已然知道了,为何又不拉人家一把呢?只会当旁观者,国人的悲哀


根本拉无可拉!
都说这不是在网页上运行的。
不行就不行,为何硬要问为何?


至于你那APPLET在NetBeans3.6编译不过的问题,请看
http://www.cjsdn.net/post/view?bid=7&id=110354



作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
cnamos





发贴: 22
积分: 0
于 2004-09-08 13:10 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我改了改,烦请再看看.人家是诚心的想学.一看书就打嗑睡


作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
why

問題兒童

总版主


发贴: 4629
积分: 388
于 2004-09-08 13:23 user profilesend a private message to usersend email to whysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
I don't have any problem in running that piece of code:
D:\Java>set JAVA_HOME=C:\j2sdk

D:\Java>set PATH=C:\j2sdk\bin; ....

D:\Java>set CLASSPATH=.

D:\Java>java -version
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-b04)
Java HotSpot(TM) Client VM (build 1.4.2_05-b04, mixed mode)

D:\Java>type HelloWorld.java
import java.applet.Applet;
import java.awt.Graphics;

public class HelloWorld extends Applet {
public void paint (Graphics g) {
g.drawString ("Let's go!",35,30);
}
}


D:\Java>type HelloWorld.html
<html>
<body>
<applet code="HelloWorld.class" height="200" width="200"></applet>
</body>
</html>


D:\Java>appletviewer HelloWorld.html


一看书就打嗑睡?
若不愿改变这习性,那么阁下多半会追不上日新月异的技术了。


why edited on 2004-09-08 13:26

作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
nothing

天外飞仙.....

CJSDN高级会员


发贴: 1636
积分: 131
于 2004-09-08 13:25 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
cnamos wrote:
import java.applet.Applet;
import java.awt.Graphics;
public class HelloWorld extends Applet {
public void paint (Graphics g) {
g.drawString ("我们一起来!",35,30);
}
}


untitled8.zip (0.87k)




躲得过的怪物,躲不过的刺激

作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
cnamos





发贴: 22
积分: 0
于 2004-09-08 16:27 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我看的只有灰的一片,没有东西啊.


作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
qingbo777

轻薄



发贴: 106
积分: 0
于 2004-09-08 16:33 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
cnamos wrote:
我看的只有灰的一片,没有东西啊.

估计你的JRE的版本不对.
到SUN主页上下一个最新的JRE装上试试.



总想让自己变的帅一点,
却发现离这个目标越来越远.
作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
cnamos





发贴: 22
积分: 0
于 2004-09-08 16:40 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我的环境变量有没有设错?现在只试applet

path
c:\j2sdk\bin
classpath
c:\j2sdk\lib\tools.jar;c:\j2sdk\lib\dt.jar



作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
why

問題兒童

总版主


发贴: 4629
积分: 388
于 2004-09-08 21:17 user profilesend a private message to usersend email to whysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
cnamos wrote:
我的环境变量有没有设错?现在只试applet

path
c:\j2sdk\bin
classpath
c:\j2sdk\lib\tools.jar;c:\j2sdk\lib\dt.jar

0 SET JAVA_HOME=c:\j2sdk

1 classpath 加上 . 比较好
.;c:\j2sdk\lib\tools.jar;c:\j2sdk\lib\dt.jar

2 用甚么 browser?
browser 有没有设定使用 Sun 的 JRE?
在 browser 运行时 tray 有没有 Sun 的“那杯Java” 显示?

3 用 appletviewer 执行有没有问题?



作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
cnamos





发贴: 22
积分: 0
于 2004-09-09 08:38 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
1.classpath加".;"后面那个不加么?
.;c:\j2sdk\lib\tools.jar; .;c:\j2sdk\lib\dt.jar

2.我用的是IE6.0系统自带的,我相信有百万分之99都是用他吧.

3.appletviewer在那里,我如何找到它来执行?



作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
cnamos





发贴: 22
积分: 0
于 2004-09-09 08:40 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我下载的是SUN集成的J2SDK1.4.2_04,99M的.包含了NETBEANS IDE3.6,请问还要另外再装JRE吗?


作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
why

問題兒童

总版主


发贴: 4629
积分: 388
于 2004-09-09 09:56 user profilesend a private message to usersend email to whysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
> 1.classpath加".;"后面那个不加么?
> .;c:\j2sdk\lib\tools.jar; .;c:\j2sdk\lib\dt.jar
阁下说咧?
为甚么会想到需要重覆呢?
阁下有没有查看过 CLASSPATH 的功能呢?
所以說不能事事倚赖他人吧。

敝人在最近一个相关的题目 http://www.cjsdn.net/post/view?bid=1&id=109765 上说
PATH 是执行程式时﹐作业系统所搜寻的路径──
搜寻PATH上的每个 directory,直至找到第一个要找的

CLASSPATH 是执行 JAVA 程式时,JAVA VM 所搜寻的路径──
搜寻CLASSPATH上的每个 directory,及每个 jar 档的内容

阁下明白吗?


> 2.我用的是IE6.0系统自带的,我相信有百万分之99都是用他吧.
敝下就是那百分之一,不用IE系统自带的。


>3.appletviewer在那里,我如何找到它来执行?
1 若 PATH 已设好,便可以在 Command Prompt 上执行。
2 如何找?那敝人问阁下,如果阁下有一个要紧档案不记得放在哪儿,阁下会如何找?



作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
cnamos





发贴: 22
积分: 0
于 2004-09-09 10:11 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
谢谢,用appletviewer运行就有显示"我们一起来."
那为什么现在在网页不行?



作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
helloworld



发贴: 0
积分: 0
于 2004-09-09 10:30 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
1.




作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
helloworld



发贴: 0
积分: 0
于 2004-09-09 10:30 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
2.




作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
helloworld



发贴: 0
积分: 0
于 2004-09-09 10:32 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
Enjoy !!

Just so so ..




作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
cnamos





发贴: 22
积分: 0
于 2004-09-09 11:44 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
我的系统就是没有这项,安装什么版本才有JAVA PLUG-IN.请问
那为何有的JAVA APPLET程序不用这个也可运行,如:
http://bbs.mete.cn/bbs/mtdownload/01.rar
......
http://bbs.mete.cn/bbs/mtdownload/06.rar



作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
cnamos





发贴: 22
积分: 0
于 2004-09-09 11:55 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
原来要安装:j2re-1_4_2_05-windows-i586-p.exe,终于搞定了,谢谢helloworld.四天的问题终于搞定了.谢谢


作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
cnamos





发贴: 22
积分: 0
于 2004-09-09 12:19 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
还有我的环境变量这样设是对的.
path
c:\j2sdk\bin
classpath
c:\j2sdk\lib\tools.jar;c:\j2sdk\lib\dt.jar

.



作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
why

問題兒童

总版主


发贴: 4629
积分: 388
于 2004-09-09 12:42 user profilesend a private message to usersend email to whysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
cnamos wrote:
还有我的环境变量这样设是对的.
path
c:\j2sdk\bin
classpath
c:\j2sdk\lib\tools.jar;c:\j2sdk\lib\dt.jar

敝人没说阁下的设置错。
没有必然的对与错,只有适合与否。

不妨认识一下 tools.jar 和 dt.jar 是甚么咚咚,需要不需要:
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/jdkfiles.html

c:\j2sdk1.4.2\lib
Files used by the development tools. These include tools.jar, which contains non-core classes for support of the tools and utilities in the SDK. Also includes dt.jar, the DesignTime archive of BeanInfo files that tell interactive development environments (IDE's) how to display the Java components and how to let the developer customize them for the application.


原来要安装:j2re-1_4_2_05-windows-i586-p.exe

不是一定的。


why edited on 2004-09-09 12:44

作者 Re:我写了如下一个HelloWord,但放到网页上不显示,为什么? [Re:cnamos]
bugbao





发贴: 1
积分: 0
于 2004-10-03 18:43 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
import java.applet.Applet;
import java.awt.Graphics;
public class HelloWorld extends Applet {
public void paint (Graphics g) {
g.drawString ("我们一起来!",35,30);
}
}
//<applet code="HelloWorld.class" height="200" width="200"></applet>




flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923