Solved

Java NoClassDefFoundError

Posted on 2004-08-17
14
1,928 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
  • 6
  • 4
  • 2
  • +1
14 Comments
 
LVL 18

Expert Comment

by:liddler
Comment Utility
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
Comment Utility
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
Comment Utility
Does PATH list /usr/local/java/bin before the Sun copy of java (/usr/java/bin)?
0
 
LVL 1

Author Comment

by:sands76
Comment Utility
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
Comment Utility
jlevie is asking for PATH, not CLASSPATH

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

Author Comment

by:sands76
Comment Utility
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 40

Expert Comment

by:jlevie
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
PAQed, with points refunded (125)

CetusMOD
Community Support Moderator
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
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…
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 navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

743 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now