IDE in Jar file

Hi all my friends!
I want to do many Java application that requires powerful machine. Well, it is better that I can afford one but it is just a deam. Instead, my school has some very high performance machines ( P4 2.8 G). I really want to use that machine for my programming but unfortunately they do not have any editor like JCreator that I always use. Of course I can use notepad and compile in DOS but I for large project, it is a waste of resource.
So I have an idea of having an IDE like Sun One Studio , allow me GUI , syntax, keyword highlight and allow me to compile program using button. But it should be written in Java as machine in school does not allow any INSTALATION. My question is that, theoretically, is it feasible idea ( accessing to low level of Windows machine using Java).
Regards.

#2 IDE of choice and strongly moving to #1 is Eclipse, created by IBM and supported by a large community including Oracle, Borland, BEA, Rationale, and over 200 others. It is open-source, free to use, highly extensible with possibly the best pluggable architecture, 100's of free plugins to add on, and works amazingly well. IDEA IntelliJ is probably the next best IDE although on JDJ Borland is rated #1 over Eclipse. Go to www.eclipse.org and get a taste of one of the most powerful java architectures you'll find, not only for IDE but their 3.0 version is soon to be used by many applications. I would get the 2.1.2 version though, as the 3.0 is not yet released and the Mx versions are mostly unstable.
Otherwise, there is always jedit.org, which is a very good editor as well.

