Setting the Screen Resolution of a Linux Guest in VMWare vSphere Client

I am currently working with virtual machines via Vmware vSphere on a Windows 2008 server. Initially I was unable to get the guest to render full screen and did not have all of the screen resolutions that I would have thought I should. What I was trying to do was have the guest Linux (in this case RedHat Enterprise Linux 6) run full-screen. It was not as straight forward as setting the screen resolution in the VM guest settings dialog.→ Continue reading “Setting the Screen Resolution of a Linux Guest in VMWare vSphere Client”

Import javax.ejb cannot be resolved Error in Eclipse Helios

If you have installed the latest and greatest JBossAS tools into eclipse, try using the following version instead:

?2.2.0.v20110216-175

It seems as though there are some problems with the latest and greatest that causes compilation problems. → Continue reading “Import javax.ejb cannot be resolved Error in Eclipse Helios”

Accessing an EJB 3.1 Singleton Bean with @Startup from a Servlet in the Same JVM Instance

I am building a project whereby I have a Singleton Bean that I want to fire up when the .jar is deployed in the EJB container, thus I have it annotated as follows:

package com.ryanchapin.ejbTest

@Startup
@Singleton

public class SingletonTest{}

Of course, I have the requisite Local and Remote interfaces set, up, I’ve just left that off for brevity. I am attempting to do a JNDI lookup, from a Servlet in the same JVM using the Local interface which results → Continue reading “Accessing an EJB 3.1 Singleton Bean with @Startup from a Servlet in the Same JVM Instance”

Disabling JavaScript Validation in Eclipse Helios 3.6.1

The Helios JavaScript validator does not seem to like the jquery-1.5.min.js (or for that matter a number of other know good js libraries). As a result Eclipse complains a lot when building a project.

The quick fix that I found was to disable JavaScript validation under the Builder preferences, for your project:

Project/Properties/Builders

Simply, uncheck the “JavaScript Validator” and you should be all set.→ Continue reading “Disabling JavaScript Validation in Eclipse Helios 3.6.1”

Simple Network Speed Command Line Test for Linux

Let’s say that all that you have access to is the command line on a Linux box and you want to know what the network throughput is. If you have another Linux box you can use netcat to do a quick test:

On box a:? Set up netcat to listen to a given port:

nc -l 12345 > /dev/null

Fire up netcat to listen on port 12345 and to dump the output to /dev/null.

On box b:? Send data via → Continue reading “Simple Network Speed Command Line Test for Linux”

Installing Java SE Source Files and Linking to Eclipse on CentOS 5

?When I first set up a developoment VM with CentOS I must have forgotten to install the Java source because I could not navigate to Java SE method declarations in my Eclipse IDE.

To have access to the Java source I did the following:

  • yum install java-1.6.0-openjdk-src
  • A src.zip file was placed in:
  • /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.x86_64/src.zip

I created a src dir in the aforementioned containing dir and unpacked the zip
I then linked to the source from Eclipse by:
Right-clicking on some → Continue reading “Installing Java SE Source Files and Linking to Eclipse on CentOS 5”

Installing JBoss AS 6 Tools in Eclipse Helios

  • Go to Help > Install New Software
  • Set Work with to http://download.jboss.org/jbosstools/updates/development/
  • In the results, unfold “All JBoss Tools” and check JBoss AS Tools. When last I checked the description indicates only 4.x and 5.x for JBoss, but it does include JBoss AS 6 Tools
  • Next, etc, Finish.

When I then ran through the Eclipse add server wizard the 6.0 version of JBoss AS was available.→ Continue reading “Installing JBoss AS 6 Tools in Eclipse Helios”

Including libraries in WAR files in Eclipse

By default, the newer versions of Eclipse do not include the libraries that you add to the build path in .war files. There are three approaches to solving this problem:

  • Declare your libraries/jar files to be module dependencies for your war file; essentially forcing Eclipse fo treat the lib the same way it would a dependent project. I found a web page describing how to do this for an older version of Eclipse and couldn’t readily figure out how to
Continue reading “Including libraries in WAR files in Eclipse”

Disabling Autodeploy in Eclipse for Web and JavaEE Projects

In some cases it is helpful to have your Java project automatically built and deployed for you by Eclipse. For me, when working on a dynamic web or JavaEE project I’d much rather run it on the server through the IDE manually, as I tend to save often and I end up having to wait for a previous deployment to finish on a regular basis.

To disable the feature:

  • Go to: Window/Show View/Servers
  • Double-click on the server that you associated
Continue reading “Disabling Autodeploy in Eclipse for Web and JavaEE Projects”