CPU/JVM/JBoss 7 slows down over time
I’m experiencing performance slow down on JBoss 7.1.1 Final. I wrote simple program that demostrates this behavior. I generate an array of 100,000 of random integers and run bubble sort on it. @Model public class PerformanceTest { public void proceed() { long now = System.currentTimeMillis(); int[] arr = new int[100000]; for(int i = 0; i < arr.length; i++) { arr[i] = (int) (Math.random() * 200000); } long now2 = System.currentTimeMillis(); System.out.println((now2 – now) + “ms [...]
Continue Reading »Error in invoking javac – Debian Squeeze
I am trying to solve this issue: PWC6345: There is an error in invoking javac. A full JDK (not just JRE) is required We have a third-party Java app that uses a Jetty server but looks like either the JDK is missing or not reachable where it is located? In /usr/bin I see: java javaws jexec No javac so probably no JDK installed. The box is Debian “Squeeze” with the following: java -version java version [...]
Continue Reading »What’s blocking my program from sending email?
I have a Java program which uses javax.mail to send an SMTP message. This program WORKS FINE on a Linux box, I want to emphasize that beforehand. When I try this same code on my Windows 7 x64 box, I get this error: send failed, exception: javax.mail.MessagingException: Could not connect to SMTP host: smtp.west.cox.net, port: 25; nested exception is: java.net.SocketException: Network is unreachable: connect Here is the code: Session session = Session.getInstance(props, null); MimeMessage msg [...]
Continue Reading »Can’t update scala on Gentoo
As I wanted to test Scala 2.9.2 on my gentoo system I tried updated the package but ended up with this error. I can’t figure out where the problem may be: Calculating dependencies …… done! >>> Verifying ebuild manifests >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.23, 0.16, 0.20 >>> Emerging (1 of 1) dev-lang/scala-2.9.2 >>> Jobs: 0 of 1 complete, 1 running Load avg: 0.23, 0.16, 0.20 >>> Failed to emerge [...]
Continue Reading »Java Setup on Scientific Linux showing two diffent versions
Java Setup on Scientific Linux showing two diffent versions. I am trying to get java setup right on Scientific Linux. If I do a javac -version I get the following: java_1.7.0_10 which is the version that I really want to be using. But if I do a java -version I get the following: OpenJDK Runtime Environment (IcedTea6 1.11.5) (rhel-1.50.1.11.5.el6_3-x86_64) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)** Which is not the version I would like [...]
Continue Reading »How do I install javac (JSDK) on Scientific Linux, 64Bit
I am trying to finds a way to install the Java SDK (javac) on Scientific Linux 64bit with yum or anyway.. Can someone please tell me the best what to do this so I can use maven for my builds etc Asked by techsjs2012 Just download the SDK from Oracle, place it in a suitable directory like /opt/java. chmod it, i.e.: chmod 744 jdk-6u37-linux-x64.bin unpack it, i.e.: ./jdk-6u37-linux-x64.bin symlink it, i.e.: ln -s jdk1.6.0_37/ jdk [...]
Continue Reading »Updating and deleting java (red hat / centos) (closed)
I am a total noob with linux. So please explain clearly if you have a solution for me. I have an VPS and I want to update JAVA. I found a guide on the Java site which says: rpm -e < package_name > I searched for the packages: [root@srv1 ~]# rpm -qa | grep java java_cup-0.10k-5.el6.x86_64 java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64 Than I tried to do the delete command [root@srv1 ~]# rpm -e java-1.5.0-gcj-1.5.0.0-29.1.el6.x86_64 error: Failed dependencies: java-gcj-compat is [...]
Continue Reading »Will there be any difference if I install Java from an RPM or just run the binary?
Would there be any technical differences if I installed Java from an RPM versus just running the available binary? I am running on CentOs 6.3 and Java is 1.7 Asked by BestPractices Depends what you mean by “technical differences” and “just running the available binary” but, no, there is no difference to running the bundled RPM version of the JRE/JKD from the exact same JRE/JDK, from the same manufacturer, for the same version, for the [...]
Continue Reading »Java login through LDAP [closed]
I am starting to write an application for our office and the first step is authentication through LDAP where all users already exist. Everything I need is a code in Java to check if the pair <nick,password> is right. Google found me many links, but I think that I will find here the most sofisticate, short and up to date solution (I don’t want to read all articles like 2 whole days to do something [...]
Continue Reading »authbind + java + ubuntu still fails – why?
Please, observe: markk@ip-10-203-82-54:~/work/gl$ uname -a Linux ip-10-203-82-54 3.2.0-25-virtual #40-Ubuntu SMP Wed May 23 22:20:17 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux markk@ip-10-203-82-54:~/work/gl$ ls -la /etc/authbind/byport/80 -rwxrwx— 1 markk markk 0 Aug 16 10:00 /etc/authbind/byport/80 markk@ip-10-203-82-54:~/work/gl$ authbind /usr/bin/java -Dcom.shunra.gl.ports=80 -jar server.jar java.net.SocketException: Permission denied at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137) at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:77) at org.simpleframework.transport.connect.Acceptor.bind(Acceptor.java:171) at org.simpleframework.transport.connect.Acceptor.<init>(Acceptor.java:88) at org.simpleframework.transport.connect.Listener.<init>(Listener.java:78) at org.simpleframework.transport.connect.ListenerManager.listen(ListenerManager.java:90) at org.simpleframework.transport.connect.ListenerManager.listen(ListenerManager.java:73) at org.simpleframework.transport.connect.SocketConnection.connect(SocketConnection.java:106) at org.restlet.ext.simple.HttpServerHelper.start(HttpServerHelper.java:93) at org.restlet.Server.start(Server.java:585) at org.restlet.Component.startServers(Component.java:601) at org.restlet.Component.start(Component.java:528) at com.shunra.gl.Main.main(Unknown Source) ^Cmarkk@ip-10-203-82-54:~/work/gl$ The machine [...]
Continue Reading »


