Results 1 to 9 of 9

Thread: Compiling error

  1. #1
    efth is offline Member
    Join Date
    Mar 2011
    Posts
    15
    Rep Power
    0

    Default [SOLVED] Compiling error

    As far as I understand when you decompile an excisting .class file some errors are bound to be made. So there will be problems compiling at once. At leas thats the case for me. So I'm going to fix all that before I start editing anything. The firts error I get is:

    Java Code:
    /Filepath/File.java:3: package com.jcraft.jogg does not exist
    /*     */ import com.jcraft.jogg.Buffer;
                                     ^
    But the thing is com/jcraft/jogg is there, even buffer.class.

    I'm very new, I'm sure this isn't a big thing so would someone who knows please explain?

    EDIT:
    Also what is the 3 after the filepath?
    Last edited by efth; 04-10-2011 at 05:15 PM.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,732
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by efth View Post
    As far as I understand when you decompile an excisting .class file some errors are bound to be made. So there will be problems compiling at once. At leas thats the case for me. So I'm going to fix all that before I start editing anything. The firts error I get is:

    Java Code:
    /Filepath/File.java:3: package com.jcraft.jogg does not exist
    /*     */ import com.jcraft.jogg.Buffer;
                                     ^
    But the thing is com/jcraft/jogg is there, even buffer.class.

    I'm very new, I'm sure this isn't a big thing so would someone who knows please explain?

    EDIT:
    Also what is the 3 after the filepath?
    Are you talking about 'Buffer' (with a capital B) or 'buffer' (a lowercase 'b')? The 3 in the error message is the line number of the offending line.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    efth is offline Member
    Join Date
    Mar 2011
    Posts
    15
    Rep Power
    0

    Default Thanks for answering!

    Thanks for answering!
    I actually figured out the 3 myself before you answerd:)
    But I mean Buffer, with capital B

  4. #4
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,732
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by efth View Post
    Thanks for answering!
    I actually figured out the 3 myself before you answerd:)
    But I mean Buffer, with capital B
    If you have your capitalization correct, your problem is a classpath issue, i.e. your compiler can't find the class file. Type "javac" without any arguments and see how you can specify a value for your class path.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  5. #5
    efth is offline Member
    Join Date
    Mar 2011
    Posts
    15
    Rep Power
    0

    Default

    Please excuse my idiocy but I don't understand :(
    What do you mean by specify the value of the class path?

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,732
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by efth View Post
    Please excuse my idiocy but I don't understand :(
    What do you mean by specify the value of the class path?
    Did you read what the compiler (briefly) explained about the classpath? Also the Oracle Java tutorials explain (in detail) what that classpath issue is all about. You can't compile any substantial amount of code without knowing what that classpath thing is all about.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  7. #7
    efth is offline Member
    Join Date
    Mar 2011
    Posts
    15
    Rep Power
    0

    Default

    I checked the Oracle tutorials but it really wasn't anything new.
    Let's get clear on something, when you say the compiler you mean the tool I use the compile the .Java file, it's some tutorial or something I should know of that is called the compiler?
    I really don't understand what you mean by specify a value for the class path.

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,732
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by efth View Post
    I checked the Oracle tutorials but it really wasn't anything new.
    Let's get clear on something, when you say the compiler you mean the tool I use the compile the .Java file, it's some tutorial or something I should know of that is called the compiler?
    I really don't understand what you mean by specify a value for the class path.
    You really should read some elementary tutorials first before you attempt to compile a bunch of .java source files. The classpath variable value is a list of directories and .jar files that tell the Java compiler (javac) where it can find compiled Java files (the .class files). There's also an option that tell the compiler where it can find Java source files (the .java files).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  9. #9
    efth is offline Member
    Join Date
    Mar 2011
    Posts
    15
    Rep Power
    0

    Default

    Thank you for taken the time to help but this is solved now:)
    It's really embarrassing but I had but accident left a part of the old script in there that screwed it up. Now it compiles without any problems and thanks a bunch ;)

Similar Threads

  1. compiling error
    By Adeline in forum AWT / Swing
    Replies: 3
    Last Post: 12-03-2010, 08:19 PM
  2. compiling error
    By Adeline in forum AWT / Swing
    Replies: 3
    Last Post: 12-03-2010, 08:18 PM
  3. Compiling error
    By robbierut in forum Java Applets
    Replies: 4
    Last Post: 11-24-2010, 06:00 PM
  4. Having error while compiling
    By Kodeee in forum New To Java
    Replies: 12
    Last Post: 03-17-2009, 12:08 PM
  5. Error during compiling
    By boy22 in forum New To Java
    Replies: 2
    Last Post: 08-03-2007, 03:42 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
  •