Weird stuff with Java and Sun JDK 7

Hi, I'm a Java developer and new (almost 100% satisfied) OpenSuse user.


I'm using the latest version of Eclipse Indigo (Indigo Service Release
2) and the latest Sun JDK 7 (u3).  Everything works perfectly except
when I try to run my java projects : it takes more than one minute to
launch the app when I takes only 3 seconds to launch to same apps on
Windows under the same conditions (same Eclipse IDE and JDK). 

I didn't post this thread in the -Programming forum- because it doesn't
seem to be an Eclipse specific issue. First of all, because it happens
when I try to run other applications like JDownloader with openJDK 6 or
Sun JDK 7. Secondly, if I do a use -update-alternatives --config java-
to set the default JVM to Sun JDK 7 and then try to run my .jar with the
console, I have the same problem.   

It is very weird issue : all the java applications (my apps and third
party applications) seems to freeze two times during 30 seconds in a
specific section or the code. They seem to be all related to the
interface. For instance, setting the look and feel, setting the font of
a tabbed pane or selecting and index in a comboBox. BUT, if you
deactivate the section of the code that seems to slow the apps, it will
freeze again 30 seconds in another part of a code !!! You can do that
several times but it will _always_ take 60 seconds to launch the program
!!! 

I really drives me crazy :Plol!:'(. As I said, these apps run perfectly
well on Windows under the same conditions (IDE, JDK). I'm starting to
think that I'm doomed to use Windows as dual-boot during all my life
just because of trivial problems.


-- 
sayec
------------------------------------------------------------------------



0
sayec
4/9/2012 11:16:02 AM
opensuse.org.help.applications 21533 articles. 1 followers. Follow

3 Replies
503 Views

Similar Articles

[PageSpeed] 58

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Disclaimer: You're undoubtedly better at Java than I am, so if I ask
something stupid please forgive me.

Have you tried a 'Hello World' Java app, something that is just using
System.out.println() essentially?  Maybe then a GUI/X11 version of the
same?  Java has a reputation for performance issues, but Java gurus I've
talked to say most of the real performance hits (though nothing like
you're seeing) are related to the graphical parts of applications and
that the base Java pieces are fast, which meshes well with my
experience.  While what you're describing (thirty-second delays) should
never happen, I wonder how hard it would be for you to work from
something that goes quickly ('Hello World' at the command line should be
pretty quick) to adding pieces that eventually simulate the problem.

As another option, is there a JAR you can post somewhere for others to
try?  Which version/architecture of OpenSUSE?  FWIW, I've installed
JDownloader (just now) on my OpenSUSE 12.1 x86_64 system which still has
the OpenJDK as the default Java; load time (after install and initial
setup) is around six seconds.

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.18 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJPgtigAAoJEF+XTK08PnB5cOEQAIYFg8X0r01AVOcV1id5WJVY
dEHBCyfQ8XtmuqAjKQK4auwbNeFlu3vXIzqRGmmOKxiavSFV7A90FbpepkxA4bkL
x+7EBCcUcg8R8lvCMqIOwbkErEupr+2ahPfAvb37jEuwNKzhs04UCttTqWJwGzKL
ETdH58gCcN4RLTaPm0hjhl30lAVll78hBPGeVNB3vfhRa/Wre+YGrJFOiy7c+fQ8
Ri0yYnMMNrnDY+YBKaEavQeOGPlpcY5uI+LADU6teHL9/37oMrjz8mk+Ot3vQSY2
0V+HN0qta+x+s3YctVf04216RC1DSxxDCqozve4LgkbDbumKOrPaNOjL1ZKFyhhY
KqoW0OaaSoM+zK3/UZ3fUwVzmNvu/k9qAEpPEEl919uJUE5TU6bt+wqs9u2pzs2x
8YfXapwD+EEnWKO4WoLweZAL6W0PSj8BoL5+A+pnBHDBJ3TSjVp5gJjWyEavJU88
xYbifuT1AiuGLSwwOtVNmSceWjBrBLRUTgtLz9AGijUHqagBFuKYv9kf3+l8z8/C
LUdC2CIZ3109bsqu3WtfvbvKx40thO5pMVuvw5mavgSJDyQQloxKnIdvbkxGntFd
i056JCjh1aEaRlHjigieHPsvmgJVoX5D1oV3Ote56Iaaq6vkTGdPdQ1ghgsdvhjf
q0OfmTHq1GDxhT6MtMCa
=7eA6
-----END PGP SIGNATURE-----
0
ab
4/9/2012 12:40:00 PM
Where did you get the Sun-Java packages from?


-- 
- Athlon X6 3.6 GHz, 16 GB DDR3, 30 GB SSD, 3 TB of disks, GT540,
openSUSE 11.3 x86_64 + KDE 4.7 + GNOME 3
- ASUS K70IO laptop, GT120M-1GB, 4 GB, 64 GB SSD,  openSUSE Tumbleweed
+ KDE4.8 + GNOME3

ANYTHING THAT CAN GO WRONG.... WILL TEACH US

http://en.opensuse.org/User:Knurpht
http://nl.opensuse.org/Gebruiker:Knurpht
------------------------------------------------------------------------
Knurpht's Profile: http://forums.opensuse.org/member.php?userid=783
View this thread: http://forums.opensuse.org/showthread.php?t=474241

0
Knurpht
4/9/2012 1:36:03 PM
I'm working with an OpenSuse 12.1 x86_64, installed a few days ago and
updated without problem with zypper. Everything seems to work fine. I
got the JDK 7 package directly from Oracle official page as I didn't
find any specific package for openSuse in the repositories (official and
packman). Not even in this one : 'Index of
/repositories/Java:/packages/openSUSE_12.1'
(http://tinyurl.com/83ufqfv)

If I make a program with a simple Hello World, it runs instantly. In
fact, my program runs at a normal speed. The problem is it just freeze
30secs on some trivials command lines that perfectly works under the
same conditions on Windows. For example :  
- UIManager.setLookAndFeel( -choosing a look and feel here-)   
- tabbedPane.setForegroundAt(0,new Color(85,17,79));                   
- choosing a color for the first element of a tabbedPane -
- textFieldREF = new JTextField("0.0000");           
- dayOAC.setSelectedIndex(-some index-);		                             
-setting a selected index for a comboBox-          

I deactivated these command lines, but the program always freeze
somewhere else. The odd thing is that no matter what I do it will always
freeze 60sec. I have never seen that in my life. 

About JDownloader. First, I thought it was also freezing on some kind
of interface related issue. But now I can't be really sure of it: 

10 09/04/12 15:06:29 - FINER [jd.JDClassLoader(<init>)] -> Look and
Feel JAR loaded:
/home/laptop/bin/JDownloader/libs/laf/syntheticaSimple2D.jar
- freeze one minute here -
10 09/04/12 15:07:35 - FINER [jd.config.DatabaseConnector(<init>)] ->
Loading database


-- 
sayec
------------------------------------------------------------------------
sayec's Profile: http://forums.opensuse.org/member.php?userid=67272
View this thread: http://forums.opensuse.org/showthread.php?t=474241

0
sayec
4/9/2012 2:36:02 PM
Reply: