473,320 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Class Path Problem

I am baffled as to why i keep receiving a "java.lan.NoClassDefFoundError: C:\Ini
Exception in thread "main".

My CLASSPATH is C:\javapgm\testApp\WEB-INF\classes\testenv;C:\oracle\ora92\jdbc\lib\class es12.jar;

My class file has been created. Now i need to know what exactly is causing this error outside of CLASSPATH being set.

Expand|Select|Wrap|Line Numbers
  1. import java.util.Properties;
  2. import java.util.Vector;
  3. import java.io.FileInputStream;
  4. import java.io.File;
  5.  
  6. public class IniA
  7. {
  8.       private static Properties m_ApiProperties = null;     
  9.       private static sFile = "C:\\readFile.ini";
  10.  
  11.   public IniA()
  12.   {
  13.  
  14.   }
  15.       public static void loadProperties(boolean bShowDebug, String sFile)
  16.       {        
  17.          // String sFile = "readFile.ini";
  18.           try
  19.           {  
  20.             File objFile = new File(sFile);    
  21.             if( objFile.canRead() )
  22.             {
  23.               FileInputStream fin = new FileInputStream(objFile);
  24.               m_ApiProperties = new Properties();
  25.               m_ApiProperties.load(fin);
  26.             }
  27.           }
  28.  
  29.           catch(java.io.FileNotFoundException e)
  30.           {
  31.            // FTTrace.handleMessage (FTTrace.HANDLER_APP_PT_MSG,"     ERROR: FileNotFoundException = " + e.getMessage());
  32.           }
  33.           catch(java.io.IOException e)
  34.           {
  35.             //FTTrace.handleMessage(FTTrace.HANDLER_APP_PT_MSG,"     ERROR: IOException = " + e.getMessage());
  36.           }
  37.  
  38.        }
  39.  
  40.  
  41.       public static void main(String pstrArgs[]) 
  42.       {                             // simple unit test
  43.  
  44.           try{
  45.                           IniA();
  46.                         }
  47.  catch(Exception x) 
  48.              {
  49.              System.out.println(x);       
  50.             }
  51.        System.out.println("HI");
  52.       }
  53. }
Attached Files
File Type: txt IniA.txt (722 Bytes, 342 views)
Oct 17 '07 #1
2 1442
NeoPa
32,556 Expert Mod 16PB
I'm assuming this is a Java question.
It had something in the untagged code with "Java" in it :S
No idea of the title but I found it posted in a completely unrelated discussion thread in the Member Introductions forum. I suppose you'd better be gentle with them.
**Edit**
Changed title but it was really a guess so please change it if it's not right.
Oct 17 '07 #2
r035198x
13,262 8TB
Why don't you post the full error message exactly as it is.
Oct 18 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Hal Vaughan | last post by:
I want to have a config file for my program, which means I need to know where the config file is. If I type: java myclass and it runs myclass.class, is there any way to obtain the location of...
31
by: John Roth | last post by:
I'm adding a thread for comments on Gerrit Holl's pre-pep, which can be found here: http://tinyurl.com/2578q Frankly, I like the idea. It's about time that all of the file and directory stuff...
5
by: Nick Flandry | last post by:
I'm running into an Invalid Cast Exception on an ASP.NET application that runs fine in my development environment (Win2K server running IIS 5) and a test environment (also Win2K server running IIS...
2
by: John Mullin | last post by:
We are having a problem which appears similar to a previous posting: http://groups.google.com/groups?hl=en&lr=&frame=right&th=d97f552e10f8c94c&seekm=OZw33z9EDHA.2312%40TK2MSFTNGP10.phx.gbl#link1 ...
5
by: Nick Gilbert | last post by:
Hi, I'm having problems using Flash Remoting with Web Services for ASP.NET and I've narrowed the problem down to csc.exe when it tries to compile the stub class. Flash Remoting...
19
by: Chocawok | last post by:
Some of the classes in my app are graphical. To encapsulate the graphical side of things I had created a class called "sprite" which holds a bit map and knows how to draw itself etc. The...
5
by: Tony Johansson | last post by:
Hello! I have one solution file that consist of three project. One project that build the exe file called A One project that build a user control dll. Here we have a class called B One project...
5
by: Mike Krell | last post by:
I'm running into problems trying to override __str__ on the path class from Jason Orendorff's path module (http://www.jorendorff.com/articles/python/path/src/path.py). My first attempt to do...
4
by: GiBo | last post by:
Hi all, I have a class URI and a bunch of derived sub-classes for example HttpURI, FtpURI, HttpsURI, etc. (this is an example, I know there is module urllib & friends, however my actual problem...
1
by: aapexclient | last post by:
I have a problem with Java finding my custom class directory. I have searched the forums and tried everything, but nothing seems to work. The <javapgm>.java compiled cleanly and created...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.