Results 1 to 7 of 7
- 09-10-2009, 09:21 PM #1
Member
- Join Date
- Sep 2009
- Posts
- 4
- Rep Power
- 0
cannot resolve com.sun.java import - build path problem?
I'm new to java programming, and I've heard that what I'm trying to do is supposed to be easy, but I'm stuck.
I'm trying to move a bunch of code from a windows machine to a linux machine. Prior to moving it, everything worked and there were no errors. I'm moving the source code for a big, proprietary, undocumented mess called IVES that relies on jfreechart and a number of other libraries. I was told that all I need to do is change the build path, but I must have done something wrong, because I'm getting 2 errors I can't shake.
Both errors say "the import com.sun.java cannot be resolved" and occur in the import statement section of two different classes.
is the code where the error occurs in one of the files.Java Code:import java.awt.*; import com.sun.java.swing.*; import ives.sim.*;
I zipped my entire workspace from the windows machine, switched machines and unzipped it, then the import button to get things into eclipse.
I changed the build path through build path -> configure build path .
Under the source tab, the only source folder is ives_test3/src. All the .java files are in subdirectories there, and the output goes to ives_test3/bin. Under the projects tab, it depends on jfreechart, which seems to be working ok, and under libraries, I've given it access to all the .jar files i had from the windows side.
Any ideas on how to fix this? Am I missing some option on the build path?
thanks
- 09-10-2009, 09:41 PM #2
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
You should not be using packages in com.sun.* We are not supposed to know about them.
Are you sure it was like that in the Linux version?
- 09-10-2009, 09:47 PM #3
Member
- Join Date
- Sep 2009
- Posts
- 4
- Rep Power
- 0
Unfortunately, yes, it's definitely the same code as was on the windows machine. This library (I'm not quite sure if that is the right word) was originally developed in the mid 1990's for agent based modeling before there were better tools, and now I'm stuck with it.
- 09-10-2009, 09:52 PM #4
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
What jdk version was used on Linux and which version are you using on the Windows machine?
- 09-10-2009, 09:57 PM #5
Member
- Join Date
- Sep 2009
- Posts
- 4
- Rep Power
- 0
I don't have access to the windows machine anymore, but I was using the version of eclipse and java that I downloaded in about May.
On the linux machine I'm using now, the Eclipse SDK is 3.2.2 I'm not sure how to find the jdk.
- 09-10-2009, 10:09 PM #6
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
I may have missed something here. Did you say that you got it working on one Windows machine and then moved it to another Windows machine where it's now not working?
- 09-11-2009, 12:34 AM #7
Member
- Join Date
- Sep 2009
- Posts
- 4
- Rep Power
- 0
Similar Threads
-
Import java.io.* problem
By DD70 in forum New To JavaReplies: 3Last Post: 07-28-2009, 10:45 PM -
Build Instances problem
By leapinlizard in forum New To JavaReplies: 4Last Post: 04-21-2009, 10:17 AM -
[SOLVED] SVN project's build path problem
By er_zhong in forum EclipseReplies: 0Last Post: 04-14-2009, 04:03 PM -
hai friends i got the Exception in the following java program , how do i resolve it ?
By burepallisri in forum Advanced JavaReplies: 3Last Post: 04-07-2008, 05:56 PM -
problem with PATH
By creativehacker in forum New To JavaReplies: 4Last Post: 07-11-2007, 02:54 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks