Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

How to get multifile source code compiling?

I am a complete newbie.
I am trying to get a multifile source code compiling using the authors make file. The in directory c:\yetitext\ ColorEntry/java

Exception in thread "main" java.lang.NoClassDefFoundError: ColorEntry/java
What am I doing wrong?

Here is the tool I trying to get to compile.

Texture tool : http://www.geocities.com/rtb7/files/gp32/yeti_tex.zip
(Java tool to generate compatible .RAW and .PAL files from jpg/gif/png images)

Thank you for time!
Jason Rivard
[530 byte] By [bmnb123] at [2007-11-11 10:00:19]
# 1 Re: How to get multifile source code compiling?
The java compiler would need to see ColorEntry.java on its command line - not ColorEntry/java.
nspils at 2007-11-11 22:32:01 >
# 2 Re: How to get multifile source code compiling?
I did with full file extention but I still got this error message.
bmnb123 at 2007-11-11 22:33:12 >
# 3 Re: How to get multifile source code compiling?
I have extracted the source and it compiled fine for me
Following are the steps i have followed

extract the zip file into folder c:\yetitext\
there are five .java files available in that folder
cd c:\yetitext\
javac *.java

still it is not compiling try giving "javac -cp .\ *.java"
if it is successful, then add ".\" to your CLASSPATH
sudheerprem at 2007-11-11 22:34:05 >
# 4 Re: How to get multifile source code compiling?
I tried compiling it Sun NetBeans IDE 5.5 I am using command prompt not the GUI.
When I try to type in javac I get an error message it not supported I can get java to work at the prompt t am I using the wrong compiler? So what is the difference between java and javac, and where can I get a javac compatible compiler?

Jason
bmnb123 at 2007-11-11 22:35:04 >
# 5 Re: How to get multifile source code compiling?
if you have installed NetBeans you most likely also installed the Java Developer Kit ... and you therefore have the Java compiler, which is javac. java will start the Java Virtual Machine and call the named class file to execute it. It is probably installed (on a Windows machine) in C:\Program Files\Java\jdk1.x.x_xx\bin. Do a search for a file with javac as a part of its name.
nspils at 2007-11-11 22:36:08 >
# 6 Re: How to get multifile source code compiling?
:eek:
It was a mistake I made in setting up path in my variable I now has a new problem I get a new problem when I compile the files I get the message

Some imput files used unchecked or unsafe operations

When I try to run these files like this

Java ColorEntry.class
I get
Exception in thread main java.lang.NoClassDefFoundError: ClorrEntry/class

What am I doing wrong?
Jason
bmnb123 at 2007-11-11 22:37:13 >
# 7 Re: How to get multifile source code compiling?
"Some input files used unchecked or unsafe operations" - sounds like you are using a data structure which can be "parameterized" [made "Generic"] by declaring your structure like List<String>, or HashList<Int, Hash Node>, or Vector<Double> or other such manner. It is a warning intended to be a "help" for you to remind you that the compiler can do type-checking for you if you tell it what your intent is.

When you run the file don't add the "class" extension on the command line. Call the JVM by using java ColorEntry - no file extension on the name of the class.
nspils at 2007-11-11 22:38:17 >