Configuring JAVA_HOME variable in bash_profile

Solution Verified - Updated -

Issue

  • Unable to start the jboss instance by configuring the JAVA_HOME variable in .bash_profile
=========================================================================

  JBoss Bootstrap Environment

  JBOSS_HOME: /opt/web/jboss/jboss-as

  JAVA: /opt/web/jdk1.6.0_21//bin/java

  JAVA_OPTS: -Dprogram.name=run.sh -server -Xms14336m -Xmx14336m -XX:SurvivorRatio=16 -XX:+UseConcMarkSweepGC -XX:MaxPermSize=256m -Dsun.rmi.dgc.server.gcInterval=3600000 -verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:/opt/logs/verbosegc.log -Dsun.lang.ClassLoader.allowArraySyntax=true -Dorg.apache.catalina.loader.WebappClassLoader.SYSTEM_CL_DELEGATION=false -Dorg.jboss.mx.loading.blacklistMode=LRUSet -Xbootclasspath/p:/opt/web/wily/9.1/connectors/AutoProbeConnector.jar:/opt/web/wily/9.1/Agent.jar -Dcom.wily.introscope.agentProfile=/opt/web/wily/9.1/core/config/Agent.profile -Djava.net.preferIPv4Stack=true

  CLASSPATH: /opt/web/jboss/jboss-as/bin/run.jar:/opt/web/jdk1.6.0_21//lib/tools.jar

=========================================================================

Exception in thread "main" java.lang.NoClassDefFoundError: org/jboss/Main
Could not find the main class: org.jboss.Main.  Program will exit.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content