 |
any java coder around? alive? help plz |
 |
30.11.2004, 22:04
|
#1
|
Silence
Join Date: 11 2004
Location: back to meta level
Posts: 3,926
Rep Power: 5
|
any java coder around? alive? help plz
http://coltrane.wiwi.hu-berlin.de/le...omework_1.html
deadline is knocking & i can't deal with last probs.
39 errors
root@lil:~/homework/MAT# javac SearchResults.java
root@lil:~/homework/MAT# javac LilitHw1.java
LilitHw1.java:27: cannot resolve symbol
symbol : variable Konsole
location: class LilitHw1
auswahl = Konsole.readInt("Please chose an option");
^
1 error
root@lil:~/homework/MAT# java LilitHw1.class
Exception in thread "main" java.lang.NoClassDefFoundError: LilitHw1/class
if smb could help asap, i'll attach the file.
thx voraus
|
|
|
 |
|
 |
01.12.2004, 09:06
|
#2
|
★★★★★★★★★★★★★
Join Date: 08 2004
Location: London, UK
Age: 46
Posts: 16,531
Rep Power: 8
|
Quote:
Originally Posted by Moonlight
http://coltrane.wiwi.hu-berlin.de/le...omework_1.html
deadline is knocking & i can't deal with last probs.
39 errors
root@lil:~/homework/MAT# javac SearchResults.java
root@lil:~/homework/MAT# javac LilitHw1.java
LilitHw1.java:27: cannot resolve symbol
symbol : variable Konsole
location: class LilitHw1
auswahl = Konsole.readInt("Please chose an option");
^
1 error
root@lil:~/homework/MAT# java LilitHw1.class
Exception in thread "main" java.lang.NoClassDefFoundError: LilitHw1/class
if smb could help asap, i'll attach the file.
thx voraus
|
----
hey Moonlight! how is it going/ hope all is well!
I'll ask our guys in software what solution they have to your issues ... unfortunately, the filed I am in is a little bit different ... it's silicon ip field and semiconductors - I am not a coder  but I'll ask the guys to help you out with this ... let me check with our s/w engineers first ...
cheers!
Hrachya
__________________
Мадмазель, Медам, Месье! "Глория" меняет курс и направляется в Кейптаун! Кому это не нравится будет расстрелян на месте. (с)
http://texneg.livejournal.com
|
|
|
 |
01.12.2004, 09:16
|
#3
|
★★★★★★★★★★★★★
Join Date: 08 2004
Location: London, UK
Age: 46
Posts: 16,531
Rep Power: 8
|
перепутал приват с эфиором - бывает ...
__________________
Мадмазель, Медам, Месье! "Глория" меняет курс и направляется в Кейптаун! Кому это не нравится будет расстрелян на месте. (с)
http://texneg.livejournal.com
|
|
|
 |
|
 |
