Eclipse & Java SWING class Failure

Discuss software development issues here.

Re: Eclipse & Java SWING class Failure

Postby ppietro » 03 Jan 2009, 19:04

Taellik wrote:Does it matter any how I was logged in when installing the Java 6 from IBM ?

I double-clicked/installed the downloaded rpm file while logged in under a user account not the root user / su login.


Yes - it matters. You should be root to install that - but it should prompt you for that.

What did you install? The name of the file you double-clicked on should be:
ibm-java-ppc-jre-6.0-3.0.ppc.rpm

I got Eclipse installed on a fresh 6.1 - I have a spare hard drive for this. My normal YDL is a weird custom hybrid of 6.0 & 6.1 features. Trying a couple of things right now. BRB.

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

Re: Eclipse & Java SWING class Failure

Postby Taellik » 03 Jan 2009, 21:10

What did you install? The name of the file you double-clicked on should be:
ibm-java-ppc-jre-6.0-3.0.ppc.rpm


Yep..that's what I got when I did the download from IBM. It was saved to the desktop, and then I doubled-clicked it and the installation began.

Taellik
http://www.geocities.com/chainpunch
PS3 80GB, FW 3.21
EyeToy II
NO YDL 6.2 due to 3.21 firmware upgrade
PSP
PSP Go! Cam
User avatar
Taellik
ydl addict
ydl addict
 
Posts: 195
Joined: 29 Dec 2008, 12:41
Location: Raleigh NC and God's Favorite Nation --> THE United States of America

Re: Eclipse & Java SWING class Failure

Postby ppietro » 03 Jan 2009, 21:22

Hiya!

Okay - I've been experimenting with the Eclipse that's distributed with 6.1.

It doesn't seem to work with Java correctly.

I can't get any of the IBM Javas to load it at all. And when I use GCJ, I can't create a Java project. I suspect this is why you can't use Swing libraries.

Are you able to start a Java project? Or are you using a generic project?

It shouldn't be this hard.

I've gotta run some errands now - I'll pick this up again later.

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

Re: Eclipse & Java SWING class Failure

Postby ppietro » 03 Jan 2009, 22:01

ppietro wrote:Okay - I've been experimenting with the Eclipse that's distributed with 6.1.
It doesn't seem to work with Java correctly.

I can't get any of the IBM Javas to load it at all. And when I use GCJ, I can't create a Java project. I suspect this is why you can't use Swing libraries.

Are you able to start a Java project? Or are you using a generic project?

It shouldn't be this hard.


I flipped back to my mostly 6.0 installation. (I'm using a 6.1 kernel so I can get ps3vram - other than that - it's stock 6.0). Eclipse works fine with IBM Java. (5.0 in this case).

With my YDL 6.0 installation of Eclipse 3.2, I can create a Java project - no problem. It works the way I remember Eclipse working.

Do you have a sample swing app I can try in 6.0? I'll admit - I'm a lazy Swing coder - NetBeans autogenerates the code for me. :D

Note that I did not customize the Eclipse installation in either version of YDL - they're installed using the default Add/Remove software pick.

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

Re: Eclipse & Java SWING class Failure

Postby Taellik » 04 Jan 2009, 01:04

I flipped back to my mostly 6.0 installation. (I'm using a 6.1 kernel so I can get ps3vram - other than that - it's stock 6.0). Eclipse works fine with IBM Java. (5.0 in this case).


Hiya Paul,

My Eclipse now crashes on startup since installing the IBM Java, Eclipse won't load to do anything with it.. Used to work with the original gcc java that was pre-installed along with Eclipse version 3.2

Here's the source java code for a "Hello World" java program that I was trying to get to run :
---------------------------------------------------------------------------------------------------------------------
import javax.swing.JOptionPane; // import class JOptionPane

public class Dialog1
{
public static void main( String args[] )
{
// display a dialog with a message
JOptionPane,showMessageDialog( null, "Welcome\nto\nJava" );
} // end main
} // end class Dialog1
--------------------------------------------------------------------------------------------------------------------

Taellik
http://www.geocities.com/chainpunch
PS3 80GB, FW 3.21
EyeToy II
NO YDL 6.2 due to 3.21 firmware upgrade
PSP
PSP Go! Cam
User avatar
Taellik
ydl addict
ydl addict
 