Similar Messages

  • Deploying Java Desktop App using executable JAR files

    Hi there.
    Today I am very optimistic about java. I am a beginner, and I had tried (in my few free time) to understand how to deploy java desktop apps.
    I am using the lattest NetBeans IDE to do the programming and it is very very fast and optimized.
    Going to the point, I tried some time ago to deploy an application (made with this IDE) using JAR files, but even though the application run well on my IDE, when I packed it, it rised an error saying that
    java.lang.NoClassDefFoundError: org/netbeans/lib/awtextra/AbsoluteLayout
    I was using an absolute layout on my JFrame forms and this AbsoluteLayout is provided by netbeans and not by the normal SDK.
    I then looked for the absolute layout class and found a jar file in the following path:
    C:\netbeans\modules\ext\AbsoluteLayout.jar
    So I mounted the Jar file in my File Systems and then added the contents of the file to myApp.Jar file.
    I used the automated Jar Recipe Packaging feature of netbeans, that is why I needed to mount the AbsoluteLayout.jar file into my file systems.
    Now it runs fine by just right clicking the MyApp.jar file from Windows Explorer.
    In a next reply to this topic I will include some sample code so that anybody requiring to do such implementation can take this for help.
    Regards!
    JN

    Well,
    I will take some time here to show the basic source code and procedure to create a desktop application, pack it up in a Jar file for deployment, add other classes or jars to the deployment jar file and finally open the jar file as an executable. This applies for either windows and linux environments.
    Take in count i am using Netbeans IDE 3.x (3.5)
    First I open the IDE and create a new project called MyDesktopApp. This is done by going to the menu Project / Project Manager. Then click on the New button and specify the project name and click on OK.
    At this point, the Filesystems tab in the project explorer is empty. So I mount a directory to store myDesktopApp in it. I selected c:\MyDesktopApp but you can select any name you want.
    To mount the directory you follow these steps:
    1. Right-click on File Systems
    2. From the contextual menu select Mount > Local Directory
    3. In the filechooser window, you just browse it and SELECT the directory to mount. Be aware that you can even create the directory on this window. Do not enter (double-click) into the directory you want to mount, just select it and click on finish...
    4.Then the directory entry appears under the filesystems node of the project explorer.
    Now you have to create your application. You can either create a package (special configured and tracked directory) or you can create the clases directly inside the directory. For tidy project, I will create the package.
    To create the package follow these instructions:
    1. Right-click on the mounted directory and from the contextual menu select New > Java Package
    2. In the New Wizard - Java Package window, type the package name and click on finish. I use the "MyDesktopApp" as package name.
    OK. Now the package is created under the mounted directory. Now we have to create the Main Class. In this case I will use a JFRAME as the main class but you can create any class you want.
    To create the JFRAME as main class follow these steps:
    1. Right click on the java package you just created and select New>JFRAME from the contextual menu. If you do not see the JFRAME option on the NEW sub menu you will have to select the All Templates option. I explain the All Templates option now on, it will be easier to use the JFRAME if available. Once you use JFRAME with the all templates then the JFRAME will show up in further NEW usage.
    2. So finally we used the All Templates, and you select the Java GUI Forms > JFRAME form option and click on NEXT.
    3. Give it a name. (I used MyDesktopAppFrm) and click on finish. Be aware you can set advanced options by clicking on next. But for the purposes of this topic we will use default options so click on FINISH
    4. A new JFRAME form appears inside your package. Right click on the form and select Set layout > Absolute Layout.
    5. Add some controls and code. I added a label and a button. And coded the ActionPerformed event of the button to say hello! on the label. this is up to you. The code just looks as follows:
    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
    // Add your handling code here:
    jLabel1.setText("Hello folks!");
    6. Compile and execute the form.
    Let's say this is our Desktop Application. Now We will pack it in a Jar in two steps...
    A. Create a JAR file (Recipe)
    1. Right-click on your package and select New > All Tempaltes (Long Route) You can also select New > JAR Recipe if available.
    2. On the New Wizard Window, choose the JAR ARchives > JAR Recipe template and click on NEXT
    3. I used MyDesktopApp as the file name and Defaults and then click on Next.
    4. Specify the JAR Contents. Select the Package (not the mounted folder) from the mounted file system and click on add and then click on NEXT twice...
    5. On the JAR Manifest window, click on GENERATE
    6. Edit the manifest in the window to add the following code:
    Main-Class: MyDesktopApp.MyDesktopAppFrm
    7. Ensure the Main-Class definition is the same as your java package and JFRAME name. Click on FINISH
    8. At this point we have a jar file in your project directory but this file wont run because it is missing some Netbeans clases that we will add in the next set of steps... Just to check, compile the file (right click on the JAR file and compile) and try to execute. It must compile but must not execute.(well if it executes you are done. It may execute if you did not set the lay out of the form as AbsoluteLayout)
    B. Add the AbsoluteLayOut to the JAR
    1. Right click on File Systems and select Mount > Archive Files
    2. Look for your netbeans installation folder and select the following file:
    .../netbeans/modules/ext/AbsoluteLayout.jar
    3. Click on finish
    4. Now the JAR File is mounted in the file systems.
    5. Right-click on your MyDesktopApp.JAR file and select properties.
    6. Look for the contents property click once on it and then on its elipsis button [...]
    7. From the FileSystems box in the Contents window, select the AbsoluteLayOut file and click on Add
    8. Then the system asks you if you are sure. Of course you are so click OK. (If not sure, just read the message text and click OK...:-))
    9. Click on OK
    10. Compile your JAR Recipe (right click on it and Compile)
    11. Now you must be able to run the file by right clicking it and EXECUTE.
    12. Also you must be able to run the file by double clicking the file from a Windows Explorer. You may receive a message asking to select the program to run the file with. You must browse and select the Javaw.exe file in the bin directory of your Java RUn Time installation. This is typically located at C:\j2sdk1.4.0_01\jre\bin or something like that. Use the File-Search feature of window to locate the JAVAW.exe file if needed.
    I hope this long explanation helps somebody to deploy Java Desktop applications. Please reply the message if it helps you just to know it was useful.
    Thanks for your time....
    JN

  • Use jar file

    dear guys,
    can somebody tell me why would use jar file? how it would be use? i would like to get the idea of jar file
    thanks

    Are you familiar with zip files? A jar file is just a kind of zip (the jar utility will even read zip files as though they were jars).
    The most common use is to hold .class files generated from all the classes of a Java program so that you can run the program from that one file, rather than very large numbers of small class files. Libraries of classes are almost always stored as jars.
    Of course you can put other stuff in there too, like image files and the like.

  • How can i create  Jar file using Eclipse IDE.

    Hi Guys
    Am new to java. I want convert my project into executable jar file.
    In my project am using itext.jar.And some other folder.
    already i create jar file.But its not working.only its working 4 modules after that its say file cannot found exception.but the file path is correct.i dont know why its happen.
    This is my project folder strutre also
    Log:->
    src(folder)
    logs(folder)
    comments(folder)
    lib-->itext.jar.
    images-->1,gif
    properties-->catconfig.properties (file)
    now can i create jar file
    this code also show error when i run the jar file
    And this is my catconfig. properties file
    fileName=total_system_log.log
    DDSingle=DD_bysingleIP_comment.txt
    DDRange=DD_byrange_comment.txt
    NDPing=ping_comments.txt
    NDFPing=fping_comments.txt
    reportFileName=report.txt
    moduleFileName=Modules.txt
    propFileName=nameDetails.properties
    Choice=DDSingle
    logFileName=DDSingleIP_10.32.0.2.log
    finalReport=FinalReport.txt
    logFilePath=\logs\
    commentFilePath=\\Comments\\
    its very urgent for me . could u pls send my error  and u r ideas.
    thanks for u r Ansewering.
    import java.io.BufferedReader;
    import java.io.DataOutputStream;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.InputStream;
    import java.io.RandomAccessFile;
    import java.util.Properties;
    import java.util.ResourceBundle;
    import java.util.ArrayList;
    public class LogReader {  
        public void getValuesFromFilesOnly(String Choice,String logFileName)
              try {
                   ArrayList commentsList = new ArrayList();
                   ArrayList tempList = new ArrayList();
                   String userdir = System.getProperty("user.dir");
                   String logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                   String commentDir =ResourceBundle.getBundle("catconfig").getString(Choice);
                   String commentFilePath=ResourceBundle.getBundle("catconfig").getString("commentFilePath");
                   String currentdir1 =userdir+logFilePath+logFileName;
                   StringBuffer strBuff=new StringBuffer();
                   RandomAccessFile randomFile = null;
                   RandomAccessFile commentsFile = null;
                   String tempLine = null;
                   String commentLine = null;
                   String catVersion = null;
                   String finalReport=null;
                   int colon = 0;                    
                   int counter = 0;
                   boolean startFlag = false;
                   boolean endFlag = false;                    
                   boolean endOfFileFlag = false;          
                   System.out.println("Log file checked----->"+currentdir1);
                   System.out.println("comments file used--->"+commentDir);
                   try {
                        randomFile = new RandomAccessFile(currentdir1, "r");
                   } catch (Exception e) {
                        System.out.println("exception@getValuesFromFilesOnly@begin : "+e);
                   System.out.println("hi test1");
                   String commentDir1=userdir+commentFilePath+commentDir;
                   try{
                   System.out.println("Comment Dir:"+commentDir1);
                   commentsFile = new RandomAccessFile(commentDir1, "r");
                   catch (Exception e) {
                        System.out.println("exception@getValuesFromCommentDirOnly@begin : "+e);
                   while ((commentLine = commentsFile.readLine()) != null) {                         
                        String checkLine = commentLine.substring(commentLine.indexOf("=")+1, commentLine.length());
                        String message = commentLine.substring(0,commentLine.indexOf("="));
                        commentsList.add(checkLine);
                   commentsFile.close();
                   String startComment = (String)commentsList.get(0);
                   String endComment = (String)commentsList.get(commentsList.size()-1);
                   strBuff.append("                          CAT LOG REPORT                           \n\n");
                   while ((tempLine = randomFile.readLine()) != null) {               
                        if(tempLine.contains("CAT version is :"))
                             colon = tempLine.indexOf("is :");
                             catVersion = tempLine.substring(colon+4,tempLine.length());
                             String version=tempLine;
                             strBuff.append("Version : "+catVersion+"\n");
                             System.out.println("catVersion is :"+catVersion);
                        commentsFile = new RandomAccessFile(commentDir1, "r");
                        while ((commentLine = commentsFile.readLine()) != null) {
                             String checkLine = commentLine.substring(commentLine.indexOf("=")+1, commentLine.length());
                             String message = commentLine.substring(0,commentLine.indexOf("="));
                             checkLine=checkLine.toLowerCase();
                             tempLine=tempLine.toLowerCase();
                             if(tempLine.contains(checkLine))
                                  colon = tempLine.indexOf("info -");
                                  catVersion = tempLine.substring(colon+7,tempLine.length());
                                  strBuff.append(message+" ==> "+catVersion+"\n");
                                  System.out.println(message+" ==> "+catVersion);
                                  tempList.add(message+" ==> "+catVersion);
                                  if (catVersion.contains(startComment)){
                                       startFlag = true;
                                       counter++;
                                       System.out.println("*******startFlag**********"+startFlag);
                                  if (catVersion.contains(endComment)){
                                       endFlag = true;
                                       System.out.println("*******endFlag**********"+endFlag);
                                  if (startFlag == true && endFlag == true){
                                       System.out.println("******************************************");
                                       System.out.println("-------------Successfull completion-------");
                                       System.out.println("******************************************");
                                       startFlag = false;
                                       endFlag = false;
                                       counter = 0;
                                       tempList.clear();
                                  if (startFlag == true && endFlag == false && counter > 1){
                                       System.out.println("******************************************");
                                       System.out.println("---------------Failure after-----:"+tempList.get(tempList.size()-1));
                                       System.out.println("******************************************");
                                       //startFlag = false;
                                       //endFlag = false;
                                       counter = 0;
                                       tempList.clear();
                        commentsFile.close();
                   endOfFileFlag = true;
                   if (startFlag == true && endFlag == false && endOfFileFlag == true){
                        System.out.println("******************************************");
                        System.out.println("---------------Failure after-----:"+tempList.get(tempList.size()-1));
                        System.out.println("******************************************");
                        startFlag = false;
                        endFlag = false;
                        counter = 0;
                        tempList.clear();
                   randomFile.close();
                 System.out.println("hi");
                   finalReport=ResourceBundle.getBundle("catconfig").getString("finalReport");
                   savereportFile(strBuff,finalReport);
                   System.out.println("Report Generated");
              } catch (Exception e){
                   System.out.println("Exception@getValuesFromFilesOnly : "+e);
        public void findDetails()
             String currentdir1 = ResourceBundle.getBundle("catconfig").getString("fileName");     
             String logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
             String userdir = System.getProperty("user.dir");
             RandomAccessFile randomFile = null;
             StringBuffer strBuff=new StringBuffer();
             StringBuffer strBuff1=new StringBuffer();
             StringBuffer strBuff2=new StringBuffer();
             String tempLine = null;     
              String catVersion = null;
              String timeStr=null;
              String nameStr=null;
              String startIP="";
              String endIP="";
              String tempStart="";
              String tempEnd="";
              String reportFileName="";
              String moduleFileName="";
              String propFileName="";
              int startPos=0;
              int endPos=0;
              int fromIndex=0;
              boolean versionFlag=false;
              boolean ndFlag=false;
              boolean ddFlag=false;
              try {
                   randomFile = new RandomAccessFile(userdir+logFilePath+currentdir1, "r");
                   while ((tempLine = randomFile.readLine()) != null) {
                        if(tempLine.contains("CAT version is :") && !versionFlag)
                             startPos = tempLine.indexOf("is :");
                             catVersion = tempLine.substring(startPos+4,tempLine.length());
                             String version=tempLine;
                             strBuff.append("version : "+version+"\n");
                             versionFlag=true;
                             //System.out.println("version : "+version);
                        if(tempLine.contains("Inside NetworkDiscoverySlider.jsp"))
                             ndFlag=true;
                             strBuff.append("ND start : "+tempLine+"\n");                         
                        if(tempLine.contains("Inside NetworkDiscoveryDetails.jsp"))
                             strBuff.append("ND end : "+tempLine+"\n");
                             //System.out.println(" ND end : "+tempLine);
                        if(tempLine.contains("Given IPRange from"))
                             startPos = tempLine.indexOf("from");
                             catVersion = tempLine.substring(startPos+5,tempLine.length());
                             strBuff.append("NDRange : "+catVersion+"\n");     
                             //strBuff.append("NDRange : "+tempLine+"\n");                                             
                             //System.out.println("NDRange :"+catVersion);     
                             startPos=0;
                             fromIndex=tempLine.indexOf(":");
                             endPos= tempLine.indexOf(':', fromIndex+2);
                             //System.out.println("fromIndex : "+fromIndex+" endPos : "+endPos);
                             timeStr=tempLine.substring(startPos, endPos);
                             nameStr=catVersion.replaceAll(" ", "_");                         
                             strBuff2.append("ND_"+timeStr+" "+catVersion+" = "+"NDRange_"+nameStr+".log\n");
                        if(tempLine.contains("inside ByIpAddress.jsp"))
                             ddFlag=true;
                             strBuff.append("DD Start : "+tempLine+"\n");                                                  
                        if(tempLine.contains("start_IpAddress:"))
                             startPos = tempLine.indexOf("start_IpAddress:");
                             catVersion = tempLine.substring(startPos+16,tempLine.length());
                             startIP=catVersion;                         
                        if(tempLine.contains("end_IpAddress"))
                             startPos = tempLine.indexOf("end_IpAddress");
                             catVersion = tempLine.substring(startPos+13,tempLine.length());
                             endIP=catVersion;                         
                             if(endIP.length()==0)
                                  System.out.println("hi5");
                                  strBuff.append("DDSingleIP : "+startIP+"\n");
                                  //strBuff.append("DDSingleIP : "+tempLine+"\n");                              
                                  //System.out.println("DDSingleIP : "+startIP);
                                  //startPos = tempLine.indexOf(" ");
                                  startPos=0;
                                  fromIndex=tempLine.indexOf(":");
                                  endPos= tempLine.indexOf(':', fromIndex+2);
                                  timeStr=tempLine.substring(startPos, endPos);     
                                  strBuff2.append("DD_"+timeStr+" "+startIP+" = "+"DDSingleIP_"+startIP+".log\n");
                             else
                                  strBuff.append("DDRangeIP : "+startIP + " to "+ endIP+"\n");
                                  //strBuff.append("DDRangeIP : "+tempLine+"\n");                              
                                  //System.out.println("DDRangeIP : "+startIP + " to "+ endIP);
                                  //startPos = tempLine.indexOf(" ");
                                  startPos=0;
                                  fromIndex=tempLine.indexOf(":");
                                  endPos= tempLine.indexOf(':', fromIndex+2);
                                  timeStr=tempLine.substring(startPos, endPos);                         
                                  strBuff2.append("DD_"+timeStr+" "+startIP+" to "+endIP+" = "+"DDRangeIP_"+startIP +"_to_"+ endIP+".log\n");
                        if(tempLine.contains("set percentage completedCount: 100"))
                             System.out.println("hi...1");
                             strBuff.append("DD End : "+tempLine+"\n");
                             //System.out.println("DD End : "+tempLine);          
                   reportFileName=ResourceBundle.getBundle("catconfig").getString("reportFileName");
                   savereportFile(strBuff,reportFileName);
                   if(ndFlag)
                        strBuff1.append("Network Discovery\n");                    
                   if(ddFlag)
                        strBuff1.append("Device Discovery\n");
                   moduleFileName=ResourceBundle.getBundle("catconfig").getString("moduleFileName");
                   savereportFile(strBuff1,moduleFileName);
                   propFileName=ResourceBundle.getBundle("catconfig").getString("propFileName");
                   savereportFile(strBuff2,propFileName);
              } catch (Exception e)
                   System.out.println("error hi1");
                   System.out.println("Exception@findDetails : "+e);
        public void savereportFile(StringBuffer strBuff,String targetFileName)
              try{
                   String userdir = System.getProperty("user.dir");
                   String logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                   String reportFile=userdir+logFilePath+targetFileName;     
                   String fileContent="";
                   fileContent=strBuff.toString();
                      //System.out.println("file content : "+fileContent);
                      FileWriter fileWriter = new FileWriter(reportFile);
                      if(fileContent!=null)
                           fileWriter.write(fileContent);
                      fileWriter.close();
              catch(Exception e)
                   System.out.println("error hi1");
                   System.out.println("Exception@savereportFile : "+e);
        public ArrayList<String> getFileNames()
             String reportFile=ResourceBundle.getBundle("catconfig").getString("reportFileName");
             String logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
             String userdir = System.getProperty("user.dir");
              RandomAccessFile repFile=null;
              String reportLine = null;
              int colon=0;
              int fromIndex=0;     
              int startPos=0;
              int endPos=0;
              String timeStr="";
              String fileName=null;          
              ArrayList<String> nameList=new ArrayList<String>();          
             try
                  reportFile=userdir+logFilePath+reportFile;
                  repFile = new RandomAccessFile(reportFile, "r");
                  while ((reportLine = repFile.readLine()) != null) {                    
                        if(reportLine.contains("NDRange"))
                             colon=reportLine.indexOf(" : ");
                             fileName=reportLine.substring(colon+3, reportLine.length());
                             fileName="NDRange_"+fileName.replaceAll(" ", "_");
                             nameList.add(fileName);
                             System.out.println("fileName : "+fileName);
                        if(reportLine.contains("DDSingleIP"))
                             colon=reportLine.indexOf(" : ");
                             fileName=reportLine.substring(colon+3, reportLine.length());
                             fileName="DDSingleIP_"+fileName.replaceAll(" ", "_");
                             nameList.add(fileName);
                             System.out.println("fileName : "+fileName);
                        if(reportLine.contains("DDRangeIP"))
                             colon=reportLine.indexOf(" : ");
                             fileName=reportLine.substring(colon+3, reportLine.length());
                             fileName="DDRangeIP_"+fileName.replaceAll(" ", "_");
                             nameList.add(fileName);
                             System.out.println("fileName : "+fileName);
                  repFile.close();
             catch(Exception e)
                   System.out.println("Error@getFileNames : "+e);
             return nameList;
        public void writeFile(String oldLogName,String newLogName)
             try
                   FileOutputStream writeFile=null;               
                   String line = null;
                   String userdir = System.getProperty("user.dir");
                   String reportFile=ResourceBundle.getBundle("catconfig").getString("reportFileName");     
                   String newLogPath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                   RandomAccessFile repFile=null;               
                   String reportLine = null;
                   String tempLine=null;
                   String prevLine=null;
                   String nextLine=null;
                   String target=null;
                   String tempStr=null;
                   String startStr=null;
                   String endStr=null;          
                   int pos=0;
                   boolean flag=false;
                   boolean writeFlag=false;
                   boolean versionFlag=false;               
                   //System.out.println("newLogName : "+newLogName);     
                   newLogPath=userdir+newLogPath;
                   System.out.println("newLogPath : "+newLogPath);     
                   BufferedReader buffRead = new BufferedReader(new FileReader(oldLogName));
                   writeFile = new FileOutputStream(newLogPath+newLogName+".log", false);//true-for append mode
                   DataOutputStream dout=new DataOutputStream(writeFile);               
                   tempStr=newLogName.replace("_", " ");
                   pos=tempStr.indexOf(" ");
                   startStr=tempStr.substring(0,pos);
                   endStr=tempStr.substring(pos+1, tempStr.length());
                   target=startStr+" : "+endStr;
                   System.out.println("target ===> "+target);               
                   reportFile=newLogPath+reportFile;
                   repFile = new RandomAccessFile(reportFile, "r");
                  while ((reportLine = repFile.readLine()) != null) {                   
                       if(reportLine.contains(target))
                            flag=true; 
                            prevLine=tempLine;
                            //System.out.println("prevLine *****: "+prevLine);
                       else
                            tempLine=reportLine;
                            if(flag==true)
                                 nextLine=reportLine;
                                 flag=false;
                                 //System.out.println("nextLine *******:"+nextLine);
                                 break;
                  repFile.close();     
                 if(prevLine!=null && prevLine.length()>0)
                       pos=prevLine.lastIndexOf(" : ");
                       prevLine=prevLine.substring(pos+3, prevLine.length());
                       //System.out.println("prevLine : "+prevLine);
                  else
                       System.out.println("Starting line not available for : "+target);
                  if(nextLine!=null && nextLine.length()>0)
                        pos=nextLine.lastIndexOf(" : ");
                        nextLine=nextLine.substring(pos+3, nextLine.length());
                        //System.out.println("nextLine : "+nextLine);
                  else
                       System.out.println("Ending line not available for : "+target);
                       nextLine=prevLine;
                   while ((line=buffRead.readLine()) != null) {     
                        if(line.contains("CAT version is :") && !versionFlag)
                             versionFlag=true;
                             dout.writeBytes(line+"\n");                         
                        if(line.contains(prevLine))
                             writeFlag=true;                         
                        if(line.contains(nextLine))
                             writeFlag=false;
                             break;
                        if(writeFlag)
                             dout.writeBytes(line+"\n");
                  dout.writeBytes(nextLine+"\n");
                   buffRead.close();     
                   System.out.println("done");
              catch(Exception e)
                   System.out.println("Exception@writeFile : "+e.getMessage());
        public String folderCheck(String foldName)
              File folder=null;
              File newFile=null;
              String[] folderContent=null;
              String tempFileName="";
              String newLogName="";
              int count=0;     
              String logFilePath="";     
              String fileName="";
              String feedBackMsg="";          
              String userdir = System.getProperty("user.dir");
              logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
              fileName=ResourceBundle.getBundle("catconfig").getString("fileName");
              folder=new File(foldName);
              if(folder.isDirectory())
                   newLogName=userdir+logFilePath+fileName;
                   //System.out.println("newLogName : "+newLogName);
                   newFile=new File(newLogName);
                   if(newFile.exists())
                        newFile.delete();
                   folderContent= folder.list();
                   if (folderContent != null && folderContent.length>0)
                        System.out.println("folder has files : "+folderContent.length);                    
                        for(int iterate=0;iterate < folderContent.length;iterate++){                         
                             if (folderContent[iterate].toLowerCase().contains("system"))
                                  count++;                              
                                  tempFileName=foldName+"/"+folderContent[iterate];     
                                  try
                                       FileOutputStream appendedFile=null;
                                       BufferedReader buffRead = new BufferedReader(new FileReader(tempFileName));
                                       appendedFile = new FileOutputStream(newLogName, true);//true-for append mode
                                        DataOutputStream dout=new DataOutputStream(appendedFile);
                                        String line = null;
                                       System.out.println("writting : "+tempFileName);
                                       while ((line=buffRead.readLine()) != null) {                                        
                                            dout.writeBytes(line+"\n");
                                       buffRead.close();          
                                       //System.out.println("done");
                                  catch(Exception e)
                                       System.out.println("Exception@folderCheck : "+e);
                        if(count==0)
                             feedBackMsg="syslognotavail";
                             //System.out.println("System Log(s) not available");
                        else
                             feedBackMsg="syslogavail";
                             //System.out.println(count +" System log(s) avail");
                   else
                        feedBackMsg="filesnotavail";
                        //System.out.println("Files are not in the folder");
              else
                   feedBackMsg="Dirnotavil";
                   //System.out.println("Directory not exists in the given name");
              return feedBackMsg;
        public ArrayList<String> loadFileContent(String selectedStr)
             //System.out.println("inside loadFileContent()");
             String logFilePath="";
             String propFileName="";
             String line="";
             String choice="";
             String tempStr="";
             int startPos=0;
             int endPos=0;
             ArrayList<String> timeList=new ArrayList<String>();
             String userdir = System.getProperty("user.dir");
             try
                  logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                  propFileName=ResourceBundle.getBundle("catconfig").getString("propFileName");
                  propFileName=userdir+logFilePath+propFileName;
                  BufferedReader buffRead = new BufferedReader(new FileReader(propFileName));
                  if(selectedStr.equalsIgnoreCase("Device Discovery"))
                       choice="DD";
                  else if(selectedStr.equalsIgnoreCase("Network Discovery"))
                       choice="ND";
                  while ((line=buffRead.readLine()) != null) {                                        
                        if(line.contains(choice))
                             System.out.println(line);
                             startPos=line.indexOf("_");
                             endPos=line.indexOf(" =");
                             tempStr=line.substring(startPos+1, endPos);
                             System.out.println("tempStr : "+tempStr);
                             timeList.add(tempStr);
                   buffRead.close();          
             catch(Exception e)
                  System.out.println("Exception@loadFileContent : "+e);
             return timeList;
        public String getFileName(String timeStr)
             System.out.println("inside getFileName");
             String logFilePath="";
             String propFileName="";
             String line="";
             String tempStr="";
             int startPos=0;
             String userdir = System.getProperty("user.dir");
             try
                  logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                  propFileName=ResourceBundle.getBundle("catconfig").getString("propFileName");
                  propFileName=userdir+logFilePath+propFileName;              
                  BufferedReader buffRead = new BufferedReader(new FileReader(propFileName));              
                  while ((line=buffRead.readLine()) != null) {                                        
                        if(line.contains(timeStr))
                             System.out.println(line);
                             startPos=line.indexOf(" = ");                         
                             tempStr=line.substring(startPos+3, line.length());
                             System.out.println("tempStr : "+tempStr);                         
                   buffRead.close();          
             catch(Exception e)
                  System.out.println("Exception@loadFileContent : "+e);
             return tempStr;
        public ArrayList loadFile()
             String logFilePath="";
             String moduleFileName="";
             String line="";         
             ArrayList<String> moduleList=new ArrayList<String>();
             String userdir = System.getProperty("user.dir");
             try
                  logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
                  moduleFileName=ResourceBundle.getBundle("catconfig").getString("moduleFileName");
                  moduleFileName=userdir+logFilePath+moduleFileName;
                  BufferedReader buffRead = new BufferedReader(new FileReader(moduleFileName));              
                  while ((line=buffRead.readLine()) != null) {     
                       moduleList.add(line);                    
                   buffRead.close();          
             catch(Exception e)
                  System.out.println("Exception@loadFile : "+e);
             return moduleList;
    public static void main(String[] args) {          
         System.out.println("Inside main");     
         //String userdir = System.getProperty("user.dir");
         //System.out.println("userdir : "+userdir);
         /*ArrayList<String> fileNameList=new ArrayList<String>();
         String Choice="";     
         String logFileName="";     
         String logFilePath="";     
         String totalLog="";     
         String newLog="";     
         String folderName="";
         Choice=ResourceBundle.getBundle("catconfig").getString("Choice");
         logFileName=ResourceBundle.getBundle("catconfig").getString("logFileName");     
         logFilePath=ResourceBundle.getBundle("catconfig").getString("logFilePath");
         folderName=ResourceBundle.getBundle("catconfig").getString("folderName");
         totalLog=ResourceBundle.getBundle("catconfig").getString("fileName");     */
         /*try
              //to write the total log
              //folderCheck(folderName);
              //to find the details in the given log
              //findDetails();
              //to split the logs accordingly
              totalLog=logFilePath+totalLog;          
              fileNameList=getFileNames();;
              System.out.println("FileNameList size = "+fileNameList.size());
              for(int i=0;i<fileNameList.size();i++)
                   newLog=fileNameList.get(i).toString();
                   writeFile(totalLog,newLog);
              //to analyse the logs & to produce reports          
              //getValuesFromFilesOnly(Choice,logFileName);          
         }catch (Exception e)
              System.out.println(e.getMessage());
    }[                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    JSP is used for server validation.
    So you need a an application server (like Tomcat or Jboss) to execute your jsp files.
    you can create the .war file of your simple jsp application and put it in the server.
    then you will have to access your page using a web browser.
    the URL will be
    http://<ComputerName or IP Address>:<PortNumber>/<WarFileName>/<MainJspPage>
    (eg: http://100.100.100.252:8080/SimpleApplication/mainPage.jsp)
    -Achyuth

  • How  to include the inner classes in a jar file in netbeans ide

    Dear java friends
    how to say to netbeans ide that it has to include the
    inner classes in the jar file.
    (i have one single applet class
    with two inner classes that show up
    in the build/classes file but not in the jar).
    The applet works in the viewer but not
    in the browser (I believe because the
    xxx$yyy etc should be in the jar)
    willemjav

    First, please stop posting the same question multiple times:
    Duplicate of http://forum.java.sun.com/thread.jspa?threadID=5269782&messageID=10127496#10127496
    with an answer.
    Second, If your problem is that you can't do this in NetBeans, you need to post to somewhere that provides NetBeans support - like the NetBeans website's mailing list. These forums do not support NetBeans (or any other IDE) - they are Java language forums.

  • Netbeans IDE and the Jar file

    I can't find the jar file compiled by Netbeans anywhere. In the preferences it says the "dist" folder, but that returns nothing when I search my computer.
    I'm using the Mac OS X release, if that helps at all.

    I've just had a look at NetBeans (on a Windows machine). The jar file is not created until I choose "Build Main Project". At that point a helpful message appeared saying:To run this application from the command line without Ant, try:
    java -jar "C:\Documents and Settings\pbrockway.WXPD6OFF\WhereAmI\dist\WhereAmI.jar"The jar file also appears in the "Files" tab (under dist). There doesn't seem to be any way of running the jar file from the NetBeans IDE - or at least, I couldn't find it: others might be more knowledgable about this.

  • How to create jar file in WSAD ide?

    Hi,
    Can any one help me in creating jar file
    in WSAD ide?

    RTFM comes to mind, the manual often knows such things.

  • I am getting the following error: Unable to locate class: java.lang.NoClassDefFoundError: on an iPlanet WS. We have ensured that the classpath in jvm12.conf includes the jar file with path. Any ideas?

     

    Well, now I'm pulling my hair out even more because I can't get it to resolve anything in jaxws-rt.jar at runtime. Note: compile-time still works FINE.
    I was messing with classpaths and stuff (and the endorsed dirs option of course) and it was "working" to the extent I had posted before, but then I kept playing with it and at some point I said, this isn't working and I need to reset all this stuff back to the way it was.
    ... so I did that. And now it won't resolve "PolicyException:"
    java.lang.NoClassDefFoundError: com/sun/xml/ws/policy/PolicyException
    This doesn't mean anything to you guys I bet, but that happens when it FIRST gets inside the web service code, which references PolicyException (doesn't even use it at that point.. I'm assuming the import is screwing it up when it's in the constructor). So now it won't resolve at all. Before, it was getting past this point and telling me the "method not found" error on the next line or this same error for WSBindingProvider two lines down, when it's actually being used. AWESOME.
    I downloaded the latest jaxws-rt.jar and all its dependencies, shoved that into my lib folder, and set the endorsed dir to that folder (There's kind of a web of dependencies here. jaxws-rt.jar expects all its dependencies to be in the same folder, it seems, so I don't know how it was "working" before when I just copied jaxws-rt.jar into my separate endorsed dir - but I can't move all of those files to endorsed because I need them in my project (which expects them to be in the lib folder)). What happened? It went back to my original "String" error (first error in the first post), which means it's not getting endorsed at all from that location.
    What a mess.
    Can someone tell me what the heck I'm supposed to do with this jar file?

  • Creating jar file gives problem in WSAD IDE

    Hi,
    i programmatically created a Jar file successfully. I am able to open
    the jar file and read the jar file properly. But when i try to include that jar file into WSAD, it cannot recognize the class files within it.
    Any help would a great input.
    Thanks and Regards,
    Sapan.

    >
    2) U are having one program in which u are creating
    jar as well as using the class file in it at runtime
    using reflection. If this is the case then u might
    have to check manifest file of the project.
    If none of the above is the case then please explain
    little bit more, what r u trying to do.
    Regards,
    Samip.I m creating the jar file and then use the classes in the jar file through reflection / generics. I checked the default jar file that is created using jar command, and the manifest file doesnt have anything except, Sun Microsystems and jdk version.
    It seems that the problem is with the manifest of the jar file that is created. There is something that is missing in the jar file, and WSAD 4.0.3 expects the same.
    Regards,
    Sapan.

  • .jar file is not working properly :developed in NETBEANS

    Hi Gurus,
    i am using NETBEANS IDE 7.2.
    i am developing a project that interacts with databases 10g and COM ports of machine , these all processes are performed by .bat file which i am trying to run from jFramform , code works perfectly .bat file is also called perfectly when i run the project using F6 from the NETBEANS, for testing i placed some dialogue boxes on the form to test it ,
    but when i run executable .jar  file , form run successfully and dialogue box works perfectly but .bat file is not called by executable .jar file.
    this is how i call the .bat file...
      String filePath = "D:/pms/Libraries/portlib.bat";  
            try { 
              Process p = Runtime.getRuntime().exec(filePath); 
            } catch (Exception e) { 
                e.printStackTrace(); 
    and below is the contents of portlib.bat file
    java -jar "D:\SMS\SMS\dist\SMS.jar" 
    you must probably ask why i am calling a .jar file using .bat file .
    reason is that this .jar project sends message using GSM mobile , System.exit(); is compulsory to complete a job and then do the next one ,
    if i use the same file to execute this job it makes exit to entire the application (hope you can understand my logic).
    that's why i use extra .jar file in .bat file , when single job is completed .bat exits itself and new command is given.
    Problem is that code is working perfectly in NETBEANS when i run the project but when i run .jar then .bat file is not working  ,
    thanks.

    Thanks Sir ,
    You need to first test an example that works like the one in the article.
    There are plenty of other examples on the web - find one you like:
    http://javapapers.com/core-java/os-processes-using-java-processbuilder/
    I tried this one.
      try {
                ProcessBuilder dirProcess = new ProcessBuilder("D:/SMS/SMS/Send_message.bat");
                 File commands = new File("D:/SMS/SMS/Send_message.bat");
                 File dirOut = new File("C:/process/out.txt");
                 File dirErr = new File("C:/process/err.txt");
               dirProcess.redirectInput(commands);
                 dirProcess.redirectOutput(dirOut);
               dirProcess.redirectError(dirErr);
                 dirProcess.start();
            } catch (IOException ex) {
                Logger.getLogger(mainform.class.getName()).log(Level.SEVERE, null, ex);
    as instructed in the article i compiled  both the projects at same version or sources and libraries which is 1.7
    here is my version details
    C:\>javac -version
    javac 1.7.0_07
    C:\>java -version
    java version "1.7.0_07"
    Java(TM) SE Runtime Environment (build 1.7.0_07-b11)
    Java HotSpot(TM) Client VM (build 23.3-b01, mixed mode, sharing)
    inside the NETBEANS IDE c:\process\err.txt  remains empty and code works perfectly , but when I run executable .jar file( by double clicking on that file in dist directry) then c:\process\err.txt becomes full with this error text and there is no response from calling D:\SMS\SMS\send_message.bat
    here is the error text
    java.lang.UnsupportedClassVersionError: sms/SMSMAIN (Unsupported major.minor version 51.0)
      at java.lang.ClassLoader.defineClass0(Native Method)
      at java.lang.ClassLoader.defineClass(Unknown Source)
      at java.security.SecureClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.defineClass(Unknown Source)
      at java.net.URLClassLoader.access$100(Unknown Source)
      at java.net.URLClassLoader$1.run(Unknown Source)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClass(Unknown Source)
      at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Exception in thread "main"
    here is /SMS/SMS
    unknown source ?

  • Crystal Report not works in JAR File

    I'm using Eclipse All in one, which includes Crystal Reports.. I Connected my Java program with Crystal Reports and its working properly. Now my problem is that the Report is not working in JAR files.. It throws some exception as
    "com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: com.businessobjects
    com.businessobjects.reports.sdk.JRCCommunicationAdapter---- Error code:-2147215357 Error code name:internal"
    Whats the Error.. I don't know. I think that i may missed some CLASSPATH Files. The included CLASSPATH Files are:
    ReportViewer.jar
    jrcerom.jar
    Concurrent.jar
    CrystalCharting.jar
    CrystalCommon.jar
    CrystalContentModels.jar
    CrystalExporters.jar
    CrystalExportingBase.jar
    CrystalFormulas.jar
    CrystalQueryEngine.jar
    CrystalReportEngine.jar
    CrystalReportingCommon.jar
    icu4j.jar
    keycodeDecoder.jar
    log4j.jar
    MetafileRenderer.jar
    rasapp.jar
    rascore.jar
    rpoifs.jar
    Serialization.jar
    URIUtil.jar
    xercesImpl.jar
    xml-apis.jar
    and the mysql-connector jar file
    Anybody help me please...

    Unable to load database connector
    'com.crystaldecisions.reports.queryengine..driverImpl.
    DriverLoader
    now you have any idea.. pleaseIs that a typo where you have two periods below?
    queryengine..driverImplOther than that I don't think anybody here can help you with that. If your classpath includes all necessary JAR files and you are able to access all your resources from within your application JAR file, then I imagine there is a problem with the third-party crystal decisions JAR file or how you are attempting to use it.
    My advice to you is to try and contact support with the vendor or provider of this API or possibly try posting on a support forum on their website to see if somebody can help you there.

  • How to modify a specific class in jar file ?

    I've downloaded a jar file for applet, the jar file works fine... but when I extract a specific class file from the jar file and just recompie it from my IDE (Eclipse) without even making any change and then compress again jar class files including the new modified class file instead of the old one (without any modifications to other classes)... then I get
    (NoSuchMethodError ) exception whenever methods of other classes are invoked from within the modified class !!
    ...The manifist file of the jar file reads the following line
    Created-By: 1.4.0_01 (Sun Microsystems Inc.)
    I thought it means that jar class files were built using JDK 1.4.0_01 ...I used JDK 1.5.0_01 in my IDE...
    I thought JRE incompatiblity was the reason of the problem so I downloaded JRE 1.4.0_01 and used it to build this class file... but i got the same exception..
    so what is the main reason of the problem ? ...should I make changes to IDX files accompanying applet jar files ??
    If no, then how can I overcome this problem and be able to change and rebuild a specific class from this jar file ?
    (I cannot rebuild all classes in jar because there are errors I cannot resolve !!)

    Could you please clarify: do you want to run your project or a project from an independent jar?
    In the first case just select Run Project from the project context menu or select a class with main method and click Run File in the class context menu.
    Regarding the second case:
    - I don't think there is such a feature in the IDE (running third party jars is not an IDE function). Could you explain why you need this?

  • Error while deploying a JAR-File into 8i !

    Hello to all Oracle experts,
    At the attempt to deploy a Jar file into the 8i the following
    error message comes onto Shell level:
    initialization complete
    loading : com/sun/xml/tree/XmlDocumentBuilder
    ORA-01536: space quota exceeded for tablespace 'PROCON_DATA'
    Error while loading com/sun/xml/tree/XmlDocumentBuilder
    ORA-06502: PL/SQL: numeric or value error
    ORA-06512: at "SYS.DBMS_LOB", line 700
    ORA-06512: at "PROCON.LOADLOBS", line 1
    ORA-06512: at line 1
    creating : com/sun/xml/tree/XmlDocumentBuilder
    Error while creating class com/sun/xml/tree/XmlDocumentBuilder
    ORA-29509: incorrectly formed Java binary class definition
    The command was:
    loadjava -user procon/procon@t2srv1:1521:PROCON -thin -verbose -schema PROCON xml_un.jar
    It would please me if somebody has an idea to this error !
    null

    Hi Olivier,
    you could try the following approach:
    1. Package your JAR files as J2EE Engine libraries and deploy them on it as described here: <a href="http://help.sap.com/saphelp_nw04/helpdata/en/9f/2ade3fc6c6ec06e10000000a1550b0/frameset.htm">Working with J2EE Libraries</a>.
    2. Set reference to this library from the application that use them. Depending on your application, refer to the appropriate documentation:
    -- reference from a J2EE app -> see <a href="http://help.sap.com/saphelp_nw04/helpdata/en/15/d5d93fe80fed06e10000000a1550b0/frameset.htm">Referencing Libraries in Applications</a>
    -- reference from a portal app -> see <a href="http://help.sap.com/saphelp_nw04/helpdata/en/02/788540ae1dbb4de10000000a1550b0/frameset.htm">Referencing Elements</a>
    Hope that helps!

  • Unable to access jar file error !

    hello,
    i have built my netbeans project and obtained the hequalifies.jar file . unfortunately when i'm trying to run this jar file from the prompt command I'mgetting the error: unable to access jar file
    here is the command i'm typing:
    C:\Users\User\Documents\NetBeansProjects\hEqUALIFIES\dist>java -jar " C:\Users\U
    ser\Documents\NetBeansProjects\hEqUALIFIES\dist hequalifies.jar "
    anyone has any clue?
    10x!

    ok i'm gonna make it easier on you.
    i gess i found what is the problem but have no idea how to solve it.
    when i obtained the .jar file i also obtained a README.txt file in which it is written the following phrase:
    ** If a library on the projects classpath also has a Class-Path element*
    specified in the manifest,the content of the Class-Path element has to be on the projects runtime path.
    I'M SORRY BUT I DID NOT UNDERSTAND WHAT IS MEANT BY: what is "the projects runtime path"?
    the content of my manifest is:
    Manifest-Version: 1.0
    Ant-Version: Apache Ant 1.7.1
    Created-By: 10.0-b23 (Sun Microsystems Inc.)
    Main-Class: hequalifies.ui.HeQualifies
    Class-Path: lib/PlugIn
    X-COMMENT: Main-Class will be added automatically by build
    I'm having problem with lib/plugin.

  • Program will run with errors, but not at all in a .jar file

    First off, here is my program right now:
    import java.io.*;
    import java.util.*;
    import javax.swing.JOptionPane;
    public class prune
        public static void main(String args[])
            String steamid="",time="";
            BufferedReader infile = null;
            BufferedWriter outfile = null;
            FileReader fr = null;
            FileWriter wr = null;
            StringTokenizer strtk = null;
            String line = null;
         JOptionPane.showMessageDialog
          (null, "Vault.ini Pruner v2");
         String filepath = JOptionPane.showInputDialog("Enter the filepath to your vault.ini file.");
         String strdeletenumber = JOptionPane.showInputDialog("Enter the number that vault entries under will be deleted");
         int deletenumber = Integer.parseInt(strdeletenumber);
            try
                infile = new BufferedReader(new FileReader(filepath));
                outfile = new BufferedWriter(new FileWriter(filepath));
            catch(IOException ioe)
                JOptionPane.showMessageDialog
          (null, "Can't open vault.ini:" + ioe);
            try
                while((line=infile.readLine())!=null)
                    strtk = new StringTokenizer(line);
                    steamid = strtk.nextToken();
                    time = strtk.nextToken();
                    if(Integer.parseInt(time)>=deletenumber)
                        outfile.write(steamid);
                        outfile.write(" ");
                        outfile.write(time);
                        outfile.newLine();
            catch(IOException ioe)
                JOptionPane.showMessageDialog
          (null, "Error:" + ioe);
            try
                outfile.close();
                infile.close();
            catch(IOException ioe)
               JOptionPane.showMessageDialog
          (null, "Error:" + ioe);
                System.exit(0);
    }The program is supposed to open a vault.ini file and delete entries with a number lower than specified.
    Vault files are set up like this:
    STEAMID:X:XXXX 100000
    Right now if I run the program through command prompt it erases both the vault.ini and new vault.ini. I am also trying to put it in an executable jar file and when I do that I get a "Failed to load main class manifest attribute" error. Any ideas on what is causing this?

    I don't know what is happening. I put your exact code into a small build environment and used a build file for ant that I have and it works just fine. Manifest files are a total pain which is why I use a tool to generate it. I know that the last line has to be blank and that no line can be over a certain length.
    You've now spent several days avoiding ant and I got it running with ant in about 3 minutes. I'm really missing something.
    For reference, the build file is below should you change your mind. Put your prune.java in a new directory named "src" and save this file below as build.xml in the parent directory of "src". Run the program with java -jar lib/prune.jar
    <project name="jartest" default="main" basedir=".">
    <!-- location properties -->
        <property name="src.dir" location="src" />
        <property name="dest.classes.dir" location="classes" />
        <property name="dest.lib.dir" location="lib" />
    <!-- value properties -->
        <property name="dest.lib.name" value="prune.jar" />
        <property name="main.class" value="prune" />
    <!-- compile time value properties -->
        <property name="compile.debug" value="true" />
        <property name="compile.optimize" value="false" />
        <property name="compile.deprecation" value="true" />
        <property name="compile.source" value="1.4"/>
        <property name="compile.target" value="1.4"/>
    <!-- build -->
        <target name="main" depends="compile,jar" />
        <target name="compile">
            <mkdir dir="${dest.classes.dir}"/>
            <mkdir dir="${dest.lib.dir}"/>
            <javac srcdir="${src.dir}"
                         destdir="${dest.classes.dir}"
                         debug="${compile.debug}"
                         deprecation="${compile.deprecation}"
                         optimize="${compile.optimize}"
                         source="${compile.source}"
                         target="${compile.target}" >
            </javac>
        </target>
    <!-- clean -->
        <target name="clean">
            <delete dir="${dest.classes.dir}"/>
            <delete dir="${dest.lib.dir}"/>
        </target>
    <!-- jar -->
        <target name="jar" depends="compile">
            <jar destfile="${dest.lib.dir}/${dest.lib.name}"
                    basedir="${dest.classes.dir}">
                <manifest>
                    <attribute name="Built-By" value="${user.name}"/>
                    <attribute name="Main-Class" value="${main.class}" />
                </manifest>
            </jar>
        </target>
    </project>

Maybe you are looking for

  • Zen Vision:M, Mediasource transfer problem and Digital Camera

    It used to work. Norton 360 has made a mess of lots of things... I can no longer transfer via Mediasource to my Zen Vision:M 60gb. I can view, play and rename files from Mediasource and I can transfer to the Vision:M via windows explorer (of course y

  • Drag and drop column header in a table

    Hi all, I need to drag the Column header in a table dynamically. When I drag the column out of the table, The table should be rearranged accordingly NOTE: The output is displayed in the form of XML(XSL). Pls help me solve the problem . Thanks in adva

  • Infopath Form Crashes Recipients Computer

    Dear Microsoft, I created an Infopath form on 2010 on a shared drive.  And I am publishing it to a sharepoint site.  There are multiple tables in the form, and multiple submit buttons in the form.  The submit buttons send the form to an email address

  • Send a render job to Media Encoder on another system?

    I am a recovering Final Cut Pro user. Switched over about version FCP X 10.3. The railroad tie that broke the camel's back for me was a removed feature I am hoping I can do with Premiere in some way. In FCP 7 and even FCP X up to 10.3, you had the op

  • After Effects 13.1.1 won't launch in Yosemite 10.10, any ideas? :)

    After Effects 13.1.1 won't launch in Yosemite 10.10, any ideas?