Welcome to Dream.In.Code
Become a Java Expert!

Join 150,184 Java Programmers for FREE! Get instant access to thousands of Java experts, tutorials, code snippets, and more! There are 2,099 people online right now. Registration is fast and FREE... Join Now!




not combining well

 
Reply to this topicStart new topic

not combining well, recording info

dragonjewel
19 Oct, 2007 - 07:40 AM
Post #1

D.I.C Head
**

Joined: 6 Sep, 2007
Posts: 60


My Contributions
Basically want the script to record the date and page to file and its not quite going well.
Ideas?
CODE

<script>
var today=new Date()
document.write('<center>'+today.toString()+'<br>'+window.location+'</center>')

import java.io.*;

public class File {
BufferedReader in;
String read;

  public File(){
try {
in = new BufferedReader(new FileReader(today.string() + window.location));//open a bufferedReader to file record.txt
read = in.readLine();//read a line from record.txt and save into a string
System.out.println("file output: " + read);//print out the line
in.close();//safley close the BufferedReader after use
}catch(IOException e){
System.out.println("There was a problem:" + e);

}
}

public static void main(String[] args){
File File = new File();
}
}
</script>


This post has been edited by dragonjewel: 19 Oct, 2007 - 07:40 AM
User is offlineProfile CardPM
+Quote Post

PennyBoki
RE: Not Combining Well
20 Oct, 2007 - 12:49 PM
Post #2

system("revolution");
Group Icon

Joined: 11 Dec, 2006
Posts: 2,011



Thanked: 7 times
Dream Kudos: 500
Expert In: Java,C++,C

My Contributions
Hi I am a little confused here. By the second and the third line of code I can tell you are using JavaScript, but bellow that you are using a Java code, in an html page?? blink.gif I have never seen code such as this, maybe I'm wrong but I think you can't do that.
User is offlineProfile CardPM
+Quote Post

dragonjewel
RE: Not Combining Well
21 Oct, 2007 - 02:21 PM
Post #3

D.I.C Head
**

Joined: 6 Sep, 2007
Posts: 60


My Contributions
QUOTE(PennyBoki @ 20 Oct, 2007 - 01:49 PM) *

Hi I am a little confused here. By the second and the third line of code I can tell you are using JavaScript, but bellow that you are using a Java code, in an html page?? blink.gif I have never seen code such as this, maybe I'm wrong but I think you can't do that.

nope I can't as I have discovered.

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 04:02AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Java Help!

Java Tutorials

Reference Sheets

Java Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month