How to get multifile source code compiling?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 8 of 8

Thread: How to get multifile source code compiling?

  1. #1
    Join Date
    Dec 2006
    Posts
    4

    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

  2. #2
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    The java compiler would need to see ColorEntry.java on its command line - not ColorEntry/java.

  3. #3
    Join Date
    Dec 2006
    Posts
    4
    I did with full file extention but I still got this error message.

  4. #4
    Join Date
    Dec 2006
    Location
    Kerala,India
    Posts
    51
    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

  5. #5
    Join Date
    Dec 2006
    Posts
    4
    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

  6. #6
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    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.

  7. #7
    Join Date
    Dec 2006
    Posts
    4

    Question


    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

  8. #8
    Join Date
    Dec 2004
    Location
    San Bernardino County, California
    Posts
    1,468
    "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.

Similar Threads

  1. display aspx source code in browser
    By Erich Haemmerle in forum ASP.NET
    Replies: 0
    Last Post: 01-15-2002, 03:53 PM
  2. How do you prevent viewing Source Code?
    By Tim Wiegele in forum Web
    Replies: 2
    Last Post: 11-22-2000, 01:17 AM
  3. An Open Source VB?
    By Mark Alexander Bertenshaw in forum Talk to the Editors
    Replies: 20
    Last Post: 07-25-2000, 12:01 PM
  4. Hiding source code
    By Mel in forum Java
    Replies: 1
    Last Post: 07-21-2000, 04:11 AM
  5. asp code in source
    By tamara in forum ASP.NET
    Replies: 1
    Last Post: 03-16-2000, 09:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center