Solved

Compiling vs. runnung app using borland jbcl

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
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…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

863 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

28 Experts available now in Live!

Get 1:1 Help Now