01.12.2004, 09:22
|
#4
|
Silence
Join Date: 11 2004
Location: back to meta level
Posts: 3,926
Rep Power: 5
|
thx considering  i didn?t go any further. if understood the prob, mayb could do smth. i believed it should b right. in case posting the codes
Code:
class LilitHw1
{
//To change the search term, just change this
static String Term = "implementation";
public static void main(String[] args)
{
double eingabe1;
double ergebnis = 0.0;
int auswahl;
System.out.println("\nDesktop Search beta version");
System.out.println("\nThis program allows textual search for keywords in .doc, .txt, .html,");
System.out.println(" files locally stored in your computer.\n");
System.out.println("The current search term is fixed in this version and is: " + Term + ". ");
do
//User manu
{
System.out.println("\n\n\nDesktop Search beta version");
System.out.println("");
System.out.println("(1) PDF");
System.out.println("(2) TXT");
System.out.println("(3) DOC");
System.out.println("(4) HTML");
System.out.println("(0) Ende");
auswahl = Konsole.readInt("Please chose an option");
switch (auswahl)
{
case 1 : {
System.out.print("\nThe PDF search result is : ");
runPDFsearch();
break;
}
case 2 : {
System.out.print("\nThe TXT search result is : ");
runTXTsearch();
break;
}
case 3 : {
System.out.print("\nThe DOC search result is : ");
runDOCsearch();
break;
}
case 4 : {
System.out.print("\nThe HTML search result is : ");
runHTMLsearch();
break;
}
case 0 : {
System.out.println("\ncaio!");
break;
}
default:{
System.out.println("\nInvalid choice.\n");
}
}
}while (auswahl != 0);
}
private static void runPDFsearch()
{
int Lines = SearchResults.pdfResultsFN.length;
System.out.println("There are " + Integer.toString(Lines) + " matching lines\n\n");
for(int count=0; count < Lines; count++)
{
System.out.print(SearchResults.pdfResultsFN[count] + " : " );
ProcessLine( SearchResults.pdfResultsTL[count] );
}
}
private static void runTXTsearch()
{
int Lines = SearchResults.txtResultsFN.length;
System.out.println("There are " + Integer.toString(Lines) + " matching lines\n\n");
for(int count=0; count < Lines; count++)
{
System.out.print(SearchResults.txtResultsFN[count] + " : " );
ProcessLine( SearchResults.txtResultsTL[count] );
}
}
private static void runDOCsearch()
{
int Lines = SearchResults.docResultsFN.length;
System.out.println("There are " + Integer.toString(Lines) + " matching lines\n\n");
for(int count=0; count < Lines; count++)
{
System.out.print(SearchResults.docResultsFN[count] + " : " );
ProcessLine( SearchResults.docResultsTL[count] );
}
}
private static void runHTMLsearch()
{
int Lines = SearchResults.htmlResultsFN.length;
System.out.println("There are " + Integer.toString(Lines) + " matching lines\n\n");
for(int count=0; count < Lines; count++)
{
System.out.print(SearchResults.htmlResultsFN[count] + " : " );
ProcessLine( SearchResults.htmlResultsTL[count] );
}
}
//This will do all the printing with the '...' if needed
private static void ProcessLine(String ProcessString)
{
int Length = ProcessString.length();
int Location = FindTerm(ProcessString);
if(Location < 0 || Location > Length){
System.out.print("Error\n");
System.out.println(Location);
return;
}
int End = Term.length() + Location;
if (Location > 10){
System.out.print("...");
System.out.print(ProcessString.substring(Location-10, Location));
}else{
System.out.print(ProcessString.substring(0, Location));
}
System.out.print(ProcessString.substring(Location,Location+Term.length()));
if ((End + 10) < Length){
System.out.print(ProcessString.substring(End, End+10));
System.out.print("...");
}else{
System.out.print(ProcessString.substring(End, Length));
}
System.out.print("\n");
}
//This will find an index in the string where the term starts
private static int FindTerm(String ProcessString)
{
int iRet=-1;
//Put into a char array to get at individual bytes
int Length = ProcessString.length();
char[] ProcessCharArray =
ProcessString.toLowerCase().toCharArray();
//same as above
int TermLength = Term.length();
char[] TermCharArray = Term.toLowerCase().toCharArray();
//look for the term
for(int processcount=0; processcount < Length; processcount++)
{
//find the begining
if (ProcessCharArray[processcount] == TermCharArray[0]){
iRet=processcount;
//see if the whole term is found
for(int termcount=0; termcount<TermLength; termcount++){
if (ProcessCharArray[processcount+termcount] !=
TermCharArray[termcount]){
//keep trying
iRet=-1;
}
}
if(iRet == processcount){
//found it
return iRet;
}
}
}
//didn't find it
return iRet;
}
}
|
|
|
 |
01.12.2004, 11:21
|
#5
|
Ego coder
Join Date: 07 2004
Location: Yerevan, Armenia
Age: 44
Posts: 3,738
Rep Power: 5
|
I'm not so familiar with java, but the problem is that java "doesn't know" who is "Konsole", check out whether you imported the lib (correctly). By the way, there is a link to the Konsole class implementation, try to place that above the LilitHw1 class. 
Ciao.
__________________
Каждый сам кузнец своего счастья, и несчастья тоже.
|
|
|
 |
|
 |
