Results 1 to 7 of 7
  1. #1
    bizso is offline Member
    Join Date
    Mar 2009
    Posts
    5
    Rep Power
    0

    Default importing class files

    Hi,
    I'm new to Eclipse and need help.

    I have been given a folder with 5 classes and 1 class with a main method.
    My first question is: Is there a way to import these classes into eclipse and run the main class with main method? I don't have any java files.

    What I have to do is basically write a java source file for the main class, but without decompiling it.
    My second question: Is there a way to import the 5 classes to my workspace so that I can use them when I recreate the java file for the main class?

    I have tried searching everywhere, but could not find a solution that worked.
    Thanks

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

    Default

    Please don't cross-post the same question in multiple fora. You wouldn't like it very much if you were a volunteer, worked to solve a question only to find that it's been solved hours ago in a cross-post.

  3. #3
    bizso is offline Member
    Join Date
    Mar 2009
    Posts
    5
    Rep Power
    0

    Default

    Quote Originally Posted by Fubarable View Post
    Please don't cross-post the same question in multiple fora. You wouldn't like it very much if you were a volunteer, worked to solve a question only to find that it's been solved hours ago in a cross-post.
    "AND... This is a Java forum, not the Eclipse Help Desk... Go ask in an Eclipse forum... You're likely to get better answers, and if this forum ever started to act as an "all IDE's helpdesk" then we'd buried in irrelvant gumby posts within days... so we actively try to resist the temptation to help with IDE questions... comprende?

    There's a place for this, and a place for that... programmers tend to be anal about stuff like this and that."

    After this reply at sun forums, I thought that I might have better luck here...

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

    Default

    then at least post a link to your other post. that's not asking too much I should think.

  5. #5
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default

    Yes, ... the Sun forums tend to be a bit more... hhmmm ... harsh and direct. I'm sure that you will find the Java forums to be nicer, but there are certain rules to follow and one of them is to not cross post across different forums. If you find that you have the need to do it, please let everybody know, put a link to the other post and explain why.
    As for your request, I really don't have an idea. Hopefully somebody else can help you.

    Luck,
    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

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

    Default

    Myself, I don't fully understand what he's trying to do either here or in the sun fora. I think that the question could be rephrased with a lot more detail.

  7. #7
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default Mission Impossible IV

    What I understood was:
    1) Recreate the main class without decompiling the file. If there is an understanding of the other classes and their methods, this should be no problem.
    2) Import the other class files into other java programs. I don't know how he can do that if he doesn't know what the methods they contain, unless he has a javadoc that describes thoses classes and their methods.

    Seems impossible ... but I've never tried it, so I wouldn't be an expert on the subject.

    Luck,
    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

Similar Threads

  1. Importing custom class
    By BigRed in forum Eclipse
    Replies: 2
    Last Post: 02-14-2009, 02:12 PM
  2. importing .java files into eclipse
    By nickl2002 in forum Eclipse
    Replies: 1
    Last Post: 01-18-2009, 11:06 PM
  3. conversion of java .class files to .java files
    By kotturupraveen in forum New To Java
    Replies: 2
    Last Post: 06-09-2008, 12:58 PM
  4. Importing a Custom Class
    By jfredrickson in forum New To Java
    Replies: 3
    Last Post: 07-11-2007, 11:23 AM
  5. Exporting/Importing JAR files
    By JavaForums in forum Eclipse
    Replies: 0
    Last Post: 04-26-2007, 10:15 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
  •