• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

eclipse import souce jar

 
reubin haz
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34860
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
reubin haz
Ranch Hand
Posts: 287
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author & internet detective
Marshal
Posts: 34860
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34860
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Madhav,
I agree completely. But a workaround is better than nothing for the time being.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic