aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes eclipse import souce jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "eclipse import souce jar" Watch "eclipse import souce jar" New topic
Author

eclipse import souce jar

reubin haz
Ranch Hand

Joined: May 12, 2005
Posts: 287
I exported a normal standalong Java project inside the eclipse with 'Export all output folders for checked projects' and 'export java source and resources' checked. When I created a new Java project and tried to import that source jar file, the project seems imported correctly, but under that project tree, only packages are shown, but I could't click any one of them to expend, and I could't see the previous source classes. Can somone tell me what's going on here? How do I import an source jar file so that I can see previously save the source classes?

Thanks.


SCJA, SCJP5.0, SCBCD, SCWCD
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

Reubin,
The first step is to see at what step along the way you are losing the java classes. Check if you have the Java classes:
1) In the jar file by unzipping or viewing it using WinZip (or the like.)
2) Check the filesystem for your workspace after you try the import.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
reubin haz
Ranch Hand

Joined: May 12, 2005
Posts: 287
Originally posted by Jeanne Boyarsky:

1) In the jar file by unzipping or viewing it using WinZip (or the like.)


I have successfully exported source files by checking it



2) Check the filesystem for your workspace after you try the import.


I only see class files in the workspace project folder.

When I begin to import, I chose 'Import Class Files...', and then pick up the jar file. I think that's the reason I only got class file, but for the first one 'App Client JAR file' to the last one 'WSIL', I really have no idea which one would be the correct to choose from.

Help please.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

Reubin,
I don't have my Eclipse in front of me, so I'm not sure. As an alternative, you can unzip the jar to the file system and import from the file system
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
Jeanne,

That probably is a workaround, but I find it very hard to accept it. I have to add two jar files, its just not practical (right?) to unzip them and add all the class files. There should be a better way, right?

My two cents...........Thanks.

- m


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

Madhav,
I agree completely. But a workaround is better than nothing for the time being.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: eclipse import souce jar
 
Similar Threads
Eclipse Plug-in and dependencies from other JARs
Compilation bloat
JBuilder to MyEclipse project?
Runnable jar is not including the files
How to import a non-eclipse project into eclipse 3.4 (from exploded war with source)