Java-applet counter
Hi there,
I've created a java-applet that can be widely used so I encourage people to include the java applet into other sites by means of the <applet code="blah.class" codebase="http://www.blah.com/"></applet>I'm wondering however if it would be possible to keep statistics of how many times the applet is loaded. I created a free Nedstat subscription and here's some html code:
<!-- Begin Nedstat Basic code -->
<script language="JavaScript" type="text/javascript" src="http://m1.nedstatbasic.net/basic.js">
</script>
<script language="JavaScript" type="text/javascript" >
<!--
nedstatbasic("FPZ43f3d3d287Df", 0);
// -->
</script>
<noscript>
<a target="_blank" href="http://www.nedstatbasic.net/stats?FPZ43f3d3d287Df"><img
src="http://m1.nedstatbasic.net/n?id=FPZ43f3d3d287Df"
border="0" width="18" height="18"
alt="Nedstat Basic - Free web site statistics
Personal homepage website counter"></a><br>
<a target="_blank" href="http://www.nedstatbasic.net/">Free counter</a>
</noscript>
<!-- End Nedstat Basic code -->I'm guessing that the javascript here "does the counting". Is there any possibility to include this javascript in the java applet, and how could it be done?
Thank you very much,
happy holidays
W.
cool i found another solution :-)
cheers
W.
Similar Messages
-
We have about 1,800 workstations running Windows 7 (both 32-bit and 64-bit) running various versions of the Java JRE from 6 update 32 through 7 update 51. Most are on 6 update 45. We would like to standardize on Java 7 update 51 (32-bit) and get everyone updated to that version for security reasons.
For the past two weeks, we have been having trouble with our installation pre-pilot. What we are seeing is that our procedure successfully closes any open Internet Explorer windows and Java-related processes, uninstalls all old versions of the Java JRE, and then claims to have successfully installed Java 7 update 51. The Java Control panel works. We can even take Internet Explorer to Verify Java Version or Java Tester - What Version of Java Are You Running? and confirm that the Java applets on those sites are loading (though the latter only works after adding the site to the exceptions site list); however, when testers try to access our Kronos Workforce Central 6.3.10 system, the Java applets used by that system do not load.
We have tried the following things, none of which worked:
Clear Internet Explorer browser cache and cookies.
Clear the local Java cache.
Reboot the computer.
Reset Internet Explorer settings, including personal settings.
The one thing which does work is going into the Java Control Panel, going to the Security tab, unchecking "Enable Java content in the browser", pressing Apply, pressing OK on the pop-up window, checking the "Enable Java content in the browser" box again, pressing OK, pressing OK on the pop-up window, and then restarting Internet Explorer. It is only after this point that all Java applets, including the ones used by Kronos Workforce Central 6.3.10, work.
What I need to know is how I can automate the procedure of reinitializing the "Enable Java content in the browser" checkbox after installation or am I doing something wrong or missing a step in the automated installation that is causing this to happen?
We are using Microsoft SCCM 2007 R3 to accomplish this upgrade, and everything is being run on the client machine using the SYSTEM account. First, the PowerShell script "javaclean.ps1" is run, with part of the command-line process changing the PowerShell script execution policy to Bypass. This script handles the closing of Java-dependent applications and Java processes and uninstalls old Java versions.
javaclean.ps1:
#Find all Java products excluding the auto updater which actually gets uninstalled when the main install is removed.
write-host "Searching for all installed Java versions" -ForegroundColor Yellow
[array]$javas=Get-WmiObject -query "select * from win32_Product where (Name like 'Java %' or Name like 'Java(TM)%' or Name like 'J2SE%') and Name <> 'Java Auto Updater'"
if ($javas.count -gt 0)
write-host "Java is already Installed" -ForegroundColor Yellow
#Get all the Java processes and kill them. If java is running and the processes aren't killed then this script will invoke a sudden reboot.
[array]$processes=Get-Process -Name "Java*" #-erroraction silentlycontinue
$processes += Get-Process -Name "iexplore" #-erroraction silentlycontinue
$processes += Get-Process -Name "firefox" #-erroraction silentlycontinue
$processes += Get-Process -Name "chrome" #-erroraction silentlycontinue
$processes += Get-Process -Name "jqs" #-erroraction silentlycontinue
$processes += Get-Process -Name "jusched" #-erroraction silentlycontinue
$processes += Get-Process -Name "jp2launcher" #-erroraction silentlycontinue
if ($processes.Count -gt 0)
foreach ($myprocess in $processes)
$myprocess.kill()
#Loop through the installed Java products.
foreach($java in $javas){
write-host "Uninstalling "$java.name -ForegroundColor Yellow
$java.Uninstall()
After this script is complete, SCCM calls a the VBS script "install.vbs" to perform the actual installation of Java JRE 7 update 51.
install.vbs
'* Script: Install JRE 7 routine
'* Date: 3/14/14
'* Author: [REDACTED]
'* Rev: 1.0
'* Notes:
'/// Common
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWshShell = CreateObject("WScript.Shell")
' Get system architecture
Dim colSys : Set colSys = GetObject("WinMGMTS://").ExecQuery("SELECT AddressWidth FROM Win32_Processor",, 48)
Dim objSys
For Each objSys In colSys
If objSys.AddressWidth = 64 Then bolIs64Bit = True
Next
' Get operating system
Dim colOS : Set colOS = GetObject("WinMGMTS://").ExecQuery ("Select * from Win32_OperatingSystem",,48)
Dim objOS
For Each objOS In colOS
If Left(objOS.caption, 20) = "Microsoft Windows 8 " Then
bolIsWin8 = True
WScript.Echo "win8"
End If
If Left(objOS.caption, 22) = "Microsoft Windows 8.1 " Then
bolIsWin81 = True
WScript.Echo "win81"
End If
Next
' Set 32 bit program files directory
If bolIs64Bit = True Then
strPFILES = "Program Files (x86)"
strSYSDIR = "SysWOW64"
Else strPFILES = "Program Files"
strSYSDIR = "System32"
End If
' Set windows directory
strWIN = objWshShell.ExpandEnvironmentStrings("%windir%")
' Set the current directory
strCurrentDir = objFSO.GetParentFolderName(Wscript.ScriptFullName)
' Set computer name
strCompName = objWshShell.ExpandEnvironmentStrings("%computername%")
'/// Main script
'/// Install via .msi & capture exit code
'intExitCode = objWshShell.Run("msiexec.exe /i """ & strCurrentDir & "\package.msi""" & " TRANSFORMS=""" & strCurrentDir & _
' "\transform.mst"" ALLUSERS=1 Reboot=ReallySuppress /qn", 8, True)
'wscript.quit(intExitCode)
'****RUN COMMANDS HERE****
' Create folder structure if it doesn't exist already
strFullPath = "c:\Windows\Sun\Java\Deployment" '
' How many levels are there in the path?
nLevel = 0
strParentPath = strFullPath
Do Until strParentPath = ""
strParentPath = objFSO.GetParentFolderName(strParentPath)
nLevel = nLevel + 1
Loop
For iLevel = 1 To nLevel
' Figure out path for directory at level iLevel
strParentPath = strFullPath
For j = 1 To nLevel - iLevel
strParentPath = objFSO.GetParentFolderName(strParentPath)
Next
' Does this directory exist? If not, create it.
If objFSO.FolderExists(strParentPath) = False Then
Set newFolder = objFSO.CreateFolder(strParentPath)
End If
Next
' Kill running processes
objWshShell.Run "taskkill /F /IM iexplore.exe", 8, True
objWshShell.Run "taskkill /F /IM firefox.exe", 8, True
objWshShell.Run "taskkill /F /IM chrome.exe", 8, True
objWshShell.Run "taskkill /F /IM javaw.exe", 8, True
objWshShell.Run "taskkill /F /IM java.exe", 8, True
objWshShell.Run "taskkill /F /IM jqs.exe", 8, True
objWshShell.Run "taskkill /F /IM jusched.exe", 8, True
' Copy deployment files
objFSO.CopyFile strCurrentDir & "\deployment.config", "c:\Windows\Sun\Java\Deployment\", True
objFSO.CopyFile strCurrentDir & "\deployment.properties", "c:\Windows\Sun\Java\Deployment\", True
' Disable UAC
' If bolIsWin8 Or bolIsWin81 = True Then
' objWshShell.Run "reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v PromptOnSecureDesktop /t REG_DWORD /d 0 /f", 8, True
' objWshShell.Run "reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f", 8, True
' objWshShell.Run "reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 0 /f", 8, True
' End If
' Install application
intExitCode = objWshShell.Run("msiexec.exe /i """ & strCurrentDir & "\jre1.7.0_51.msi"" IEXPLORER=1 AUTOUPDATECHECK=0 JAVAUPDATE=0 JU=0 WEB_JAVA=1 ALLUSERS=1 Reboot=ReallySuppress /qn", 8, True)
' Enable UAC
' If bolIsWin8 Or bolIsWin81 = True Then
' objWshShell.Run "reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v PromptOnSecureDesktop /t REG_DWORD /d 1 /f", 8, True
' objWshShell.Run "reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f", 8, True
' objWshShell.Run "reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v ConsentPromptBehaviorAdmin /t REG_DWORD /d 5 /f", 8, True
' End If
wscript.quit(intExitCode)
'/// Install via .exe on network
'objWshShell.Run """" & strCurrentDir & "\Setup.exe"" -s -sms -f1""" & strCurrentDir & _
' "\setup.iss"" -f2""" & strWIN & "\Temp\Install-app.txt""", 8, True
' Need to turn off the open file security warning first
Set objEnv = objWshShell.Environment("PROCESS")
objEnv("SEE_MASK_NOZONECHECKS") = 1
' intExitCode = objWshShell.Run("""" & strCurrentDir & "\jre-7u45-windows-i586.exe"" /s /v""/norestart " & _
' "TRANSFORMS=""" & strCurrentDir & "\Tribe-jre7.mst""""", 8, True)
' WScript.Quit(intExitCode)
'****RUN COMMANDS HERE****
' Then turn it back on
objEnv.Remove("SEE_MASK_NOZONECHECKS")
'/// Additional functions
Help on this issue would be much appreciated!It turns out that this is actually a problem with Kronos Workforce Central. We had the "site.java.plugin.CLSID.familyVersion" setting in that application set to "clsid:CAFEEFAC-0016-0000-FFFF-ABCDEFFEDCBA", which is the Java CLSID for Java 6. After updating this value to "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" (the Java universal CLSID), this problem did not occur upon the automatic upgrade of Java.
We have both Java 6 and Java 7 in our environment, and did during our Kronos implementation, so I don't know why we were using the Java 6 CLSID in the first place.
Case closed! -
How to use C-Structure in java applets
hi alls,
I want to use a struct model (struct in C++) in java applets. i know class is used in java applications. but, how can i convert in java applets?
class renk
int r;
int gr;
int b;
import java.awt.Graphics;
import java.awt.Color;
import java.awt.Event;
import java.applet.Applet;
public class benek extends Applet
final int n=10;
int x[] = new int[n];
int y[] = new int[n];
int count = 0;
renk clr[] = new renk[n];
public void init()
setBackground(Color.black);
public boolean mouseDown(Event yordam, int xyer, int yyer)
if (count<n)
System.out.println("...");
ekle(xyer,yyer);
else System.out.println("Kapasite Doldu...");
return true;
void ekle(int xyer, int yyer)
int r1 = (int)Math.floor(Math.random()*256);
int gr1 = (int)Math.floor(Math.random()*256);
int b1 = (int)Math.floor(Math.random()*256);
clr[count].r = r1;
clr[count].gr = gr1;
clr[count].b = b1;
x[count]=xyer;
y[count]=yyer;
count++;
repaint();
public void paint(Graphics g)
it gives error message... how can � use struct model in java applets???
if you help me i will be greatfull....� use import but it doesn't work.
i add: import renk; or import class renk;
how will � add import I assumed based on your initial post that the renk and benek classes were in the same file. Apparently you're saying they are not. So for another thing, make your renk class "public class renk", and add the "public" keyword to the 3 members of that class. Then if your code still doesn't see the "renk" class, it would just be that you don't have the directory that contains the compiled "renk.class" in your classpath. -
Hi,
I'm a uni student and I've had some programming experience in Java, although sadly a bit lacking in the area of Java Applets.
Recently I've being involved in a project where some tests are ran a number of times and a Data Aquisition System is used to transfer the number of cycles the test have currently done onto the computer, in a .csv file.
What I would like to do is to make this count available in a web browser LIVE.
I've come up with an idea, which is to write a Java Applet to read this file and output the correct count value in a textbox or what ever, however I am having a bit of difficulty making this update live.
Should I have some sort of script inside the webpage source that re-
runs the applet at regular intervals? If then how would that be possible?
Or should I have the applet re-read the file at regular intervals and repaint it-self? If then there will be problems with timers and possible execution threads (which I don't quite understand yet)?
One thing I want to be careful of is that this file to be read is updated by the DAQ system at random times, so whatever solution is implemented, I wouldn't want the file to be corrupted (e.g. if the file is read and written at the same time).
Thanks for any helpRead data from file at regular specified intervals,
display data in an applet.
U can use java.util.Timer and TimerTask and schedule the task.
for applets to read file, you may have have to sign the applet.
public class ReadApplet{
private Timer timer;
private TimerTask tt;
private JTextField tf;
public void init(){
tf=new JTextField(15);
timer=new Timer();
tt = new TimerTask(){
public void run(){
try{
BufferedReader fr=new BufferedReader(new FileReader(datafile));
String data = br.readLine();
int num = Integer.parseInt( data);
tf.setText("" + num);
}catch(Exception e) {}
timer.schedule( tt, 0, interval);
- create a jar file containing the class file
- generate a key using keytool -genkey
- sign the applet jar with jarsigner -signedjar using your key
-include applet code in html file
<applet code="Yourapplet.class" ARCHIVE="your signed jar" width="" height=""></applet>
It should work -
Illegal start to expression - java applet
Hi Guys,
this code is for a hangman game which will be in an applet. When I try putting the buttons in init, I'm getting an "illegal start of expression" for each button. Can someone tell me what I'm doing wrong?
Cheers,
* @(#)Hangman.java
* Sample Applet application
* @author
* @version 1.00 06/10/17
import java.util.Random;
import java.util.*;
import java.awt.*;
import java.applet.*;
import java.io.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.BorderLayout;
public class Hangman extends JApplet implements ActionListener
Scanner textfile =new Scanner ("list.txt"); //file with words in
int count=0;//count number of letters in chosen word
int lives=6;//lives left
String [] list= new String [count]; //word chosen stored in array
boolean [] listDisplay=new boolean [count]; //whether letters in word have been guessed correct
String guess=null; //guess
boolean cont=false; //whether game continues or not
public void read()
try
while (textfile.hasNext()==true)
count++;
for (int i=0;i<count;i++)
String input=null;
list=input;
catch (InputMismatchException e)
System.out.println ("Mismatch exception:" + e );
public String selectWord()
int index=0;
Random ind=new Random();
String word=null;
index=ind.nextInt();
word=list[index];
return word;
public void wrongGuess(int lives)
switch (lives)
case 6:
break;
case 5:
break;
case 4:
break;
case 3:
break;
case 2:
break;
case 1:
break;
case 0:
cont=false;
public void game()
String word=null;
read();
word=selectWord();
while (cont==true)
public void check(String letter)
boolean tried=false;
for (int i=0;i<list.length;i++)
if (list[i]==letter)
listDisplay[i]=true;
else
if (tried==false)
lives--;
tried=true;//guard to stop multiple lives lost by 1 letter
public void init()
//setup buttons
private JButton jbtA=new JButton("A");
private JButton jbtB=new JButton("B");
private JButton jbtC=new JButton("C");
private JButton jbtD=new JButton("D");
private JButton jbtE=new JButton("E");
private JButton jbtF=new JButton("F");
private JButton jbtG=new JButton("G");
private JButton jbtH=new JButton("H");
private JButton jbtI=new JButton("I");
private JButton jbtJ=new JButton("J");
private JButton jbtK=new JButton("K");
private JButton jbtL=new JButton("L");
private JButton jbtM=new JButton("M");
private JButton jbtN=new JButton("N");
private JButton jbtO=new JButton("O");
private JButton jbtP=new JButton("P");
private JButton jbtQ=new JButton("Q");
private JButton jbtR=new JButton("R");
private JButton jbtS=new JButton("S");
private JButton jbtT=new JButton("T");
private JButton jbtU=new JButton("U");
private JButton jbtV=new JButton("V");
private JButton jbtW=new JButton("W");
private JButton jbtX=new JButton("X");
private JButton jbtY=new JButton("Y");
private JButton jbtZ=new JButton("Z");
JPanel p1=new JPanel();
p1.add(jbtA);
p1.add(jbtB);
p1.add(jbtC);
p1.add(jbtD);
p1.add(jbtE);
p1.add(jbtF);
p1.add(jbtG);
p1.add(jbtH);
p1.add(jbtI);
p1.add(jbtJ);
p1.add(jbtK);
p1.add(jbtL);
p1.add(jbtM);
p1.add(jbtN);
p1.add(jbtO);
p1.add(jbtP);
p1.add(jbtQ);
p1.add(jbtR);
p1.add(jbtS);
p1.add(jbtT);
p1.add(jbtU);
p1.add(jbtV);
p1.add(jbtW);
p1.add(jbtX);
p1.add(jbtY);
p1.add(jbtZ);
getContentPane().add(p1,BorderLayout.CENTER);
public void start()
game();
public void paint(Graphics g)
g.drawString("Welcome to Java!!", 50, 60 );
public void actionPerformed(ActionEvent e)
if (e.getSource()==jbtA)
check("A");
if (e.getSource()==jbtB)
check("B");
if (e.getSource()==jbtC)
check("C");
if (e.getSource()==jbtD)
check("D");
if (e.getSource()==jbtE)
check("E");
if (e.getSource()==jbtF)
check("F");
if (e.getSource()==jbtF)
check("F");
if (e.getSource()==jbtG)
check("G");
if (e.getSource()==jbtH)
check("H");
if (e.getSource()==jbtI)
check("I");
if (e.getSource()==jbtJ)
check("J");
if (e.getSource()==jbtK)
check("K");
if (e.getSource()==jbtL)
check("L");
if (e.getSource()==jbtM)
check("M");
if (e.getSource()==jbtN)
check("N");
if (e.getSource()==jbtO)
check("O");
if (e.getSource()==jbtP)
check("P");
if (e.getSource()==jbtQ)
check("Q");
if (e.getSource()==jbtR)
check("R");
if (e.getSource()==jbtS)
check("S");
if (e.getSource()==jbtT)
check("T");
if (e.getSource()==jbtU)
check("U");
if (e.getSource()==jbtV)
check("V");
if (e.getSource()==jbtW)
check("W");
if (e.getSource()==jbtX)
check("X");
if (e.getSource()==jbtY)
check("Y");
if (e.getSource()==jbtZ)
check("Z");
/code]cheers for the reply :)
I've managed to compile the file, but nothing is displayed. I'm compiling using JDK 5. Any ideas?
* @(#)Hangman.java
* Sample Applet application
* @author
* @version 1.00 06/10/17
import java.util.Random;
import java.util.*;
import java.awt.*;
import java.applet.*;
import java.io.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.BorderLayout;
public class Hangman extends JApplet implements ActionListener
Scanner textfile =new Scanner ("list.txt"); //file with words in
int count=0;//count number of letters in chosen word
int lives=6;//lives left
String [] list= new String [count]; //word chosen stored in array
boolean [] listDisplay=new boolean [count]; //whether letters in word have been guessed correct
String guess=null; //guess
boolean cont=false; //whether game continues or not
JButton jbtA;
JButton jbtB;
JButton jbtC;
JButton jbtD;
JButton jbtE;
JButton jbtF;
JButton jbtG;
JButton jbtH;
JButton jbtI;
JButton jbtJ;
JButton jbtK;
JButton jbtL;
JButton jbtM;
JButton jbtN;
JButton jbtO;
JButton jbtP;
JButton jbtQ;
JButton jbtR;
JButton jbtS;
JButton jbtT;
JButton jbtU;
JButton jbtV;
JButton jbtW;
JButton jbtX;
JButton jbtY;
JButton jbtZ;
public void read()
try
while (textfile.hasNext()==true)
count++;
for (int i=0;i<count;i++)
String input=null;
list=input;
catch (InputMismatchException e)
System.out.println ("Mismatch exception:" + e );
public String selectWord()
int index=0;
Random ind=new Random();
String word=null;
index=ind.nextInt();
word=list[index];
return word;
public void wrongGuess(int lives)
switch (lives)
case 6:
break;
case 5:
break;
case 4:
break;
case 3:
break;
case 2:
break;
case 1:
break;
case 0:
cont=false;
public void game()
String word=null;
read();
word=selectWord();
while (cont==true)
public void check(String letter)
boolean tried=false;
for (int i=0;i<list.length;i++)
if (list[i]==letter)
listDisplay[i]=true;
else
if (tried==false)
lives--;
tried=true;//guard to stop multiple lives lost by 1 letter
public void init()
//setup buttons
jbtA=new JButton("A");
jbtB=new JButton("B");
jbtC=new JButton("C");
jbtD=new JButton("D");
jbtE=new JButton("E");
jbtF=new JButton("F");
jbtG=new JButton("G");
jbtH=new JButton("H");
jbtI=new JButton("I");
jbtJ=new JButton("J");
jbtK=new JButton("K");
jbtL=new JButton("L");
jbtM=new JButton("M");
jbtN=new JButton("N");
jbtO=new JButton("O");
jbtP=new JButton("P");
jbtQ=new JButton("Q");
jbtR=new JButton("R");
jbtS=new JButton("S");
jbtT=new JButton("T");
jbtU=new JButton("U");
jbtV=new JButton("V");
jbtW=new JButton("W");
jbtX=new JButton("X");
jbtY=new JButton("Y");
jbtZ=new JButton("Z");
JPanel p1=new JPanel();
p1.add(jbtA);
p1.add(jbtB);
p1.add(jbtC);
p1.add(jbtD);
p1.add(jbtE);
p1.add(jbtF);
p1.add(jbtG);
p1.add(jbtH);
p1.add(jbtI);
p1.add(jbtJ);
p1.add(jbtK);
p1.add(jbtL);
p1.add(jbtM);
p1.add(jbtN);
p1.add(jbtO);
p1.add(jbtP);
p1.add(jbtQ);
p1.add(jbtR);
p1.add(jbtS);
p1.add(jbtT);
p1.add(jbtU);
p1.add(jbtV);
p1.add(jbtW);
p1.add(jbtX);
p1.add(jbtY);
p1.add(jbtZ);
getContentPane().add(p1,BorderLayout.CENTER);
public void start()
game();
public void paint(Graphics g)
g.drawString("Welcome to Java!!", 50, 60 );
public void actionPerformed(ActionEvent e)
if (e.getSource()==jbtA)
check("A");
if (e.getSource()==jbtB)
check("B");
if (e.getSource()==jbtC)
check("C");
if (e.getSource()==jbtD)
check("D");
if (e.getSource()==jbtE)
check("E");
if (e.getSource()==jbtF)
check("F");
if (e.getSource()==jbtF)
check("F");
if (e.getSource()==jbtG)
check("G");
if (e.getSource()==jbtH)
check("H");
if (e.getSource()==jbtI)
check("I");
if (e.getSource()==jbtJ)
check("J");
if (e.getSource()==jbtK)
check("K");
if (e.getSource()==jbtL)
check("L");
if (e.getSource()==jbtM)
check("M");
if (e.getSource()==jbtN)
check("N");
if (e.getSource()==jbtO)
check("O");
if (e.getSource()==jbtP)
check("P");
if (e.getSource()==jbtQ)
check("Q");
if (e.getSource()==jbtR)
check("R");
if (e.getSource()==jbtS)
check("S");
if (e.getSource()==jbtT)
check("T");
if (e.getSource()==jbtU)
check("U");
if (e.getSource()==jbtV)
check("V");
if (e.getSource()==jbtW)
check("W");
if (e.getSource()==jbtX)
check("X");
if (e.getSource()==jbtY)
check("Y");
if (e.getSource()==jbtZ)
check("Z"); -
Java Applet Security Restriction?
Hi,
I wrote a java applet and test it on my computer. When I view it with applet viewer I can view the applet correctly. But when I try to view on the Internet Explorer, it said "Java Applet Started" But I didn't see anything on the screen.
This happens when I actually incorporate the JFileChooser. When I take out that, the applet can run.
What I think is, even if I run the applect in Internet Explorer, since I am actually running directly from my computer (i.e C:\Myapplet.html) and not even through Apache or IIS why I won't be able to carry out such operation?Output from JavaConsole
Exception in thread "AWT-EventQueue-2" java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPropertyAccess(Unknown Source)
at java.lang.System.getProperty(Unknown Source)
at java.io.Win32FileSystem.getUserPath(Unknown Source)
at java.io.Win32FileSystem.resolve(Unknown Source)
at java.io.File.getAbsolutePath(Unknown Source)
at sun.awt.shell.Win32ShellFolder2.<init>(Unknown Source)
at sun.awt.shell.Win32ShellFolder2.listFiles(Unknown Source)
at sun.awt.shell.ShellFolder.listFiles(Unknown Source)
at sun.awt.shell.Win32ShellFolderManager2.get(Unknown Source)
at sun.awt.shell.ShellFolder.get(Unknown Source)
at javax.swing.plaf.metal.MetalFileChooserUI.updateUseShellFolder(Unknown Source)
at javax.swing.plaf.metal.MetalFileChooserUI.installComponents(Unknown Source)
at javax.swing.plaf.basic.BasicFileChooserUI.installUI(Unknown Source)
at javax.swing.plaf.metal.MetalFileChooserUI.installUI(Unknown Source)
at javax.swing.JComponent.setUI(Unknown Source)
at javax.swing.JFileChooser.updateUI(Unknown Source)
at javax.swing.JFileChooser.setup(Unknown Source)
at javax.swing.JFileChooser.<init>(Unknown Source)
at javax.swing.JFileChooser.<init>(Unknown Source)
at FotoUpload.createGUI(FotoUpload.java:48)
at FotoUpload.access$000(FotoUpload.java:24)
at FotoUpload$1.run(FotoUpload.java:86)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
This is what happen when I run my code below
* FotoUpload.java
* Created on November 15, 2006, 11:30 AM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
* @author Leo Liu
import java.io.*;
import javax.swing.JApplet;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.JComponent.*;
import javax.swing.filechooser.*;
public class FotoUpload extends JApplet implements ActionListener{
JButton BtnBrowse;
JPanel PnlUpload;
JFileChooser fcSelectFile;
JTextArea log;
private void createGUI(){
setLayout(new BorderLayout(5,5));
//Making Button
BtnBrowse=new JButton("Browse");
BtnBrowse.setToolTipText("Click on Browse to select picture");
BtnBrowse.setAlignmentX(Component.RIGHT_ALIGNMENT);
BtnBrowse.setPreferredSize(new Dimension(30,20));
BtnBrowse.addActionListener(this);
//Putting Button inside the panel and specifying the button size
JPanel PnlBrowse = new JPanel();
PnlBrowse.setLayout(new BoxLayout(PnlBrowse, BoxLayout.X_AXIS));
PnlBrowse.add(Box.createRigidArea(new Dimension(30,20)));
PnlBrowse.add(BtnBrowse);
//Create a file chooser
fcSelectFile = new JFileChooser();
//Creating Panel to show selected pictures for uploading
PnlUpload=new JPanel();
PnlUpload.setBorder(javax.swing.BorderFactory.createTitledBorder("Place Pictures to Upload"));
PnlUpload.setToolTipText("You can drag and drop images into this area");
log=new JTextArea(5,20);
log.setMargin(new Insets(5,5,5,5));
log.setEditable(false);
PnlUpload.add(log);
//adding UI components to Applet
add(PnlBrowse,BorderLayout.NORTH);
add(PnlUpload,BorderLayout.CENTER);
public void actionPerformed(ActionEvent e) {
if (e.getSource() == BtnBrowse) {
int returnVal = fcSelectFile.showDialog(this,"Select");
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file[]= fcSelectFile.getSelectedFiles();
//This is where a real application would open the file.
int count=0;
while(count<file.length)
log.append("Opening: " + file[count].getName() + ".\n");
count++;
} else {
log.append("Open command cancelled by user.\n");
public void init() {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createGUI();
}It seems like I need to catch some exception or something. Can anyone help me? -
Java Applet painting outside it's borders?!
Hello all, I have a java applet that is painting outside of it's bordors in Firefox and IE, only when scrolling does this occur. I have been searching around and found a bug which was submitted in 2006 for the same issue but cannot see any resolution or further issues. I imagine there must be a workaround as this would be quite a major issue if it was always the case. It only happens when scrolling and the applet is being repainted. Any ideas?
Thanks
Dorihere we go!
package main;
import javax.swing.JApplet;
public class Test extends JApplet
private GamePanel gamePanel;
public Test()
public void init()
public void start()
//create a new GamePanel
gamePanel = new GamePanel();
//add the panel to the contentPane
this.getContentPane().add(gamePanel);
}//EOM
public void stop()
gamePanel.stopTimer();
public void destroy()
System.out.println("preparing for unloading...");
}and
package main;
import java.awt.Dimension;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.Timer;
import java.util.TimerTask;
import javax.swing.JPanel;
public class GamePanel extends JPanel{
private static final int PWIDTH = 400;
private static final int PHEIGHT = 400;
private StringBuffer buffer;
private int clickCounter = 0;
private static final int FONTSIZE = 100;
//timer period in ms
private static final int PERIOD = 100;
//game length (seconds)
private static final int GAME_LENGTH = 5;
//for the timer
private long startTime;
//image for Double buffering
private Image dbImage = null;
//timer
Timer t = null;
private boolean debug = true;
private boolean gameRunning = false;
public GamePanel(){
setBackground(Color.gray);
setSize( new Dimension(PWIDTH, PHEIGHT));
setFocusable(true); //to receive key events
requestFocus();
addMouseListener( new MouseAdapter() {
public void mousePressed(MouseEvent e)
{ doMouseAction(); }
setUpNewGame();
}//EOC
public void setUpNewGame(){
//set gameRunning to true, affects click actions
gameRunning = true;
//set counter to 0
clickCounter = 0;
MyTimerTask task = new MyTimerTask();
t = new Timer();
t.scheduleAtFixedRate(task,0,PERIOD);
//for the timer
startTime = System.currentTimeMillis();
}//EOM
private void doMouseAction(){
if(gameRunning == true){
incrementCounter();
else if(gameRunning == false){
setUpNewGame();
}//EOM
public void stopTimer(){
t.cancel();
System.out.println("Timer stopped!");
public void timesUp(){
//stop the timer
stopTimer();
//set game running to false
gameRunning = false;
//show gameover message
//overwrite dbimage with score
Graphics dbg = dbImage.getGraphics();
//clear the image
dbg.setColor(Color.gray);
dbg.fillRect(0, 0, getWidth(), getHeight());
//write the score
dbg.setColor(Color.white);
dbg.drawString("Your score was "+clickCounter+" clicks in "+GAME_LENGTH+" secs", 10, 40);
//draw this to screen
repaint();
public void paintComponent(Graphics g)
super.paintComponent(g);
g.drawImage(dbImage, 0, 0, null);
//draw to dbImage
public void renderImage(){
//for debug only
long startRenderTime = System.nanoTime();
//this will be removed, on init it should take the attributes from the html
//and create the dbimage only once with these params
//out(""+dbImage);
dbImage = createImage(getWidth(), getHeight());
out(dbImage+","+getWidth()+","+getHeight());
Graphics dbg = dbImage.getGraphics();
//this code should be here
dbg.setColor(Color.gray);
dbg.fillRect(0,0, getWidth(), getHeight());
dbg.setColor(Color.white);
dbg.setFont(new Font("ARIAL BOLD",Font.PLAIN,FONTSIZE));
dbg.drawString(""+clickCounter,(getWidth()/2),(getHeight()/2));
//draw timer
dbg.setFont(new Font("ARIAL",Font.PLAIN,15));
//calc time
long currentTime = System.currentTimeMillis() - startTime;
//for display in secs
float floatTime = (float)((int)(currentTime/100f))/10f;
dbg.drawString(""+floatTime, 10, getHeight()-10);
//dbg.dispose();//test
if(false){ //test for game over here
//draw game over stuff here
if(debug){
//in ms
long totalRenderTime = (System.nanoTime() - startRenderTime)/1000000L;
System.out.println("Total Render Time = "+totalRenderTime+" ms, allowed "+PERIOD+"ms");
}//EOM
public void incrementCounter(){
clickCounter++;
private class MyTimerTask extends TimerTask{
public void run(){
renderImage();
repaint();
if(System.currentTimeMillis()-startTime >= GAME_LENGTH*1000){
//stop the game
timesUp();
}//End of inner class
* Debugging method
* @param out
private void out(String out){
System.out.println(out);
}//End of class -
I can't run signed Java Applets
HI
I have a java applet where I need to have acces to a local file, but I can't get IE to run the applet. (IE do not come with the Secutiy Warning window.)
From the homepage, I run the applet via:
<applet name=read_file code="read_file.class" width="0" height="0">
<script language="JavaScript">
document.read_file.file_read();
</script>
And the java code is:
import java.applet.*;
import java.awt.*;
import java.io.*;
public class read_file extends Applet{
public char[][] ip;
public int counter;
public String te="dette er en java test";
public void init() {
public void file_read() {
String str;
counter =0;
try {
BufferedReader in = new BufferedReader(new FileReader("c:\test\config.txt"));
while ((str = in.readLine()) != null){
ip[counter] = str.toCharArray();
counter++;
in.close();
} catch(IOException e) {
public void test() {
I have signed the cab file with:
"C:\Program Files\Microsoft.NET\SDK\v1.1\Bin\signcode.exe" -j "C:\Program Files\Microsoft.NET\SDK\v1.1\Bin\JAVASIGN.DLL" -jp High -v hjl.pvk -spc hjl.spc -n "oil" -i "www.vedikke endnu-.dk" "C:\Documents and Settings\rbn\Desktop\UIp\hjemmeside\read_file.cab"
and maket the cab fil with:
"C:\Documents and Settings\rbn\Desktop\UIp\cab\BIN\MAKECAB.EXE" "C:\Documents and Settings\rbn\Desktop\UIp\java\read_file.class" "C:\Documents and Settings\rbn\Desktop\UIp\hjemmeside\read_file.cab"
What do I need to different ?I see no reason why you want to make this applet for the msjvm, here is how you do it with the sun sdk:
Signing applets:
http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
second post and last post for the java class file
http://forum.java.sun.com/thread.jsp?forum=63&thread=409341
4th post explaining how to set up your own policy with your own keystore
(my copy and paste fingers are really getting tired now, copyd and pasted this
for about a 100 times now)
Notice some differences in the html code of the examples (they don't use the applet tag)
If you're aiming for the msjvm because you don't want any support form MS in
the near future and want to delever a legacy unsupported unmaintainable applet
than I have to ask you how you compiled the applet. If you used the SUN sdk
then are you aware that the msjvm cannot handle java version higher than 1.1?
So you have to compile it like this: javac -source 1.3 -target 1.1 ....
Your html file seems to be missng the cabbase value so how do you expect
IE to find the cab file? -
Hello,
I have a customer that is looking to set up SSO with an application that uses a Java Applet as its login screen to the app.
Any advice on how this can be set up. SSO via External Application doesn't seem to work since it doesn't use a GET or POST method.
Thank You!
PadminiAn applet (with normal security setup) can only open up socket connections to the host from whence the applet came. Sounds like your applet is trying to talk to port 5000 on the client's box. Can't do that, unless:
a) The client's box is the server (which is the case under your first scenario)
b) The applet is signed or otherwise set up to be "trusted" that it doesn't contain harmful code.
The security policy is there for a reason. I, for example, wouldn't want to stumble across some rogue applet out on the internet which then tries to open up socket connections to things on my corporate intranet or local machine -- unless I KNEW it was going to do that (I "trust" it). -
Can I save as pdf when printing from a Java applet on a webpage in Safari?
I am trying to use a webpage that is running a Java applet. A dialog comes up that asks me, "Do you want to run this application?" The dialog also says, "This application will run with limited access that is intended to protect your computer and personal information." I select "Run". The applet generates an image I want to print. There is a "Print" button on the applet. I select "Print". A Security Warning dialog comes up that says, "The applet has requested access to the printer. Do you want to allow this action?" I select "OK". The Print dialog comes up. I choose the PDF button in the lower left corner. I choose "Save as PDF...". A second Print dialog comes up. I input a title in the Save As box. I choose Desktop in the Where box. I do not change anything else and select the "Save" button. A dialog appears that says, "Print Error while printing." There is an icon with paper, a pencil, a ruler and a paintbrush on the dialog.
Is this an issue with Apple and Java security? Does "run with limited access" mean I can't print and save as PDF? Should I upgrade to Mavericks? It seems like others have not been happy with Mavericks and have had problems saving as PDF with Mavericks. How do I let Apple know about this error? The error dialog is useless.
I am on a Mac running OS X 10.8.5 and Safari 6.1.2. My Java version is 7 update 51.
What other information can I provide to help solve the problem (if it can be solved)?
Thank you for your help!Correction I would like to save as PDF/A-1b
for archiving.
http://www.adobe.com/enterprise/standards/pdfa/ -
Problem Launching Java Applet with Plug-in: Version 1.4.2_01
Hello out there:
I recently installed j2re-1.4.2_01 on my home computer but have been unable to access Web sites emmploying JAva applets. The following is an email exchange with Jeff Hall of Lowell Observatory, manager of an educational site hosted by Lowell, trying to resolve my problem. The messages are better understood if read in reverse order.
I'm hoping that someone will recognize the source of my problem and can recommmend a solution. I would appreciate any help offered.
Thanks,
Mike Coucke
Hi Jeff:
Well, I guess the problem lies with me somewhere. Here's my answer/status to your questions/suggestions:
1) I'm using MS Windows Me version 4.90.3000
2) I do have the directory C:\Windows\.jpi_cache\jar\, but the only thing in it is an empty folder labeled "1.0". The file LP.jar does not exist anywhere on my hard drive.
3) I tried several game sites that utilized Java applets and got the same results: the Java cup in the upper left corner followed a few seconds later by the red "X". So, evidently the problem is somewhere on my end.
I'm going to post our email exchanges in a Java Users Forum managed by Sun to see if anyone out there can solve my problem. However, if you have any more suggestions, I'll be glad to try them.
Thanks for the help.
Mike Coucke
[email protected]
----- Original Message -----
From: "Jeffrey Hall" <[email protected]>
To: "'Mike Coucke'" <[email protected]>
Sent: Friday, September 05, 2003 1:02 PM
Subject: RE: Registration with Lowell Education Online
Mike,
Rats! What version of Windows are you using? It's a little strange to
see the user directory set to C:\Windows; if you're using XP, I'd expect
it to be something like C:\Documents and Settings\Mike Coucke. In any
event, the output that is of concern is these two lines:
java.lang.ClassNotFoundException: LPRemote.class
Caused by: java.net.UnknownHostException: proxy
It looks like your browser is not finding our server's IP when it comes
time to download the necessary Java code.
LPRemote.class is the fundamental code that runs LOPARC, and your
browser should be downloading it automatically when you click connect.
LPRemote.class is stored along with a bunch of other classes in a file
called "LP.jar" that you download from our server. So, if you go to C:
in Windows Explorer and do a file search for LP.jar, you should find it.
On my machine, it's stored in a directory called ".jpi_cache\jar\" in my
user home directory. Let me know if you have this file, or the
jpi-cache directory.
One other thing you might try is going to a different site that you know
uses Java applets -- I think some of the online game rooms at Yahoo use
Java. See if other sites that use Java load correctly. Then we'll know
if it's our server specifically, or a more general problem on your end.
Jeff Hall
Lowell Observatory
Hello Jeff:
I still have the Java "blues". I followed your instructions, but am still unable to launch a LOPARC session. After an initial failure, I uninstalled all three Java versions I had (1.4.0, 1.4.1, 1.4.2), then reinstalled 1.4.2_01 from the Sun website.
Now, when I try to launch LOPARC, I initially get a blank window with the Java cup in the upper left corner. After about 20 seconds, the cup changes to a red "X". During those 20 seconds, the following appear in the IE message bar at the bottom of the window: "Applet LPRemote notinited" (their spelling) which changes to "Loading Java Applet Failed..." when the red "X" appears.
Following is a copy of the log from my Java Console during all of this:
Java(TM) Plug-in: Version 1.4.2_01
Using JRE version 1.4.2_01 Java HotSpot(TM) Client VM
User home directory = C:\WINDOWS
Proxy Configuration: Manual Configuration
Proxy: http=proxy,https=proxy,ftp=proxy,gopher=proxy
Proxy Overrides:
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
p: reload proxy configuration
q: hide console
r: reload policy configuration
s: dump system properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
load: class LPRemote.class not found.
java.lang.ClassNotFoundException: LPRemote.class
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadCode(Unknown Source)
at sun.applet.AppletPanel.createApplet(Unknown Source)
at sun.plugin.AppletViewer.createApplet(Unknown Source)
at sun.applet.AppletPanel.runLoader(Unknown Source)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.UnknownHostException: proxy
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.http.HttpClient.privilegedOpenServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.net.www.http.HttpClient.<init>(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.<init>(Unknown Source)
at sun.plugin.net.protocol.http.HttpClient.New(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.createConnection(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
... 10 more
I followed this up by executing the following three console commands:
"dump system properties"
"dump classholder list"
"dump thread list"
and obtained the following listings:
Dump system properties ...
acl.read = +
acl.read.default =
acl.write = +
acl.write.default =
application.home = C:\PROGRA~1\JAVA\J2RE14~1.2_0
awt.toolkit = sun.awt.windows.WToolkit
browser = sun.plugin
browser.vendor = Sun Microsystems, Inc.
browser.version = 1.1
deployment.javaws.cache.dir = C:\WINDOWS\.javaws\cache
deployment.javaws.jre.0.enabled = true
deployment.javaws.jre.0.location = http://java.sun.com/products/autodl/j2se
deployment.javaws.jre.0.osarch = x86
deployment.javaws.jre.0.osname = Windows
deployment.javaws.jre.0.path = C:\Program Files\Java\j2re1.4.2_01\bin\javaw.exe
deployment.javaws.jre.0.platform = 1.4
deployment.javaws.jre.0.product = 1.4.2_01
deployment.javaws.jre.0.registered = true
deployment.javaws.version = javaws-1.4.2_01
deployment.system.cacerts = C:\PROGRA~1\JAVA\J2RE14~1.2_0\lib\security\cacerts
deployment.system.home = C:\WINDOWS\Sun\Java\Deployment
deployment.system.jssecacerts = C:\PROGRA~1\JAVA\J2RE14~1.2_0\lib\security\cacerts
deployment.system.profile = C:\WINDOWS
deployment.system.security.policy = file:/C:/WINDOWS/Sun/Java/Deployment/security/java.policy
deployment.user.cachedir = C:\WINDOWS\Application Data\Sun\Java\Deployment\cache
deployment.user.certs = C:\WINDOWS\Application Data\Sun\Java\Deployment\security\deployment.certs
deployment.user.extdir = C:\WINDOWS\Application Data\Sun\Java\Deployment\ext
deployment.user.home = C:\WINDOWS\Application Data\Sun\Java\Deployment
deployment.user.jssecerts = C:\WINDOWS\Application Data\Sun\Java\Deployment\security\deployment.jssecerts
deployment.user.logdir = C:\WINDOWS\Application Data\Sun\Java\Deployment\log
deployment.user.profile = C:\WINDOWS\Application Data
deployment.user.security.policy = file:/C:/WINDOWS/Application%20Data/Sun/Java/Deployment/security/java.policy
deployment.user.tmpdir = C:\WINDOWS\Application Data\Sun\Java\Deployment\cache\tmp
file.encoding = Cp1252
file.encoding.pkg = sun.io
file.separator = \
file.separator.applet = true
http.agent = Mozilla/4.0 (Windows Me 4.90)
http.auth.serializeRequests = true
https.protocols = SSLv3,SSLv2Hello
java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
java.awt.printerjob = sun.awt.windows.WPrinterJob
java.class.path = C:\PROGRA~1\JAVA\J2RE14~1.2_0\classes
java.class.version = 48.0
java.class.version.applet = true
java.endorsed.dirs = C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\endorsed
java.ext.dirs = C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\ext
java.home = C:\PROGRA~1\JAVA\J2RE14~1.2_0
java.io.tmpdir = C:\WINDOWS\TEMP\
java.library.path = D:\PROGRAM FILES\INTERNET EXPLORER 6;.;C:\WINDOWS\SYSTEM;C:\WINDOWS;D:\PROGRA~1\INTERN~1;;C:\WINDOWS;C:\WINDOWS\COMMAND
java.protocol.handler.pkgs = sun.plugin.net.protocol|sun.plugin.net.protocol
java.runtime.name = Java(TM) 2 Runtime Environment, Standard Edition
java.runtime.version = 1.4.2_01-b06
java.specification.name = Java Platform API Specification
java.specification.vendor = Sun Microsystems Inc.
java.specification.version = 1.4
java.util.prefs.PreferencesFactory = java.util.prefs.WindowsPreferencesFactory
java.vendor = Sun Microsystems Inc.
java.vendor.applet = true
java.vendor.url = http://java.sun.com/
java.vendor.url.applet = true
java.vendor.url.bug = http://java.sun.com/cgi-bin/bugreport.cgi
java.version = 1.4.2_01
java.version.applet = true
java.vm.info = mixed mode
java.vm.name = Java HotSpot(TM) Client VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Sun Microsystems Inc.
java.vm.specification.version = 1.0
java.vm.vendor = Sun Microsystems Inc.
java.vm.version = 1.4.2_01-b06
javaplugin.maxHeapSize = 96m
javaplugin.nodotversion = 142_01
javaplugin.proxy.config.list = http=proxy,https=proxy,ftp=proxy,gopher=proxy
javaplugin.proxy.config.type = manual
javaplugin.version = 1.4.2_01
javaplugin.vm.options = -Djava.class.path=C:\PROGRA~1\JAVA\J2RE14~1.2_0\classes -Xbootclasspath/a:C:\PROGRA~1\JAVA\J2RE14~1.2_0\lib\plugin.jar -Xmx96m -Djavaplugin.maxHeapSize=96m -Xverify:remote -Djavaplugin.version=1.4.2_01 -Djavaplugin.nodotversion=142_01 -Dbrowser=sun.plugin -DtrustProxy=true -Dapplication.home=C:\PROGRA~1\JAVA\J2RE14~1.2_0 -Djava.protocol.handler.pkgs=sun.plugin.net.protocol
line.separator = \r\n
line.separator.applet = true
os.arch = x86
os.arch.applet = true
os.name = Windows Me
os.name.applet = true
os.version = 4.90
os.version.applet = true
package.restrict.access.netscape = false
package.restrict.access.sun = true
package.restrict.definition.java = true
package.restrict.definition.netscape = true
package.restrict.definition.sun = true
path.separator = ;
path.separator.applet = true
sun.arch.data.model = 32
sun.boot.class.path = C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\rt.jar;C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\i18n.jar;C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\sunrsasign.jar;C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\jsse.jar;C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\jce.jar;C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\lib\charsets.jar;C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\classes;C:\PROGRA~1\JAVA\J2RE14~1.2_0\lib\plugin.jar
sun.boot.library.path = C:\PROGRAM FILES\JAVA\J2RE1.4.2_01\bin
sun.cpu.endian = little
sun.cpu.isalist = pentium i486 i386
sun.io.unicode.encoding = UnicodeLittle
sun.java2d.fontpath =
sun.net.client.defaultConnectTimeout = 120000
sun.os.patch.level =
trustProxy = true
user.country = US
user.dir = C:\WINDOWS\Desktop
user.home = C:\WINDOWS
user.language = en
user.name = Michael G. Coucke
user.timezone =
user.variant =
Done.
Dump classloader list ...
codebase=http://kraken.lowell.edu/, key=http://kraken.lowell.edu/,IONJava/classes/ion_16.jar,IONJava/classes/LP.jar, zombie=false, cache=true, refcount=1, info=sun.plugin.ClassLoaderInfo@109de5b
Done.
Dump thread list ...
Group main,ac=11,agc=2,pri=10
main,5,alive
AWT-Windows,6,alive,dameon
AWT-Shutdown,5,alive
Java2D Disposer,10,alive,dameon
AWT-EventQueue-0,6,alive
Group Plugin Thread Group,ac=3,agc=0,pri=10
Main Console Writer,6,alive
AWT-EventQueue-1,6,alive
TimerQueue,5,alive,dameon
Group http://kraken.lowell.edu/-threadGroup,ac=2,agc=0,pri=4
thread applet-LPRemote.class,4,alive
AWT-EventQueue-2,4,alive
Done.
I'm not a Java expert, so this may be more information than you ever wanted to see.
Once again, I hope that you can help. My experience has been that I usually have some obscure option set incorrectly and that causes me great grief.
Thanks fo your help,
Mike Coucke
[email protected]
----- Original Message -----
From: "Jeffrey Hall" <[email protected]>
To: "'Mike Coucke'" <[email protected]>
Sent: Thursday, September 04, 2003 11:48 AM
Subject: RE: Registration with Lowell Education Online
Hi Mike,
Try it now. I think this problem has arisen because Sun just
released a new version of the Plug-in (1.4.2), and when we released the
public beta of LOPARC, only one relevant version (1.4.0) was available
and the LOPARC code was written to look for that by default. I have
just recoded the relevant routines so they should now cause your browser
to simply pick up the latest 1.4 version of the Plug-in you have
installed, whatever it is. I "broke" Java on my machine to replicate
your problem, and the code I inserted today did fix it. Hopefully it
will have the same effect for you. I am running IE 6 and plugin
1.4.2_01 (as accessed via Tools->Sun Java Console).
One broader problem: some (non-LOPARC-specific) users on the Sun
forums have reported the "JRE collision" you are seeing when multiple
versions of the Plug-in are installed on the same machine. So if the
fix I made to our code doesn't work, one option would be to uninstall
all Java components from your computer and do a fresh install of the
latest runtime environment.
Let me know how/if this works. Thanks for the feedback and for your
patience.
Best regards,
Jeff Hall
Lowell Observatory
-----Original Message-----
From: Mike Coucke [mailto:[email protected]]
Sent: Wednesday, September 03, 2003 6:30 PM
To: [email protected]
Subject: Re: Registration with Lowell Education Online
Hello Jeff:
So far, I have been unable to launch a LOPARC session. I repeatedly
get the following error message:
"Exception: java.lang.ClassNotFoundException: LPRemote.class"
My browser is MS Internet Explorer version 6.0.2800.1106 Initially I was
using Java Plug-In version 1.4.1 and received the error message. I went
to the Sun website and downloaded/installed Java Plug-In version 1.4.2
and still get the message.
Before I try to launch LOPARC, I can select Tools->Sun Java Console from
IE's pull down menu to check my Java Plug-In version. When I try to
launch LOPARC, I get the following message:
"Applet(s) in this HTML page requires a version of Java different from
the one the browser is currently using. In order to run the applet(s)
in this HTML page, a new browser session is required, press 'Yes' to
start a new browser session." If I select 'No', I get the following
message: "Java Plug-in detected JRE collission"
If I select 'Yes', a new browser window opens and then I get the first
message above.
Can you help?
Mike Coucke
[email protected]
----- Original Message -----
From: <[email protected]>
To: <[email protected]>
Sent: Monday, September 01, 2003 5:30 PM
Subject: Registration with Lowell Education Online
September 1, 2003
Dear Michael Coucke:
Thank you for registering with Lowell Observatory's online education
site. We hope you enjoy using it and visit regularly as we continue to
expand its features and capabilities. This is a one-time welcoming
email.
For your records, your user ID is xxxxx, and your password is #########.
You'll need to supply these each time you log in.
This site gives you access to research-grade equipment including a 16"
telescope, CCD detector, and image processing software. Our online
archive of data is now available 24/7. The telescope will be opening to
our onsite users in May, and on select nights to the Internet at large
in June.
We have designed this site so you don't need a huge monitor or a
supercomputer to use it. All pages are viewable on screens running at
800x600 resolution or higher. To use LOPARC, you'll need a Java-enabled
browser with the Java 1.4 plug-in installed. If you don't have the
plug-in, you'll be prompted to download it the first time you attempt to
connect. This is an admittedly large (9 MB) but one-time-only download.
This site works correctly under Internet Explorer version 5 or higher.
If you use Netscape, you must be running version 6 or higher, and
display or applet behavior anomalies may occur.
If at any time you can't connect to our server, simply try again later.
We do experience several power outages each year, particularly during
Flagstaff's summer thunderstorm season. Our server is fully protected
and backed up, and can be quickly brought back on line, but any active
user sessions will be lost. Thanks for your patience during these
inevitable downtimes.
Your questions, comments, suggestions, and bug reports about this site
are always welcome. On behalf of the LOPARC development team, thanks
for signing up!
Jeffrey Hall
Assistant Research Scientist
Associate Director, Education and Special Programs
Lowell Observatory
Flagstaff, ArizonaHi Mike,
I see this in your logs:
Java(TM) Plug-in: Version 1.4.2_01
Using JRE version 1.4.2_01 Java HotSpot(TM) Client VM
User home directory = C:\WINDOWS
Proxy Configuration: Manual Configuration
Proxy: http=proxy,https=proxy,ftp=proxy,gopher=proxy
Proxy Overrides:
I just helped my Dad set up his computer with a new
cable modem, and had the situation where we couldn't
access any secure Web sites. The cable folks had us
disable the proxy. It looks like the error message is
saying it can't find your proxy server, and the logs
you posted say that you've decided to configure your
proxy manually, rather than using the settings from
IE (which is how mine is set up in the plugin
control panel.)
Could that be the problem?
--Steve -
I am trying to use and education program that needs Java applets and it will not run on Safari. IE will not install from the web. How do I get a browser that will work to install so I can use this program when I travel.
Try using FireFox. IE will only run on a Mac if you run Windows on the Mac.
Windows on Intel Macs
There are presently several alternatives for running Windows on Intel Macs.
Install the Apple Boot Camp software. Purchase Windows 7 or Windows 8. Follow instructions in the Boot Camp documentation on installation of Boot Camp, creating Driver CD, and installing Windows. Boot Camp enables you to boot the computer into OS X or Windows.
Parallels Desktop for Mac and Windows XP, Vista Business, Vista Ultimate, or Windows 7. Parallels is software virtualization that enables running Windows concurrently with OS X.
VM Fusion and Windows XP, Vista Business, Vista Ultimate, or Windows 7. VM Fusion is software virtualization that enables running Windows concurrently with OS X.
CrossOver which enables running many Windows applications without having to install Windows. The Windows applications can run concurrently with OS X.
VirtualBox is a new Open Source freeware virtual machine such as VM Fusion and Parallels that was developed by Solaris. It is not as fully developed for the Mac as Parallels and VM Fusion.
Note that Parallels and VM Fusion can also run other operating systems such as Linux, Unix, OS/2, Solaris, etc. There are performance differences between dual-boot systems and virtualization. The latter tend to be a little slower (not much) and do not provide the video performance of the dual-boot system. See MacTech.com's Virtualization Benchmarking for comparisons of Boot Camp, Parallels, and VM Fusion. A more recent comparison of Parallels, VM Fusion, and Virtual Box is found at Virtualization Benchmarks- Parallels 10 vs. Fusion 7 vs. VirtualBox. Boot Camp is only available with Leopard and later. Except for Crossover and a couple of similar alternatives like DarWine you must have a valid installer disc for Windows.
You must also have an internal optical drive for installing Windows. Windows cannot be installed from an external optical drive. -
Problem with java applet and array of arrays
hi!
i'm passing an array of arrays from java applet using
JSObject.getWindow(applet).call("jsFunction", array(array(), array()) );
in every other browser than safari 4.0.2 it's no problem to iterate over this array. in safari "array.length" is undefined. is such construction supported in safari's js engine?
Message was edited by: quaintpl
Message was edited by: quaintpl
Message was edited by: quaintpl
Message was edited by: quaintpl
Message was edited by: quaintplThanks for the answer but the problem is the type of object of method and how from pl/sql is posiblle to call.
The method waiting a ArrayofAlicIva, but if i define this object is not posible to set the object inside the array because the wsdl not have this functions.
I need to define array of objects but the object is inside is the diferent type of array.
If i Define the array of object correct to object inside, the method expect that the other array type.
Is a Deadlock ??
The solution in Java is Simple
AlicIva[] alicIva = new AlicIva[1];
alicIva[0]= new AlicIva();
alicIva[0].setId(Short.parseShort(1));
fedr[0].setIva(alicIva);
this is the method imported in java class to form
-- Method: setIva (LArrayOfAlicIva;)V
PROCEDURE setIva(
obj ORA_JAVA.JOBJECT,
a0 ORA_JAVA.JOBJECT) IS
BEGIN
args := JNI.CREATE_ARG_LIST(1);
JNI.ADD_OBJECT_ARG(args, a0, 'ArrayOfAlicIva');
JNI.CALL_VOID_METHOD(FALSE, obj, 'FECAEDetRequest', 'setIva', '(LArrayOfAlicIva;)V', args);
END; -
Removing the 'Warning Java Applet' Status Bar
Hi,
I've written an applet that does not require access outside the sandbox so doesn't need signing. However, it pops up an instance of Window, and because it's not signed the window has a status bar across the bottom which says 'Warning Java Applet' or something similar depending on the browser. Is there any way to remove this status bar without signing the applet or changing the security settings of the browser. I guess it must be added to the window so maybe it's just a component that can be removed, but how?
Thanks in advanceToday the Security Warning sign appeared at the bottom of my computer screen - how do I get rid of it. I do have Java whose icon used to be in the lower right hand section of my screen - along with all the other icon programs that I have.
Now the icon is no longer down on the bottom right of the screen, but in the middle with a Security Warning -(the wording) next to the jave icon.
This is really annoying me - how can I get rid of it, and - why did it appear here?
Anxiously awaiting your reply.
Donna -
Java Control Panel wont open at all and any Java Applets crash web browsers
Hello,
I recently installed a fresh fully updated copy of Windows 7 Home Premium 64 bit, and I have not for the life of me been able to get Java working at all. Java version is the latest JRE 6U31. I only have Internet Explorer 9 installed but I doubt it is a browser issue since I cannot even open the Java control panel. I have tried using the 32 bit version of Java, and the 64 bit. Anytime I try to open the Java control panel with either 32 bit or 64 bit, I get an error message (click link below to view error message):
http://i65.photobucket.com/albums/h204/gobigjeff/Java%20Error/javaerror.png
I can only bring up the Java Control Panel using the command “javaws –viewer” . Anytime I try to load a web page with a Java applet in either 64 bit or 32 bit, it freezes and crashes. I am running Internet Explorer 9 and have tried both the 32 bit and 64 bit browser versions. I saw Java’s recommendation to only use the 32 bit version so I have mainly been trying to get the 32 bit version working 1st, with no success. I have tried ALL of the following steps, and have done some exhaustive research on this problem. It seems others have had this issue as well, with no solution to be found:
• Uninstalled and reinstalled only Java 32 bit JRE 6u31 multiple times (Used Javara and reg cleaner to remove all old Java traces)
• Uninstalled and reinstalled only Java 64 bit JRE 6u31 (Used Javara and reg cleaner to remove all old Java traces)
• Uninstalled and reinstalled bit JRE 7 (Used Javara and reg cleaner to remove all old Java traces)
• Used SFC /scannow in safe mode to verify Windows files
• Ran spyware and virus scan with no issues detected
• Added all java processes to windows firewall
I am out of solutions here. If anyone has had this problem with Java or knows what I need to do to fix the problem your advice would be greatly appreciated. I don’t think reinstalling windows is the solution because this is a fresh install.
Edited by: 918650 on Mar 4, 2012 1:16 PMI figured it out. I changed the installation folder to C:/Java and it finally worked!
Maybe you are looking for
-
AdapterDeviceID: 0x9712 AdapterDriverVersion: 8.861.1.2000 AdapterSubsysID: 164c103c AdapterVendorID: 0x1002 Add-ons: %7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D:33.1.1 AvailablePageFile: 13967405056 AvailablePhysicalMemory: 6222434304 AvailableVirtua
-
hi, Could any body tell that, how to change the oracle client of forms 6.0.8.26 , from 8.0.2 to 10.1. i have installed oracle 10.1 client and forms 6.0.8.26 , now i wanted to make the oracle_home of these oracle client and forms to be same. Any body
-
HT4137 i have encountered problem while downloading ios 6
i have iphone 3gs in which without doing backup i tried to download ios 6 . inbetween some error occurred now its saying to restore the phone . i don't want to loose the data .can i do something about it
-
Migrating from Hyperion 9.3.1 to 11.1.2
Dear All, Can somebody please provide me a detailed method to migrate 9.3.1 to 11.1.2 as per below 1. Hyperion Essbase migration with Partitions 2. Hyperion Planning migration with Business Rules 3.Shared services migration MSAD is used as external a
-
Finding stuff in "private" folder?
Hi! Is there some way to put a folder into "privacy" (Spotlight prefPane), so that usual Spotlight-searches won't search it, but have a way of finding stuff in that folder nevertheless (say, by using Finder's searchbar)? I have several thousands of a