Frank Thuring

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

Recent posts by Frank Thuring

Campbell Ritchie wrote:He says a Fruit.class file has be created, so it would appear the PATH has been set correctly.

I think part of the problem is that we haven't been given enough detail about what the errors are. And there are lots of spelling errors in the details (eg PATHCLASS).



I got the erorr: "unkown source". I think it has nothing to do with the fact that there is someting wrong with my code but that the compiler cannot found the class I want to compile.

Yesterday I downloaded a programm Blue J (A java programm) and now I have no problems anymore. When I run the Fruit class in another directory then the bin-map it works.

By the way I still have no PATHCLASS...... I appreciate it that you guys are thinking with me. I still don't know what the solution is but I can study further. Thank you for trying to help me.






13 years ago
Hello,
If I try to compile a programm in the bin directory I have no problem.

But when I try to compile a programm in another directory I got an error. I read a lot on this form and I think I need to set the CLASSPATH.
I foud only PATH but not CLASSPATH among Windows Alta Vista.
I wordk on the directory: D:\Java\Bin but I want to work on the directory: D:\Java|Bin\Food what is then the directory name in the PATHCLASS?
Is it then: D:\Java\Bin\Food? I've tried it but then the compiler cannot be found. Has anyone a solution?

And is the name by Alta Vista also CLASSPATH?
13 years ago
I put my sourcefiles Apple.java and Fruit.java in the food map directory D:\Java\Bin\Java\food

Then I tried to compile with a command : javac Fruit.java. I got an error but when I compile in the directory D:\Java\Bin the source file Fruit.java with the command javac Fruit.java then it compiles and it makes a class file of Fruit.

Can you explain this?


I don't know how I can compile in anoher directory then the bin-directory.
I also have no classpath. It is no problem I read.

13 years ago
Dear friends,
I have an question about the classpath.

Since I work with te command prompt (I compile programmes in MS Dos) I have problems.

For example: I compile programs on D: Java\Bin\<classname.java> .Then I have no problem.

But I want to make a projectmap in the direcory Bin for example "food" where I can put my sourcefiles. I also want to compile the classes in in that folder.
The directory will be: D: Java\Bin\food\<classname.java>

Then I go problems.

How can I set the classpath so that it works?.
Where can I find the classpath?

I can't find it in the book Head first Java.
13 years ago
Dear friends,
I have an question about the classpath.

Since I work with te command prompt (I compile programmes in MS Dos) I have problems.

For example: I compile programs on D: Java\Bin\<classname.java> .Then I have no problem.

But I want to make a projectmap in the direcory Bin for example "food" where I can put my sourcefiles. I also want to compile the classes in in that folder.
The directory will be: D: Java\Bin\food\<classname.java>

How can I set the classpath so that it works?.
Where can I find the classpath?

I can't find it in the book Head first Java.
I have a supperclass and a subclass both in seperate files in the food subdirectory.





When I try to compile Apple I got an error: Static Error: Undefined class Apple. Can someone tell me what I am doing wrong?
I try to do an exercise but I got a compiler error:



I work with the command prompt under windows.
Can someone tell me why I got this message?

C:\Program Files\Java\java\bin>javac TestBox
error: Class names, 'TestBox', are only accepted if annotation processing is exp
licitly requested
1 error

By the way I was expecting an other message but my question is about the error message above.




13 years ago
I also think that netbeans is the problem. I will try Dr Java
13 years ago
Hi Joe,
can you give me a clue with the main how you would programm this ?
13 years ago
Hi Joe,
can you give me a clue with the main how you would programm this ?
13 years ago
Hi Joe,
I saw I missed a }
on page 68 of the second edition is the solution of the problem.
Now I got another error can you help me?



the error is : java.lang.NoSuchMethodError: main
Exception in thread "main" Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)
13 years ago
Please can someone help me

I try to compile the code with the netbeans compiler



I got an error:
Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - non-static variable this cannot be referenced from a static context
at javaapplication2.Main.main(Main.java:23)
Java Result: 1
BUILD SUCCESSFUL (total time: 0 seconds)

It's the code of the book of head first java. can someone tell me what I am doing wrong?
13 years ago
Thank you that was the solution

I had to compile with javac.
13 years ago
I've changed class MultiFor in public class MultiFor but it still goes wrong.....

I still get the error:
javadoc: error - No public or protected classes found to document

13 years ago