confused and have a question

If you are new to YDL and have some more or less basic questions.

confused and have a question

Postby shaunvxc » 11 Jun 2010, 19:20

I'm new to the forum so I apologize if this is a question that has been asked before. I became acquainted with linux this past semester at college and decided to run it on my own computer after the semester ended. I have it all installed and everything is working. However, I have run into some issues with my java programs. When compiling object classes that I have written, the compiler issues a warning saying that I failed to declare a static final serialVersion UID of type long. Also, in the classes that use my other object classes, the compiler issues an error for each occurence of these objects saying that the type cannot be resolved. I never experienced this type of problem while programming on the schools computers, so I'm guessing it must have something to do with the compiler (javac's) settings? Does anyone have any idea of what might be causing this problem. And I'm sorry in advance if this is a stupid question. Thank you.
shaunvxc
ydl newbie
ydl newbie
 
Posts: 10
Joined: 11 Jun 2010, 19:12

Re: confused and have a question

Postby ppietro » 11 Jun 2010, 20:06

shaunvxc wrote:I'm new to the forum so I apologize if this is a question that has been asked before. I became acquainted with linux this past semester at college and decided to run it on my own computer after the semester ended. I have it all installed and everything is working. However, I have run into some issues with my java programs. When compiling object classes that I have written, the compiler issues a warning saying that I failed to declare a static final serialVersion UID of type long. Also, in the classes that use my other object classes, the compiler issues an error for each occurence of these objects saying that the type cannot be resolved. I never experienced this type of problem while programming on the schools computers, so I'm guessing it must have something to do with the compiler (javac's) settings? Does anyone have any idea of what might be causing this problem. And I'm sorry in advance if this is a stupid question. Thank you.


You may be running into an issue with the default java compiler in YDL.

To maintain their open source Fedora/Red Hat status, YDL ships with GNU's GCJ by default. It's an open-source, reverse engineered Java system, and it's not 100% compliant.

The first thing I would do is install Sun's Java - but they don't have one for PowerPC. :( So - instead - we use IBM's Java - which is directly licensed from Sun.

There are instructions for installing it here:
viewtopic.php?t=2935

This installs Java for use by Firefox.

In addition, you will have to create symbolic links to javac and java in the /usr/local directory, so that IBM's Java gets invoked first.

Open a terminal window and type the following:

Code: Select all
su
ln -s /opt/ibm/java-ppc-60/jre/bin/java /usr/local/bin
ln -s /opt/ibm/java-ppc-60/jre/bin/javac /usr/local/bin



The first command switches you to root user. You'll need to be root to do this. The next command links the IBM Java command to /usr/local/bin so that the IBM Java command runs before GCJ Java. You may have to do this for other Java commands.

You can always verify which version you're running with the -version command:

i.e.
Code: Select all
java -version


Cheers,
Paul
User avatar
ppietro
Site Admin
Site Admin
 
Posts: 4965
Joined: 13 Sep 2007, 22:18

Re: confused and have a question

Postby shaunvxc » 13 Jun 2010, 17:40

thank you so much it worked great!
shaunvxc
ydl newbie
ydl newbie
 
Posts: 10
Joined: 11 Jun 2010, 19:12


Return to Beginner

Who is online

Users browsing this forum: No registered users and 37 guests