Solved

Java NoClassDefFoundError

Posted on 2004-08-17
14
1,931 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
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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

813 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

12 Experts available now in Live!

Get 1:1 Help Now