由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Java版 - weird class definition
相关主题
FFDTRe: weird class definition问个Thread 的问题,java certificate里的
新手求助,急急急!!!help "java.lang.NoSuchMethodError"
请问一个最初级问题Re: 怎样不用main(String args[])输出"hello worl
Tomcat JSP syntax errorClass not found?
为何运行JAVA出现这个错误?interesting
another question driving me crazy...Help with Tomcat for Eclipse v1.03
一个怪异的java 运行问题问一个 java generic问题
java inner class - 初学者问ant javac error in eclipse 3.0?
相关话题的讨论汇总
话题: hell话题: class话题: public话题: main话题: weird
进入Java版参与讨论
1 (共1页)
c**t
发帖数: 26
1
in hell.java class, I define it
import ....;
public class hell
{
private float var1=1;

public hell()
{
...;
}
...
public static void main()
{
hell a = new hell();
....
}
}
when I compile it, no problem. but when run java hell.class
it tells me Exception in thread "main" java.lang.NoClassDefFoundError
Anything wrong?
T***B
发帖数: 137
2
java hell

【在 c**t 的大作中提到】
: in hell.java class, I define it
: import ....;
: public class hell
: {
: private float var1=1;
:
: public hell()
: {
: ...;
: }

c**t
发帖数: 26
3
same error

【在 T***B 的大作中提到】
: java hell
T***B
发帖数: 137
4
java -classpath . hell

【在 c**t 的大作中提到】
: same error
c**t
发帖数: 26
5
same error

【在 T***B 的大作中提到】
: java -classpath . hell
m******t
发帖数: 2416
6
Do you have file hell.class under the current directory
when you try it?

【在 c**t 的大作中提到】
: same error
T***B
发帖数: 137
7
write a 'hello world' and try again.

【在 c**t 的大作中提到】
: same error
c**t
发帖数: 26
8
if not use -classpth ., hello world will havve the same error
so it seems classpath error.
but I used classpath when run hell, still the same error
sounds weird

write a 'hello world' and try again.

【在 T***B 的大作中提到】
: write a 'hello world' and try again.
T***B
发帖数: 137
9
do you use 'package' in your code?

【在 c**t 的大作中提到】
: if not use -classpth ., hello world will havve the same error
: so it seems classpath error.
: but I used classpath when run hell, still the same error
: sounds weird
:
: write a 'hello world' and try again.

c**t
发帖数: 26
10
I comment it. So no 'package'

【在 T***B 的大作中提到】
: do you use 'package' in your code?
T***B
发帖数: 137
11
still stuck? you may post a simplified version of your code here.

【在 c**t 的大作中提到】
: I comment it. So no 'package'
e***e
发帖数: 351
12
so funny

try

public static void main(String[] args) {
}

【在 T***B 的大作中提到】
: java hell
v******e
发帖数: 63
13
post your full stacktrace. Which class it can't find?

【在 c**t 的大作中提到】
: in hell.java class, I define it
: import ....;
: public class hell
: {
: private float var1=1;
:
: public hell()
: {
: ...;
: }

1 (共1页)
进入Java版参与讨论
相关主题
ant javac error in eclipse 3.0?为何运行JAVA出现这个错误?
Jar questionanother question driving me crazy...
multiple classes in one file:revisted一个怪异的java 运行问题
Java 求解2java inner class - 初学者问
FFDTRe: weird class definition问个Thread 的问题,java certificate里的
新手求助,急急急!!!help "java.lang.NoSuchMethodError"
请问一个最初级问题Re: 怎样不用main(String args[])输出"hello worl
Tomcat JSP syntax errorClass not found?
相关话题的讨论汇总
话题: hell话题: class话题: public话题: main话题: weird