Can a exception be diasabled? in eclipse
I am finding an exception extremely difficult to cope with,
ArrayIndexOutOf bounds
No matter what I do, when I try to access the array, I am getting an error.
Is there an way to over come this exception checking all together?
I tried to create my own exception but even that is stopping the execution of the code and coming to the catch block. I want my code to run in spite of an exception.
I am using eclipse, and seems to have a way disable the exception or to increase the hitcount, even if I disabled or if I put the hitcount to some large integer too, I am getting exception.
Some one please help me.
I agree with georgemc: exceptions are used to indicate that an exceptional circumstance occurred, a situation where the assumptions of the regular program flow don't hold. They can't be disabled and shouldn't be ignored.
In this particular case, you are trying to access an element of an array that does not exist, meaning either your assumptions about the length of the array are wrong, or your assumption about the legality of the index value you use to access the array is. Remember that arrays are fixed in length, and that their indexes run from 0 to the length of the array minus 1. An empty array doesn't have any valid indexes.
It is your responsibility to make sure you access an array in a legal way, meaning you will either need to create programmatic checks to test your assumptions and respond accordingly, or reevaluate your assumptions until you find the correct ones.
For example, if you assume that the array you are dealing with will always have at least a length of 5, so you can safely access array[4], you need to decide what to do if this assumption fails for some reason. What should happen if the array is not length 5? What should happen if the array is null? You could create a check in your code that checks the length of the array before you use it. If the length of the array is less than 5, you could just ignore it and go on with the rest of the program/method. Or you could throw an IllegalArgumentException if the array is a method parameter called by code outside your control. Or you could fix the code that sets/creates the array. In any case, you have to do something.
Similar Messages
-
How can I set up breakpoints in eclipse for jsp?
I saw somebody can set up breakpoints in eclipse for jsp.
But I can not do that on my eclipse.
What's the difference?
Thanks.I don't think this had a keyboard shortcut even before (checked in CS6). There's an alternative though.
1. Create a JSFL file with following code and save it in the commands folder as 'Remove Tween'.
fl.getDocumentDOM().getTimeline().setFrameProperty('tweenType', 'none');
2. Now goto Edit Menu > Keyboard Shortcuts..
3. Search for 'Remove Tween' and assign a keyboard shortcut to it.
Now everytime you press the assigned key - jsfl script is executed which essentially removes the tween from selected frame. (works for Classic and Shape tween but not Motion Tweens) -
Can i use ADF faces in Eclipse to develop JSF applications
Hi,
i have used Jdeveloper to develop JSF based application but for some reasons
i need to run this application in Ecplise. Is there any possibility for that.Yes,
you can run ADF Faces applications in Eclipse. However, if you use ADF for binding then this may be a bit more complicated
Frank -
can i import Jdeveloper project into Eclipse 4.7 juno????please help me.
when i tried this it is giving some errors in project ie mismatching in configurations....!so i want soln please .Hi,
first recommendation is to not use Eclipse natively but use OEPE that ships with Eclispse Juno. This way you have the IDE prepared for ADF projects. However, still the JDeveloper workspace structure does not fit the Eclipse structure.
Frank -
my company phone was set up by our IT dept., he used his email and password, now i can't except some downloads. What do i need to do to change these to my account?
It is a company phone, don't mess with it unless you get authorization from the company. The activation, and I suspect Find My Phone are all tied to the company for a reason. Unless of course you don't value your job.
-
How can I build automatically jar with Eclipse?
Hi,
I try to build automatically jar file each time when I save my project.Until now I used right click and Export to jar but that take me more time and it is not efficiently.I have try to configure an new builder from project->properties-> builders options but when I Clean it give me the following error:
The file does not exist for the external tool named MY_Builder
Please help me If you can, all that I try to find is to generate automatically jar file each time when I save or clean the project,no matter the method as long as it's working on Eclipse
Many thanks,Hello,
But How can I do that ? I make a new ant compiler but I have some errors:(. I don't know how to configure this ant.Can u help me please?
Thanks, -
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 can i open Jbuilder project in Eclipse
Hi All
Can anyone tell me that how can i open Jbuilder 2006 project(.jpx)
in Eclipse 3.2.2
RegardsHello, perhaps this will be helpful : http://www-128.ibm.com/developerworks/library/os-ecidea/.
*Edit - This link will be much more useful : http://www.bleb.org/software/jpx2eclipse/
Laginimianeb
Message was edited by:
laginimaineb -
How can I use a file in Eclipse?
Hi mates,
I dnt know how I can use Eclipse to operate a file, like the sample input file. I try to set a file name in "Argument" tab and create a file in the project, but it 's not working.
CHEERS,
EltonLook around in the CDT Forum, this is a common question (and I'm not up to date with recent developments)
-
Can't start glassfish server using Eclipse
i use the eclipse J2EE version to write my java program with Glassfish server. but when i compile the program,it take a long time to start the glassfish server, finally, it fail to start the server.
how can i fix it?You need to ask this in Glassfish forum.
-
How can I operate txt file in Eclipse?
Hi mates,
I dnt know how I can use Eclipse to operate a file, like the sample input file. I try to set a file name in "Argument" tab and create a file in the project, but it 's not working.
CHEERS,
EltonThanx for reply!
here is my code,
import java.io.*;
import java.util.*;
public class ManageTestMarks {
* @param args
public static void main(String[] args)
// TODO Auto-generated method stub
throws CloneNotSupportedException, IOException {
Menu menu = new Menu();
menu.fillData(args[0]); // i wanna open a file in this function;
class Menu{
private Course course = new Course();
public boolean fillData(String fileName) throws IOException
BufferedReader bufr = new BufferedReader(new FileReader("fileName"));
String inputLine;
inputLine = bufr.readLine();
fillFirstLine(inputLine);
return true;
public boolean fillFirstLine(String line)
}Regards,
Elton -
Can't add cloud system to Eclipse - Password SSO problem
Hi folks,
Ok so I'm doing the openSAP Hanacloud2 course.
When I go to set up my Eclipse and in the HANA Development perspective I ask to "add cloud system", I put in hanatrial.ondemand.com, my account, user id and I've tried all my usual passwords, but it still doesn't work.
Regardless of what I put in I get the response:
"The identify of user i003170 could not be verified for
https://services.hanatrial.ondemand.com/services/v1/instances/i003170trial/persistence/v1/schemas/.
Please very the supplied user name and password and execute the command again."
The trouble is, as a SAP Employee, everything on the web logs me in by SSO. I can't see anywhere in the HCP to reset the password or anywhere in Eclipse to use SSO?
So I'm stuck. Any suggestions????
Rgds,
JocelynHey Jocelyn,
it's the SAP ID Service / SCN password. Here you go:
SAP Community Network: Forgot Your Password?
Cheers,
--Vlado -
I can't start with jawin in eclipse
i created a project named on 'study' in eclipse. and i imported Jawin.jar to 'study' project.
And created a HelloDll java file just as the file in Demos folder.
When i run it, a exception occured:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jawin in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:822)
at java.lang.System.loadLibrary(System.java:992)
at org.jawin.Bootstrap.<clinit>(Bootstrap.java:43)
at org.jawin.FuncPtr.<init>(FuncPtr.java:79)
at test.HelloDll.main(HelloDll.java:29)
What should i do to troubleshoot it?In Eclipse menu: Run / Debug...
In the Configurations left pane, choose your Java Application configuration
Click on Arguments tab in the right pane
Add to VM Arguments box the java.library.path system property that must point to the folder where is located Jawin.dll:
-Djava.library.path=some_jawin_dll_folder -
Can't create JavaFX project in Eclipse
JavaFX 1.2 and Eclipse Ganymede with JavaFX plugin
There's an error in the project dialog saying the JavaFX SDK location was not found
I saw something possibly related in the Release notes
http://www.javafx.com/docs/gettingstarted/eclipse-plugin/release-notes.jsp
However, this kind of error scares me away from using JavaFX if I can't create any
applications without applying some workaroundsHave you set the JAVAFX_HOME environment variable as specified?
Maybe it should have been set by the JavaFX installer, but otherwise, I don't see that as a kludge from the Eclipse plug-in point of view, as if it is not set, I don't see how it could guess the location.
And well, if you are afraid of bugs and workarounds, you should avoid JavaFX, indeed, at least until next year... :-)
The platform is still a bit green; some even say it is still beta but I find it, and lot of other people too, already very usable. -
I can throw exception from a catch
Hello,
I have created a new Exception : myException (for example).
and, i can't throw it under a catch bloc !!
My code :
public myMethod( ... ) throw myException {
try {
if(true) thorw new NullPointerException("test nll pt");
} catch(NullPointerException nullPt) {
if(true) throw new myException("toto",nullPt.getMessage());
this code doesn't want to throw "myException" from the "catch" !
Why ?
myException extends the class Exception.
Thanks.
maxx.First, I assume you didn't cut and paste the code, as what you have there won't compile. Can you 1) paste the actual code and 2) be a bit more specific about what's happening?
Aside from a couple of misspellings, I don't see why it wouldn't throw myException. Is it not compiling? Running but not throwing any exception? Throwing a different exception?
Maybe you are looking for
-
What are the changes to be done on BW end during hardware change of source system?
Hello Gurus, There is some hardware changes happening and I need help in certain things which I need to do from BW point of view. First of all, I have attached a figure showing my system landscape. I would kindly request you to go though the fig fi
-
Unable to connect to ITunes message reads Service Apple Mobile Device failed to start. Verify that you have sufficient privileges to start services
-
Payment transfer as a replacement of direct deposits or check is not doing
We have configured payment method 'X' as a transfer in the table T042Z which has name of the print program RFFOUS_T. When we tried to the transfer as a replacement of direct deposit or check the system is giving an error message "No payment selected
-
"A USB device is drawing too much power..." External Harddrive
My 15" Macbook Pro, OS X, 10.6.8, 2GHz Intel Core i7, 4GB memory keeps booting my 1 TB Seagate external harddrive off because it is drawing too much energy. It's done this repeatedly for about two weeks, and now it won't appear on the desktop (while
-
I just changed form Zen7 Sp1 to Zen7 Sp1 HP2 I got plenty of Compaq D510 with ide drive. With the sp1 only there were ok, but had problem with the DC7700. Now when I'm booting with the d510 I got an error from udev Udev event 3222 Create_node: symlin