reinstalling windows + installing directly jdk6.0 + jre1.6.0 then compile again the .java file will fix my problem?
what do you think?
Printable View
reinstalling windows + installing directly jdk6.0 + jre1.6.0 then compile again the .java file will fix my problem?
what do you think?
Not necessarily. You need to track down where the java 1.7 class file is coming from.
If you have a java version 1.6 program on your computer use it to execute the code. The java console will show what version of java you are using. If there is no problem on your pc with the jar file you must track down where the bad jar file is.
so basically you say, that other peoples which get the error, they get the class file from somewhere else the my website?
If you post a 1.6 class file and they get a 1.7 version, where are they getting it from???
Try renaming the jar file and changing the html to use this new name to force a new version to be used.
changed that html code and jar class file names each time...
What about the name of the jar file?
i have changed the following:
reinstalled windows
changed the .java file name
changed the .class file when compile with javac
changed the class name inside the .java file (public class updated_my_java extends Applet { )
changed the ,jar file name when archiving with jar cvf
changed the html code to new name corresponding to new .class an .jar file
changed the directory of the html .jar .class files on my host server
now anyone can see the applet starting but the applet is not loading, no error is displayed.
on my computer works, on other 3 computers work fine, but on other 10 computers doesn't work. it appears the applet is loading but nothing happen...
something is going on and i have no clue...
Look at the java consoles for the PCs where it it not working. Get a full copy of the java consoles because they show what version of java is executing.
please explain how to get to the java console of other computers? where do i find the console? i'm not familiar with java troubleshooting :)
ty
The browser has a menu item to display the java console. Also the java control panel item has settings to display the java console.
Ask some of your users. Your first post shows some of them know how to display it.
my first pot show errors reported by some of the users. when the application failed to load there was a message on the webpage shown in red Errors. Click here for details, and the if you click on details, the java console loads and display the errors..
now none of the users get this error message in the webpage... the page just loads, the applet ask for permission and after the confirmation, nothing happen... it's supposed to load a new page with some game information`s inside...
let me know if this is correct:
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
thank you!
If it compiles then it could be ok.Quote:
let me know if this is correct:
You must look in the browser's java console for any error messages.
i will ask for users to send me the error messages and come back with some results...
another thing i noticed, the last compiled file work on my IE browser but doesn't work on Mozilla browser...
what happens: i execute the url in Mozilla browser and the page is not loading anymore :( Java console doesn't popup, nothing happens. Mozilla browser says it waits for the server to respond, and that's how it dies...
Sorry, I have no idea what your problem is.
is there any program which can help me to develop my java code? i mean some program which can execute the code step by step, and show the results...
i have wrote the java code in text document directly... i'm afraid somewhere is an error?
ty
If the problem you are having is version incompatibility, an interactive debugger won't change that.
Can you post the FULL text of java console that shows the error?
Can you post or PM the URL for the site so I could look at it?
now i have updates with the error code, it's no longer giving incompatibility errors, now i get other errors ... here is the list
Ignored exception: java.lang.NullPointerException
Ignored exception: java.lang.NullPointerException
java.io.FileNotFoundException: C:\WINDOWS\Fonts\marss_font.TTF (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at fontapplet.fileUrl(fontapplet.java:81)
at fontapplet.fileDownload(fontapplet.java:65)
at fontapplet.start(fontapplet.java:18)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
java.lang.NullPointerException
at fontapplet.fileUrl(fontapplet.java:96)
at fontapplet.fileDownload(fontapplet.java:65)
at fontapplet.start(fontapplet.java:18)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionR unnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception: java.lang.NullPointerException
only some windows 7 users get this error, other win xp and win7 users don't get the error, they get the font installed...
That's a different message from the one you posted before. It contained this line:
java.lang.UnsupportedClassVersionError: my file : Unsupported major.minor version 51.0
You didn't post the full contents of the java console. I expect to see something like this:
Java Plug-in 1.6.0_29
Using JRE version 1.6.0_29-b11 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Norm
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
SearchApplet - 3 Aug 2005
Searching E:/, file selection: *.html for null
init() exiting
Your problem seems to be a moving target. It was the version and now its something else.
This part of the error message looks like some of your problem:
java.io.FileNotFoundException: C:\WINDOWS\Fonts\marss_font.TTF (Access is denied)
yes, as i've mentioned the problem changed, from version issue to access denied issue...
the thing is like this: the windows\fonts folder is not read only... as on my computer works without changing anything...
so the problem is not cause about the windows read only permission. i'll post the code below, i am sure it's something incorrect inside...
import java.applet.Applet;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.net.*;
public class fontapplet extends Applet {
public void init(){
}
public void start(){
String DestDir="";
String GetFile="http://www.mywebsite.com:80/fonts/marss_font.TTF";
boolean errorControl = checkDir("C:/Fonts");
DestDir="C:/WINDOWS/Fonts/";
if(checkDir(DestDir)){
fileDownload(GetFile,DestDir);
}
What do the checkDir() and fileDownLoad() methods do?
What code is getting the NullPointerException?
Can you explain step by step what your applet is trying to do? Once it loads in a user's browser what does it try to do?