Results 1 to 9 of 9
  1. #1
    atef201080 is offline Member
    Join Date
    Dec 2012
    Posts
    8
    Rep Power
    0

    Default Compile single java file

    hi,
    i need to know how to compile this file to .class to use it at a .jar file
    it has import at the file head so its giving error is there any way to compile it without the other imported files ?
    [Java] d.java - Pastebin.com

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,442
    Rep Power
    18

    Default Re: Compile single java file

    What error are you getting?
    Few people will go to a download link...
    Please do not ask for code as refusal often offends.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Compile single java file

    Moved from Advanced Java. Please limit beginner questions to this section.

    All dependencies need to be available on both the compile-time and runtime classpath. You accomplish this with the -cp (or -classpath) flag to the javac/java executables.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  4. #4
    atef201080 is offline Member
    Join Date
    Dec 2012
    Posts
    8
    Rep Power
    0

    Default Re: Compile single java file

    Quote Originally Posted by Tolls View Post
    What error are you getting?
    Few people will go to a download link...
    i get 59 errors due to imports
    and i need to compile only this file
    i need somehow to ignore the errors and continue compiling

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Compile single java file

    Quote Originally Posted by atef201080 View Post
    i need somehow to ignore the errors and continue compiling
    No, you need to resolve the compile time errors.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  6. #6
    atef201080 is offline Member
    Join Date
    Dec 2012
    Posts
    8
    Rep Power
    0

    Default Re: Compile single java file

    hmmmmm, ok.. so it won't compiled :D

  7. #7
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default Re: Compile single java file

    Quote Originally Posted by atef201080 View Post
    hmmmmm, ok.. so it won't compiled :D
    Agree, that even if you could "ignore the errors" and compile anyway, you wouldn't want to do that, since there's no way the program could run. A bigger problem is that you've got 59 errors to start with which suggests that you're going about programming all wrong. If you aren't or can't use an IDE, you should compile your code often, and you should not add new code until all compilation errors are fixed. You may need to start over with your program.

    If you still need our help, consider posting code and errors.

  8. #8
    doWhile is offline Moderator
    Join Date
    Jul 2010
    Location
    California
    Posts
    1,642
    Rep Power
    6

    Default Re: Compile single java file

    Given the code is obfuscated, and given your other thread (eg J2me help ), I'd guess this is stolen code, de-compiled without permission, quite possibly violating a license agreement. You have yet to convince me otherwise, so why not get permission? Why not contact the author? Why not do this the legal way?

  9. #9
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

    Default Re: Compile single java file

    Member atef201080 has been banned for a year for misuse of the forum.

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Similar Threads

  1. Replies: 5
    Last Post: 03-26-2012, 07:11 PM
  2. Replies: 7
    Last Post: 08-29-2011, 06:35 PM
  3. How to Run four source file in a single package
    By krishanu in forum New To Java
    Replies: 0
    Last Post: 05-25-2011, 01:22 PM
  4. start/compile java from .bat batch file
    By emosms in forum New To Java
    Replies: 2
    Last Post: 03-23-2011, 04:34 PM
  5. Help with Java Compile File
    By baltimore in forum New To Java
    Replies: 1
    Last Post: 08-06-2007, 07:48 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
  •