UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
Sponsored Links
Latest Postings
Latest Reviews
Page 2 of 2 < 1 2
Topic Options
Rate This Topic
#8359 - 03/03/03 06:33 PM Re: Having trouble with java
pergesu Offline
UGN Elite Poster

Registered: 03/14/02
Posts: 1136
Loc: Pimpin the Colorizzle
alright, well the problem is is that file isn't in that directory. So go to the directory that you saved hello.java to and compile it.

Top
Sponsored Links
      
#8360 - 03/03/03 10:53 PM Re: Having trouble with java
Mornse Offline
Member

Registered: 03/03/02
Posts: 185
Loc: Vancouver
In DOS go to the directory that 'hello.java' is in and then type in 'javac hello.java' and try it, or is 'hello.java' already in the same directory as 'javac'? If it is, then I don't know what your problem could be.
_________________________
Cha want some w***up?

http://www.dopeskill.com

Top
#8361 - 03/03/03 10:57 PM Re: Having trouble with java
Mornse Offline
Member

Registered: 03/03/02
Posts: 185
Loc: Vancouver
Damn pergesu, you typed and posted your message while I was typing mine cause I got distracted in the middle of typing it so it took me awhile, oh well.
_________________________
Cha want some w***up?

http://www.dopeskill.com

Top
#8362 - 03/06/03 07:01 PM Re: Having trouble with java
Silent Sniper Offline
Junior Member

Registered: 02/28/03
Posts: 21
ok but how do i compile? do i just open it in an applet viewer or use dos?

Top
#8363 - 03/06/03 09:45 PM Re: Having trouble with java
pergesu Offline
UGN Elite Poster

Registered: 03/14/02
Posts: 1136
Loc: Pimpin the Colorizzle
go into a command line (dos), and cd to the directory that has the file. Then run javac filename. Here's an example.

Code:
F:\>cd java\map

F:\java\map>javac Map.java

F:\java\map>java Map
**output not shown**
The first line just goes into the directory that has Map.java. The second entry is compiling the file. The third command actually runs the program, and I didn't show the output because it fills up a screen. So that's what you need to do.

Top
#8364 - 03/07/03 04:26 PM Re: Having trouble with java
Silent Sniper Offline
Junior Member

Registered: 02/28/03
Posts: 21
so this is what i did. i created a folder called java to store my programs. i did the "hello world" program and saved it as hello.java. i went to dos and typed in C:\>cd java and it said invalid directory. then i put the program in the bin folder and did C:\>cd j2sdk1.4.1_02\bin and it said invalid directory. then i did C:\>cd java \bin and so on and still got the same invalid directory. should i put C:\>cd java\hello or C:\>cd j2sdk1.4.1_02\bin\hello to do that?

Top
#8365 - 03/07/03 05:31 PM Re: Having trouble with java
pergesu Offline
UGN Elite Poster

Registered: 03/14/02
Posts: 1136
Loc: Pimpin the Colorizzle
Um, your problem isn't with Java then. It's using the command line... so what exactly are you typing? Can you copy the text for us? Just highlight everything and hit enter, and it's copied. Then paste it in your response.

Top
#8366 - 03/07/03 08:13 PM Re: Having trouble with java
Silent Sniper Offline
Junior Member

Registered: 02/28/03
Posts: 21
C:\WINDOWS>cd java\hello
Invalid directory
C:\WINDOWS>cd java
Invalid directory

i set the path to C:\java

thats basically all i did

Top
#8367 - 03/07/03 08:15 PM Re: Having trouble with java
Silent Sniper Offline
Junior Member

Registered: 02/28/03
Posts: 21
java is the folder that hello.java is in

Top
#8368 - 03/07/03 08:19 PM Re: Having trouble with java
pergesu Offline
UGN Elite Poster

Registered: 03/14/02
Posts: 1136
Loc: Pimpin the Colorizzle
well dude, there's your problem. You're trying to switch to a relative dir, and C:\WINDOWS\java doesn't exist. c:\java does. So what you need to type is:
C:\WINDOWS>cd c:\java

Top
#8369 - 03/07/03 09:56 PM Re: Having trouble with java
Silent Sniper Offline
Junior Member

Registered: 02/28/03
Posts: 21
Hello.java:6: cannot resolve symbol
symbol : method printIn (java.lang.String)
location: class java.io.PrintStream
System.out.printIn("Hello, world!");
^

i dont know what the arrow means. do i change it?

Top
#8370 - 03/07/03 09:58 PM Re: Having trouble with java
Silent Sniper Offline
Junior Member

Registered: 02/28/03
Posts: 21
arrow is under dot after out, not under S

Top
#8371 - 03/08/03 12:09 AM Re: Having trouble with java
Silent Sniper Offline
Junior Member

Registered: 02/28/03
Posts: 21
nevermind i finally found out the problem and fixed it. by the way thanks pergesu for all of your help on my problem with java. i appreciate it very much.

Silent Sniper

--------------------
This cant be happening!
-Eternal Darkness

Top
#8372 - 03/08/03 11:22 PM Re: Having trouble with java
Crackle Offline
Junior Member

Registered: 02/26/03
Posts: 7
Chris,

Store all of your projects ( class file and your source code ) that you are working on presently in a folder at C:\Java and then store everything that you have completed in a folder labeled C:\Java Projects.

This is what I do and it makes it much easier to work with so when you go into DOS all you have to do is change your path to "C:\j2sdk1.4.0_03" and change your directory to C:\Java ( type "cd c:\Java" at your command prompt without the quotation marks )

I am assuming that you are using pergesu's tutorials as well. If not, pick them up and print them out over at http://www.javaspot.net/articles.php?action=display&cat=1 . They are great and I can't thank pergesu enough.

Catch me on MSN and we can chat about Java.

Peace,
Crackle

Top
Page 2 of 2 < 1 2

Moderator:  Infinite 
Featured Member
Registered: 08/22/14
Posts: 1
Forum Stats
2148 Members
46 Forums
35206 Topics
70376 Posts

Max Online: 1567 @ 04/25/10 05:20 AM
Top Posters
UGN Security 28368
Gremelin 7193
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
Tim050, Gecko666, defghi795767, Devo60, ali
2148 Registered Users
Who's Online
0 registered (), 425 Guests and 321 Spiders online.
Key: Admin, Global Mod, Mod
Latest News


Donate
  Get Firefox!
Get FireFox!