Solved

Compiling vs. runnung app using borland jbcl

Posted on 2003-11-03
5
268 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
Comment Utility
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
Comment Utility
...and that the classpath to those proprietary classes is included.

0
 
LVL 86

Accepted Solution

by:
CEHJ earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
8-)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
noX challenge 17 76
Python Assistance 7 31
Java asynchronous logging 4 32
solarwind tftp server 2 30
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

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