URN Logo
UNIX Resources » Linux » China Linux Forum » Java&jsp技术 » 第4页 » java在linux里的环境设置问题
announcement 声明: 本页内容为中国Linux论坛的内容镜像,文章的版权以及其他所有的相关权利属于中国Linux论坛和相应文章的作者,如果转载,请注明文章来源及相关版权信息。
Resources
China Linux Forum(finished)
Linux Forum(finished)
FreeBSD China(finished)
linuxforum.com
  LinuxForum General Chat
  Linux Advocacy
  LinuxForum Polls
  Introductions
  Linux Kernel Support
  Patch Management
  Development Release
  Linux Programming
  Linux Security
  Linux Software
  Linux Hardware Problems
    Linux Video Problems
    Linux Sound Problems
  Linux Networking Support
  Linux Printing Support
  Linux Human Interface Devices Support
  Linux Data Storage Support
  Linux Applications Support
  Linux Installation Support
  Linux Laptops Support
  Linux Motherboard, Chipsets, CPU, Memory
  Miscellaneous
  Debian Linux Support
  Ubuntu Linux Support
  LiveCD Discussions
  Gentoo Linux Support
  Mandrake Linux Support
  Redhat / Fedora Linux Support
  Slackware Linux Support
  SuSE Linux Support
  CentOS Linux Support
  Linux Web Servers
  Linux DNS Servers
  Linux Database Servers
  Linux Email Servers
  Linux FTP Servers
  Linux Squid Proxy Server
  Linux Samba Help
  Linux cPanel Help
  Linux Ensim Help
  Linux Plesk Help
  Linux Webmin / Usermin Help
  Qmail Toaster Help
  Linux Games
  Windows Game Emulation
  Linux Discussions
  General Linux Discussions
  Red Hat Linux Discussions
  More Red Hat Linux Discussions
  Mandrake Linux Discussions
  Slackware Linux Discussions
  SuSE Linux Discussions
  Debian Discussions
  Samba Help
  Linux Security
  Linux Networking
  Gentoo Help
  Operating System Rant Forum
  Hardware Rants
   
java在linux里的环境设置问题
java在linux里的环境设置问题 - billygao [2004-10-25 04:45 | 636 byte(s)]
 
Re: java在linux里的环境设置问题 - cathayan [2004-10-29 14:26 | 45 byte(s)]
 
Re: java在linux里的环境设置问题 - netox [2004-12-10 17:49 | 22 byte(s)]
 
Subject: java在linux里的环境设置问题
Author: billygao    Posted: 2004-10-25 04:45    Length: 636 byte(s)
[Original] [Print] [Top]
我在linux10里安装了java jdk1.5,但是我试着运行了最简单的一段hello world的代码,却不能执行.代码和错误如下,不知哪位朋友可以帮忙解决一下,谢谢.
代码:
import java.lang.*;
public class HelloWorld
{
public static void main(String args[])
{
String str = new String("hello world");
System.out.println(str);
}
}

[]#java HelloWorld.java
Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorld/java

我很不明白为什么最后一行为什么是HelloWorld/java,
而不是HelloWorld.java
[Original] [Print] [Top]
Subject: Re: java在linux里的环境设置问题
Author: cathayan    Posted: 2004-10-29 14:26    Length: 45 byte(s)
[Original] [Print] [Top]
java文件是用来javac的,java后面只跟类名即可。
[Original] [Print] [Top]
Subject: Re: java在linux里的环境设置问题
Author: netox    Posted: 2004-12-10 17:49    Length: 22 byte(s)
[Original] [Print] [Top]
:javac HelloWorld.java
[Original] [Print] [Top]
« Previous thread
疑惑.
Java&jsp技术
4
Next thread »
J2SE 1.4.3 API Specification
     

Copyright © 2018 UNIX Resources Network, All Rights Reserved.    About URN | Privacy & Legal | Help | Contact us