Solved

Compiling vs. runnung app using borland jbcl

Posted on 2003-11-03
5
271 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
  • 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
split string containing \r\n in Java 46 44
configure dependency in POM for new database 3 26
ejb on wildfly 5 20
String array comparison 4 34
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
The viewer will learn how to implement Singleton Design Pattern in Java.

831 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