Win a copy of Getting started with Java on the Raspberry Pi this week in the Raspberry Pi forum!

Ben Buchli

Ranch Hand
+ Follow
since Mar 26, 2004
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ben Buchli

there is a great site about linux on laptops with lots of tutorials, how-to's and links to other sites:

I'm running slackware and xp on my asus laptop. no problems so far...
18 years ago
thanks for your help guys, especially for not posting code. I need to understand this...

Anyway, I have to implement a ListInterface provided by my teacher. In the method requirement of contains() it says:

This method compares the incoming data item with the
items in the list using the "equals" method of the object.
Be sure to override the "equals" method of any class of objects
that must be stored in such a list.

I know how to override methods, but I dont know where I would do it. In my ListArray class??? Also, if I understand you correctly, Svend, if I dont know what type of objects will be stored in this list, the only test for equality would be object1.equals( object2 ) which would return true only if they reference the same object, correct? So in this case I would not have to override the equals method. Correct??
I hope my questions make sense.
thanks again for helping
19 years ago
Hi there,
I have an assignment to implement a ListArray ADT and ListLinked ADT. I basically have to implement the equivalent to the java ArrayList and LinkedList classes. This is not a problem and I'm pretty much done, the only problem however is, that a requirement is to override the "equals" method of any class of objects that must be stored in the list. Now how do I do that? Any help is greatly appreciated!
19 years ago
Elysee, I think this is a nice explanation:

Originally posted by KEN O.:

The JVM sits between your program and the computer. It creats a
hypothetic compter that has a program called an interpreter used to convert your written code into byte codes 1's and 0's which the JVM can handle with the help of your processor(hardware.
I think of the JRE as the process and eviroment in which you come in to say where what happens, maybe a console for javac and not the code editor itself.
JVM is included in JRE and runs your code. If you want to develop java apps, you need the JavaDeveloperKit (JDK).
i guess the JDK contains both.It's the Java Development Kit.

19 years ago
JVM = JavaVirtualMachine
JRE = JavaRuntimeEnvironment

JVM is included in JRE and runs your code. If you want to develop java apps, you need the JavaDeveloperKit (JDK).
19 years ago
why dont you use

and then change it in your validation method according to wheter valid or invalid, and then you can check for its state from your setter.

or do I miss here something?
[ July 22, 2004: Message edited by: Ben Buchli ]
19 years ago
hi there,
is there a way to start a su session thru a java app??

when i use Runtime.getRuntime().exec( "konsole --type su" );
a konsole pops up and asks for the password. But I want it to happen in the background.

any suggestions?

19 years ago
Hi everybody,
when I click on a jar file that I exported from eclipse, I get following error message:
the utility zip is not in your PATH
Please install it or contact your System Administrator.

I have no idea what's wrong here, are .jar files not supported in linux? What do I have to do?

ok, i figured i would have to use java -jar /filepath
the problem then is that it says failure to load main-Class manifest attribute
I dont know what's wrong, but under windows the app runs perfectly fine.

any help is greatly appreciated!

[ July 19, 2004: Message edited by: Ben Buchli ]
19 years ago
Hey Joe, thanks for the clarification!

I got one more problem though:
how do I build the ebuild file? I'm pretty new to linux and especially gentoo, so please give me detailed instructions.
19 years ago
Thanks for the info guys!!

Joe, I'm gonna try it as soon as possible. I read somewhere that the 1.4.2_04 is not fully working under gentoo, or is it?


19 years ago
Hi guys,
which distro are you using (preferably on a laptop with widescreen), and what jdk is supported?

I tried slackware, and I liked it, but my laptop didn't. So I checked out gentoo, which both - me and my laptop - like very much. The bummer is: it supports only jdk 1.4.1. And I'm supposed to write code for 1.4.2.

Thanks for your help.
19 years ago
since String is immutable, you can use StringBuffer whenever you need to modify a String. Otherwise use String. a good example would be when you want to read a file and store it in a StringBuffer, so that you can access/modify the content.

hope that helps,
19 years ago
What?? doesnt seem to be a tiger then... rather a pussycat!!
19 years ago
Hi everybody,


int[] newArray = arrayReferencePassedAsMethodParameter.clone();

equals to copying the returned array into a new array? I mean, do I make sure that I dont refer to the reference that could be modified somewhere else?

Thanks in advance,
19 years ago
This is what you need. Be careful, though: The makeArray() returns the reference to the intArray, so that might cause problems sometimes.

Also, the ordering I let you do...

[ June 28, 2004: Message edited by: Ben Buchli ]
19 years ago