java package help?

P

pc_newbie

i am a newbie of java, can u please tell me how to compile and run this
example, because of "package" keyword, really don't know how to use it.
but no problems with simple java programs.

thanks

/* ViewFile.java */
package com.ora.rmibook.chapter1;


public class ViewFile {
public static void main(String[] arguments) {
(new ViewFileFrame()).show();
}
}

compilation result:

Z:\java\com\ora\rmibook\chapter1\CompressFile.java:6: cannot resolve symbol
symbol : class CompressFileFrame
location: class com.ora.rmibook.chapter1.CompressFile
(new CompressFileFrame()).show();
^
1 error

Tool completed with exit code 1
 
W

winbatch

Basically, the compiler expects that the chapter1 class will be in the
following directory structure underneath your current directory.
..\com\ora\rmibook\chapter1
 
P

pc_newbie

winbatch said:
Basically, the compiler expects that the chapter1 class will be in the
following directory structure underneath your current directory.
.\com\ora\rmibook\chapter1

so how to fix this problem? i am really new to java
i am a newbie of java, can u please tell me how to compile and run this
example, because of "package" keyword, really don't know how to use it.
but no problems with simple java programs.

thanks

/* ViewFile.java */
package com.ora.rmibook.chapter1;


public class ViewFile {
public static void main(String[] arguments) {
(new ViewFileFrame()).show();
}
}

compilation result:

Z:\java\com\ora\rmibook\chapter1\CompressFile.java:6: cannot resolve
symbol

symbol : class CompressFileFrame
location: class com.ora.rmibook.chapter1.CompressFile
(new CompressFileFrame()).show();
^
1 error

Tool completed with exit code 1
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top