Posts: 195
Joined: 29 Dec 2008, 12:41
Location: Raleigh NC and God's Favorite Nation --> THE United States of America

Re: Eclipse & Java SWING class Failure

Postby Taellik » 04 Jan 2009, 01:18

Hi Paul,

There is something funky going on with Eclipse since installing IBM Java. I went into Terminal and at the prompt executed the java command [greg@localhost]$ java Dialog1 to run the Dialog1 java class created from the sample code and it ran fine ! :D

The GUI message box showed up with the literal text in it as it was supposed to.

Guessing my next troubleshooting step is to do the Add/Remove step to get rid of the current Eclipse and then re-install it and see if that resolves whatever it is that is causing the grief !!!
PS3 80GB, FW 3.21
EyeToy II
NO YDL 6.2 due to 3.21 firmware upgrade
PSP
PSP Go! Cam
User avatar
Taellik
ydl addict
ydl addict
 
Posts: 195
Joined: 29 Dec 2008, 12:41
Location: Raleigh NC and God's Favorite Nation --> THE United States of America

Re: Eclipse & Java SWING class Failure

Postby Taellik » 04 Jan 2009, 01:38

Well, the uninstall / install didn't work.

Eclipse is still crashing on startup. :roll:

Taellik
http://www.geocities.com/chainpunch
PS3 80GB, FW 3.21
EyeToy II
NO YDL 6.2 due to 3.21 firmware upgrade
PSP
PSP Go! Cam
User avatar
Taellik
ydl addict
ydl addict
 
Posts: 195
Joined: 29 Dec 2008, 12:41
Location: Raleigh NC and God's Favorite Nation --> THE United States of America

Re: Eclipse & Java SWING class Failure

Postby ppietro » 04 Jan 2009, 07:38

Taellik wrote:Guessing my next troubleshooting step is to do the Add/Remove step to get rid of the current Eclipse and then re-install it and see if that resolves whatever it is that is causing the grief !!!


It won't help. I tried all of the IBM Javas with Eclipse on YDL 6.1, installing and uninstalling Eclipse multiple times. But - your Eclipse is still okay.

What you need to do is go ahead and remove the symbolic link you created. As root, issue the following command:

rm /usr/local/bin/java

After you do this - you may have to log out and log in for all the running sessions to pick up the change - but you should be able to start Eclipse using GCJ again after this.

You don't have to remove the IBM Java either - GCJ and IBM Javas can co-exist. It's a feature of Java. :D

Unfortunately, your code still won't work though. It's my preliminary conclusion that Eclipse is not configured correctly for YDL 6.1.

I'll try your code on my YDL 6.0 installation and let you know what happens.

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

Re: Eclipse & Java SWING class Failure

Postby ppietro » 04 Jan 2009, 07:39

Taellik wrote:Well, the uninstall / install didn't work.

Eclipse is still crashing on startup. :roll:

Taellik
http://www.geocities.com/chainpunch


See my other post. That should get you working again.

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

Re: Eclipse & Java SWING class Failure

Postby ppietro » 04 Jan 2009, 08:15

Well - Eclipse 3,2 worked great for YDL 6.0, using IBM Java 5.0.

I attached the Jar file I created using your code. I had to change the extension from .jar to .zip to upload it.
swing_test.zip
(734 Bytes) Downloaded 773 times


(For those of you following along at home, you can try it too.
mv swing_test.zip swing_test.jar
java -jar swing_test.jar
)

You can run the JAR with the IBM Java JRE, but it doesn't seem to work with GCJ, which is kinda what we thought at the top of this post.

I'll pop my 6.1 hard drive back in and see if I can get anything to work. Stay tuned.

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

Re: Eclipse & Java SWING class Failure

Postby ppietro » 04 Jan 2009, 08:38

Taellik wrote:I went into Terminal and at the prompt executed the java command [greg@localhost]$ java Dialog1 to run the Dialog1 java class created from the sample code and it ran fine ! :D


That's because you're running the IBM Java after creating the symbolic link. My guess is that after you remove the symbolic link, it won't work anymore.

So - here's the summary.

GCJ doesn't handle swing correctly.

IBM Java does.

Normally, Eclipse works with either Java. For some reason, Eclipse doesn't work right under 6.1: It partially works with GCJ and doesn't start with IBM Java.

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

