Solved

Compiling vs. runnung app using borland jbcl

Posted on 2003-11-03
5
273 Views
Last Modified: 2006-11-17
Hi,

I have an app that uses the Borlands jbcl package. (com.borland.jbcl.layout.GridBagConstraints2). If I compile the app I get no errors. If I run the app it gives the following error:  java.lang.NoClassDefFoundError: com/borland/jbcl/layout/GridBagConstraints2

I'm using JBuilder 8 se and Java JDK 1.18_08.

Thanks for any help.

Cmp2
0
Comment
Question by:cmp2
[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
  • 4
5 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 9672973
That means you've got a discrepancy between your compile time and runtime environments. You need to make sure the version of java.exe you're using is the correct one.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9673007
...and that the classpath to those proprietary classes is included.

0
 
LVL 86

Accepted Solution

by:
CEHJ earned 50 total points
ID: 9673033
You need to address these two issues too:

a. you need to upgrade that ancient JDK
b. You need to ask yourself whether any convenience value of using proprietary classes like these is outweighed by the possibility, if it is not packaged correctly, of breaking the code once it is out of your IDE in exactly the sort of way you describe here. And that is quite apart from the issues raised by not adhering to standards-based code in terms of general principles.
0
 
LVL 1

Expert Comment

by:tgp
ID: 9690779
CEHJ is right, but if you really can't get around the issue (time constraints for example), then you can set Borland's com.borland.jbcl.layout.GridBagConstraints2 as one of your project's "dependencies".

You can do this with JBuilder itself, and is handy, especially if you're creating a jar file. (If not, you'll need to distribute that class with your app).

If you create your jar file with JBuilder, then you can set it so that the dependencies will include all classes and resources, which simply means that class will get added to your jar file when compiling.

Hope that helps

TGP @:o)
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 9943916
8-)
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
The viewer will learn how to implement Singleton Design Pattern in Java.
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

749 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