Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Virtual Machine / June 2007

Tip: Looking for answers? Try searching our database.

java virtual machine - help me please?

Thread view: 
Mitchell_Collen - 14 Jun 2007 18:26 GMT
Hello All,
I have installed jre1.4.2_14 and I have been trying to get a small "hello
world type" program to run.
Once I got jre installed, I open my dos window and changed directories to
folder on on my local drive that contains the jave program.
I then try to run it by typeing javac aus.java. The error message doesn't
recognize the command. However, when I type java the error says that it
cannot find Main string in java.lang <-- I don't have full message because I
am currently at work away from my computer. Anyway, also when I type Java in
dos it gives me all the parameters and help that I will need for using java.
I assume that dos does in fact see the java because of that. However, the
java virtual machine may or may not be set up correctly.

Will you please explain to me how to set a the virtual machine and where
source paths should be configured in JCreator LE? Any other suggestions are
welcome.

I emailed myself this message last night:

From JCreator LE: I get the following error message:

--------------------Configuration: MyProject2 - <Default> - <Default>---------
-----------
Error : Invalid path, \bin\javac.exe -source 1.5 -classpath "C:\Program Files\
Java\j2re1.4.2_14\bin" -d C:\Program" "Files\Java\j2re1.4.2_14\bin
@src_myproject2.txt"

Process completed.
Joshua Cranmer - 15 Jun 2007 00:06 GMT
> Hello All,
> I have installed jre1.4.2_14 and I have been trying to get a small "hello
> world type" program to run.

JRE != JDK. What you want to get is the JDK (preferably a newer one, say
1.5 or 1.6)
> recognize the command. However, when I type java the error says that it
> cannot find Main string in java.lang <-- I don't have full message because I
The error you a giving is not very helpful -- it looks like you are
trying to say java java.lang which has several problems in its own right
that I am not going to address.

> Error : Invalid path, \bin\javac.exe -source 1.5 -classpath "C:\Program Files\
> Java\j2re1.4.2_14\bin" -d C:\Program" "Files\Java\j2re1.4.2_14\bin
> @src_myproject2.txt"
Several things wrong with this:
1. You seem to be building inside the Java file, which is not a very
good idea. Ideally your classpath should be somewhere else, like in a
{home dir}\Java\Project.
2. The path seems to be off...

Finally, this isn't a Java virtual machine problem; this is a Java
configuration problem. Therefore, I am X-posting to c.l.j.h with
follow-up set to c.l.j.h.
Mitchell_Collen - 15 Jun 2007 17:16 GMT
Ok thank you for your help Joshua. I didn't think of it being a configuration
problem. I will put the java file in my home directory after I install the
JDK. I don't understand what a class path is, Does this mean a class file
folder?
Thanks, Misty

>> Hello All,
>> I have installed jre1.4.2_14 and I have been trying to get a small "hello
[quoted text clipped - 20 lines]
>configuration problem. Therefore, I am X-posting to c.l.j.h with
>follow-up set to c.l.j.h.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.