Re: Eclipse & Java SWING class Failure

Postby Taellik » 04 Jan 2009, 14:32

What you need to do is go ahead and remove the symbolic link you created. As root, issue the following command:

rm /usr/local/bin/java

After you do this - you may have to log out and log in for all the running sessions to pick up the change - but you should be able to start Eclipse using GCJ again after this.


I did the symbolic remove and rebooted the PS3...Eclipse is still crashing on startup.

which java shows :
/usr/bin/java

java -version shows :
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20071124 ( Red hat 4.1.2-42)


Taellik
Http://www.geocities.com/chainpunch
PS3 80GB, FW 3.21
EyeToy II
NO YDL 6.2 due to 3.21 firmware upgrade
PSP
PSP Go! Cam
User avatar
Taellik
ydl addict
ydl addict
 
Posts: 195
Joined: 29 Dec 2008, 12:41
Location: Raleigh NC and God's Favorite Nation --> THE United States of America

Re: Eclipse & Java SWING class Failure

Postby Taellik » 04 Jan 2009, 16:02

Well, here's my C.S.I. summation take on this since it's started last week . . .

1) Eclipse is broken...can't be fixed by uninstall / install. :(

2) The defacto java compiler supplied in YDL is out-of date. Any software development language in the year 2009 must support GUI development! The version supplied with YDL fails miserably with this. :evil:

3) I have gone back to using IBM's java with the necessary symbolic link to use writing java programs with on the PS3 with an alternative source editor. :D

4) I have had to abandon YDL's Eclipse version as my source editor-of-choice due to it instability and again, old release version ( 3.2 )


Paul, thanks for all your assistance and expertise thru this, but I think the problem really lies with Terrasoft and their YDL. Hope they lurk here on the board and take note of problems the users are encountering with their product. :D

Taellik
http://www.geocities.com/chainpunch
PS3 80GB, FW 3.21
EyeToy II
NO YDL 6.2 due to 3.21 firmware upgrade
PSP
PSP Go! Cam
User avatar
Taellik
ydl addict
ydl addict
 
Posts: 195
Joined: 29 Dec 2008, 12:41
Location: Raleigh NC and God's Favorite Nation --> THE United States of America

Re: Eclipse & Java SWING class Failure

Postby ppietro » 04 Jan 2009, 18:20

Taellik wrote:I did the symbolic remove and rebooted the PS3...Eclipse is still crashing on startup.


You'll have to reset Eclipse's setting files then. Luckily, that's easy.

Do this:
rm ~/.eclipse

(Note the .)

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

Re: Eclipse & Java SWING class Failure

Postby ppietro » 04 Jan 2009, 18:26

Taellik wrote:Well, here's my C.S.I. summation take on this since it's started last week . . .

1) Eclipse is broken...can't be fixed by uninstall / install. :(


Not broken - I think your settings file is corrupt - see my previous post. Still - it doesn't matter if you can't use it with IBM's Java for what you want it to do.

2) The defacto java compiler supplied in YDL is out-of date. Any software development language in the year 2009 must support GUI development! The version supplied with YDL fails miserably with this. :evil:


It's not out of date - it's just not Java. Since YDL uses only open source code - they use the open source version of Java - GCJ. That's why we replace it with IBM's Java. GCJ is known to have issues with standard Java compatibility and speed.

3) I have gone back to using IBM's java with the necessary symbolic link to use writing java programs with on the PS3 with an alternative source editor. :D


Probably for the best. IBM's Java might even be better than Sun's Java. It's definitely a good Java. You may have to add an occasional Sun library - but that's easy to do.

4) I have had to abandon YDL's Eclipse version as my source editor-of-choice due to it instability and again, old release version ( 3.2 )


It works fine in 6.0, though, with the same version. ;) Weird, huh? I still think I can figure out how to get it to work with 6.1 - but that might be a loser's game.

Paul, thanks for all your assistance and expertise thru this, but I think the problem really lies with Terrasoft and their YDL. Hope they lurk here on the board and take note of problems the users are encountering with their product. :D


No problem. :D

As for the YDL engineers monitoring this forum, they kinda do - but the best way to reach them about issues is via their bug tracking system - bugzilla:
http://bugzilla.fixstars.com/

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

PreviousNext

Return to Software Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron