Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Java NoClassDefFoundError

Posted on 2004-08-17
14
Medium Priority
?
1,938 Views
Last Modified: 2013-12-27
Hi,

I am trying to install an application setup_vbis.bin on a Solaris machine. This app needs the Java virtual machine and heres where I am hving trouble. There was no classpath set so I did the fwg:

1. export $CLASSPATH= /usr/local/java:/usr/local/java/bin:/usr/local/java/lib/tools.jar:/tmp:.

2. tested a simple Hello World program now and it executed fine.

3. When I launch the installer the fwg happens:

Initializing InstallShield Wizard...

Preparing Java (tm) Virtual Machine.....
.........................................................
Exception in thread "main" java.lang.NoClassDefFoundError: run

I figure the problem is with the classpath but not sure.. can anyone pl help me out ??

thnx,
sg
0
Comment
Question by:sands76
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 4
  • 2
  • +1
14 Comments
 
LVL 18

Expert Comment

by:liddler
ID: 11820683
What version of java?
Usually jave is in /usr/java, but that's not in your CLASSPATH?
Assuming you are using ksh, you don't want the $, and is the space between the = and /usr really there, or is it just a typo?  There shouldn't be a space.
export CLASSPATH=/usr/local/java:/usr/local/java/bin:/usr/local/java/lib/tools.jar:/tmp:.
0
 
LVL 1

Author Comment

by:sands76
ID: 11821008
hi,

The Java version is 1.4.2_04-b05 and it is located in /usr/local/java.

There was no classpath so I had to generate one. about the space, it was a typo.

In anycase with or without the $ the problem continues to be the same but as I said, executing a simple hello world pgm works fine..

Is there anything else that needs to be configured ??

thnx
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11826029
Does PATH list /usr/local/java/bin before the Sun copy of java (/usr/java/bin)?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 1

Author Comment

by:sands76
ID: 11829191
No. The path lists only :

/usr/local/java:/usr/local/java/bin:/usr/local/java/lib/tools.jar:/tmp:.

and nothing else.. /tmp is where I hv the bin to be installed.
0
 
LVL 18

Expert Comment

by:liddler
ID: 11829253
jlevie is asking for PATH, not CLASSPATH

Type:
which java
to see which java you are running
0
 
LVL 1

Author Comment

by:sands76
ID: 11831115
Hi,

echo $path doenst show anything.

which java returns -> /usr/bin/java

But there is no dir as /usr/bin/java. But there are some links in /usr/bin as:

lrwxrwxrwx   1 root     other         16 May 25 14:38 java -> ../java/bin/java
lrwxrwxrwx   1 root     other         17 May 25 15:04 javac -> ../java/bin/javac

So I figure it means /usr/java/bin

I reconfigured the classpath as follows:

 export CLASSPATH=/usr/java:/usr/java/bin:/usr/java/lib/tools.jar:/tmp:.

but the same problem continues.

0
 
LVL 40

Expert Comment

by:jlevie
ID: 11831374
I thought athat's what you'd see from 'which java'. Sun installs a copy of Java in /usr/java and creates a symlink from /usr/java/bin/java to /usr/bin/java. Since you PATH doesn't list /usr/local/java/bin before /usr/bin simply executing "java some-prog" (like install shield is doing) will use the copy in /usr/bin, not /usr/local/java/bin.

If you prepend /usr/local/java/bin to your PATH you should have better luck. For ksh, bash, or sh that can be done with:

PATH=/usr/local/java/bin:$PATH; export PATH

for csh or tcsh you could do:

set path = (/usr/local/java bin $path)
0
 
LVL 1

Author Comment

by:sands76
ID: 11832230
Nope.. the problem continues.. I tried on a diff Solaris machine and nothings changed.. heres what I hv done:

bash-2.05$  echo $CLASSPATH

bash-2.05$  export CLASSPATH=/opt/vignette/proVCM73/java/bin:/opt/vignette/proVCM73/java:/opt/vignette/proVCM73/java/lib/tools.jar:/tmp:.
bash-2.05$  echo $CLASSPATH
/opt/vignette/proVCM73/java/bin:/opt/vignette/proVCM73/java:/opt/vignette/proVCM73/java/lib/tools.jar:/tmp:.
bash-2.05$  PATH=/opt/vignette/proVCM73/java/bin:$PATH; export PATH
bash-2.05$  echo $PATH
/opt/vignette/proVCM73/java/bin:/opt/vignette/proVCM73/java/bin:/usr/bin:/bin:/usr/sbin:/sbin

bash-2.05$  ./setup_vbis_sol.bin -is:tempdir /tmp
InstallShield Wizard

Initializing InstallShield Wizard...

Preparing Java(tm) Virtual Machine...
...................................
...................................
..........................Exception in thread "main" java.lang.NoClassDefFoundError: run

any more suggestions !?
thnx
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11832415
Earlier you said that "The Java version is 1.4.2_04-b05 and it is located in /usr/local/java.", but above you are setting the CLASSPATH and PATH to point to /opt/vignette/proVCM73. Does that directory contain a Java distribution?
0
 
LVL 1

Author Comment

by:sands76
ID: 11832535
This is a diff machine i am trying on.. and Yes, There exists the same version 1.4.2_04-b05 in this dir /opt/vignette/proVCM73 too.

And as I said before, I hv no problem executing a simple hello world program in either of these 2 machines once the classpath is set as described above.. the problem starts when trying to install this app. :(
0
 
LVL 40

Expert Comment

by:jlevie
ID: 11832732
The Vignette docs that I can find talk only about installing the run-time services on Solaris, and they indicate that you'd be executing setup_vbis_sol.bin. Are you certain that you are trying to do the install correctly?
0
 
LVL 1

Author Comment

by:sands76
ID: 11832902
I hv their dev guide and its actually looks pretty simple..I hv  mailed their support too but am betting on obtaining a faster soln here !

They hv indicate a cmd :  ./setup_vbis_sol.bin -is:tempdir /tmp to be executed and thats it.. but the prob appears to be with the env..

0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 12211274
PAQed, with points refunded (125)

CetusMOD
Community Support Moderator
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Installing FreeBSD… FreeBSD is a darling of an operating system. The stability and usability make it a clear choice for servers and desktops (for the cunning). Savvy?  The Ports collection makes available every popular FOSS application and packag…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question