01.12.2004, 13:15
|
#6
|
Silence
Join Date: 11 2004
Location: back to meta level
Posts: 3,926
Rep Power: 5
|
AvDav: thx so so much!! i had even translated german text in the given file, but forgot 2 add Konsole.class (no way 2 replace the hw1). finally no errors, but prog runned only 2 prove me that is working not the way it was supposed to!! after classes i?ll have only some hrs b4 the deadline..
Quote:
12 errors
bash-2.05b$ javac LilitHw1.java
bash-2.05b$ javac SearchResilts.java
error: cannot read: SearchResilts.java
1 error
bash-2.05b$ java LilitHw1
Desktop Search beta version
This program allows textual search for keywords in .doc, .txt, .html,
files locally stored in your computer.
The current search term is fixed in this version and is: implementation.
Desktop Search beta version
(1) PDF
(2) TXT
(3) DOC
(4) HTML
(0) Ende
Please chose an option 1
The PDF search result is : There are 7 matching lines
FILE - implementation : implementation
FILE - implementation123456789 : implementation123456789
FILE - implementation123456789abcdef : implementation123456789a...
FILE - 123456789implementation : 123456789implementation
FILE - 123456789abcdefimplementation : ...6789abcdefimplementation
FILE - 123456789implementation123456789 : 123456789implementation123456789
FILE - 123456789abcdefimplementation123456789abcdef : ...6789abcdefimplementation123456789a...
Desktop Search beta version
(1) PDF
(2) TXT
(3) DOC
(4) HTML
(0) Ende
Please chose an option 2
The TXT search result is : There are 7 matching lines
FILE - implementation : implementation
FILE - implementation123456789 : implementation123456789
FILE - implementation123456789abcdef : implementation123456789a...
FILE - 123456789implementation : 123456789implementation
FILE - 123456789abcdefimplementation : ...6789abcdefimplementation
FILE - 123456789implementation123456789 : 123456789implementation123456789
FILE - 123456789abcdefimplementation123456789abcdef : ...6789abcdefimplementation123456789a...
Desktop Search beta version
(1) PDF
(2) TXT
(3) DOC
(4) HTML
(0) Ende
Please chose an option 3
The DOC search result is : There are 7 matching lines
FILE - implementation : implementation
FILE - implementation123456789 : implementation123456789
FILE - implementation123456789abcdef : implementation123456789a...
FILE - 123456789implementation : 123456789implementation
FILE - 123456789abcdefimplementation : ...6789abcdefimplementation
FILE - 123456789implementation123456789 : 123456789implementation123456789
FILE - 123456789abcdefimplementation123456789abcdef : ...6789abcdefimplementation123456789a...
Desktop Search beta version
(1) PDF
(2) TXT
(3) DOC
(4) HTML
(0) Ende
Please chose an option 4
The HTML search result is : There are 7 matching lines
FILE - implementation : implementation
FILE - implementation123456789 : implementation123456789
FILE - implementation123456789abcdef : implementation123456789a...
FILE - 123456789implementation : 123456789implementation
FILE - 123456789abcdefimplementation : ...6789abcdefimplementation
FILE - 123456789implementation123456789 : 123456789implementation123456789
FILE - 123456789abcdefimplementation123456789abcdef : ...6789abcdefimplementation123456789a...
Desktop Search beta version
(1) PDF
(2) TXT
(3) DOC
(4) HTML
(0) Ende
Please chose an option 0
caio!
|
instead of printing real file names, & then the line containing the search term, it prints the stuff in prog? any idea what 2 do?
|
|
|
 |
24.01.2005, 16:41
|
#7
|
Дошкольник
Join Date: 08 2004
Location: Oxford
Age: 46
Posts: 141
Rep Power: 0
|
Quote:
Originally Posted by Moonlight
|
Hey, Moonlight. Studierst du Informatik an der HU? Wenn, ja, dann können wir uns treffen, ich mache jetzt Bioinformatik an der TFH, und habe Ahnung in Java
|
|
|
24.01.2005, 19:55
|
#8
|
Silence
Join Date: 11 2004
Location: back to meta level
Posts: 3,926
Rep Power: 5
|
ja!!!!! ich studiere auch wirtschaft informatik an der hu!! und echt brauche hilfe mit java!!!! danke sehr! details over pm
|
|
|
 |
Re: any java coder around? alive? help plz |
 |
01.02.2006, 19:48
|
#9
|
Silence
Join Date: 11 2004
Location: back to meta level
Posts: 3,926
Rep Power: 5
|
Re: any java coder around? alive? help plz
nevermind, the deadline missed
Last edited by Moonlight; 01.02.2006 at 22:56.
|
|
|
All times are GMT. The time now is 17:27. |
|
|