Results 1 to 8 of 8
- 02-25-2012, 08:37 AM #1
Member
- Join Date
- Feb 2012
- Posts
- 5
- Rep Power
- 0
How can I use the created jar file for my other program?
I have a java program 'A' that will use the other 8 classes (my classes) to run. Java program 'B' will also use the other 8 classes to run. Java program A and B are different main class but both use the other 8 classes.
I tried to create the jar file, add the jar files to classpath. Modify program A to add import jdbc.base.*; However, i am getting compile error below. I checked my jar files and all those 8 classes are there. What did i do wrong?
C:\Documents and Settings\chanck\Desktop\Myjava\Myjava.java:25: error: cannot access MySettings
MySettings my = new MySettings();
^
bad class file: C:\Program Files\ibm\SQLLIB\java\jccJar.jar(jdbc/base/MySettings.class)
class file contains wrong class: MySettings
Please remove or make sure it appears in the correct subdirectory of the classpath.
1 error
- 02-25-2012, 01:45 PM #2
Re: How can I use the created jar file for my other program?
The message says that the MySettings.class file is bad.
Can you recreate that file?
What program generates the error message that you posted?
- 02-26-2012, 06:34 AM #3
Member
- Join Date
- Feb 2012
- Posts
- 5
- Rep Power
- 0
Re: How can I use the created jar file for my other program?
I misunderstood how it works. Although I can able to get it to work, but it is not what I wanted.
- 02-26-2012, 01:49 PM #4
Re: How can I use the created jar file for my other program?
Please explainit is not what I wanted.
- 02-26-2012, 08:19 PM #5
Member
- Join Date
- Feb 2012
- Posts
- 5
- Rep Power
- 0
Re: How can I use the created jar file for my other program?
My program B can't able to use my jar file. Program A can, but not program B.
- 02-26-2012, 08:35 PM #6
Re: How can I use the created jar file for my other program?
Please explain. What do you mean by "to use"? What is in the jar file? Do you create it? how do you create it?My program B can't able to use my jar file. Program A can, but not program B.
Describe what you do when it works and what you do when it does not work.
Show the command lines used.
Copy all of the error messages and post them here.
To copy the contents of the command prompt window:
Click on Icon in upper left corner
Select Edit
Select 'Select All' - The selection will show
Click in upper left again
Select Edit and click 'Copy'
Paste here.
- 02-28-2012, 11:33 PM #7
Member
- Join Date
- Feb 2012
- Posts
- 5
- Rep Power
- 0
Re: How can I use the created jar file for my other program?
Program B is not working if I have a separate the main and the class into two files. If I combine them together, it works.
- 02-29-2012, 12:06 AM #8
Similar Threads
-
I am created this program.but it shows null pointer exception...can any one help me..
By vetrivelmanian in forum Threads and SynchronizationReplies: 3Last Post: 07-26-2011, 11:30 AM -
running the created jar file
By Mostafa_mech in forum NetBeansReplies: 12Last Post: 07-02-2010, 11:06 AM -
How can i execute one java file(dynamically created) from the other
By Rak239 in forum New To JavaReplies: 1Last Post: 11-03-2009, 07:07 AM -
error while running jar file created from netbeans
By ecstatic in forum NetBeansReplies: 2Last Post: 03-09-2009, 02:36 AM -
How to find file created date.....
By roshithmca in forum Advanced JavaReplies: 1Last Post: 02-18-2008, 09:48 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks