JAVA Exe+JAVA Program Scheduling

I have following 3 subquestions:
1. How do I convert a .class file to .exe
2. How do i add my java program to a scheduler so that it runs periodically
3. How do I make my java program run in background
Please mail me at [email protected]

I have following 3 subquestions:
1. How do I convert a .class file to .exeYou can try for instance InstallAnywhere from ZeroG.
2. How do i add my java program to a scheduler so that
it runs periodicallyJust make a batch file including the command to run your application and schedule it to be executed.
3. How do I make my java program run in background
It depends on what you mean: if you want to run the application without the visible shell window use javaw.

Similar Messages

  • Kaspersky vs Java.exe detected as virus - Need help!

    Hi,
    Just installed yesterday Kaspersky Internet Security 2009 on my VISTA Ultimate 32 bits laptop. After doing a complete analysis, it reported out of a total of 3 the following threats:
    c:\windows\system32\java.exe
    c:\Program Files\Java\jre1.6.0\bin\java.exe
    What can I do with these?
    Honestly, I don't know really as I'm far from being an expert with JAVA.
    In conclusion, what do I do with these 2 files? Here is an item I could find from my VISTA "programs install/uninstall" window:
    "JAVA(TM) SE Runtime Environment 6"
    To solve my threat warnings:
    - do I need to update this to a newer version? If so how?
    - put files to quarantine as they suggest?
    - do anything else?
    Thanks in advance for help!

    Hi,
    I solved this problem by doing as following:
    - first uninstall JAVA Runtime which was already installed in VISTA
    - Next Install last runtime SE Version
    "Java SE Runtime Environment 6u7".
    - Went to http://java.sun.com/javase/downloads/index.jsp
    - Created myself a user account
    - From page, downloaded runtime "Java Runtime Environment (JRE) 6 Update 7"
    - Installed it
    - When I then checked errors from Kaspersky, no more regarding JAVA.

  • Change Java.exe to some other name

    I have jdk1.6.0 installed on my machine with jre1.6.0
    when i am running any application its process is running default java.exe
    java.exe in Task Manager.
    How to change the java.exe name to java1.exe .

    Rename the exe on the disk.
    There are utilities in Unix which allow you to change the name a process appears to have. But since you said .exe, I guess you're using Windows.
    I've done this very successfully before. I have n batch files as part of a product which start different components of the project, each one does something like this...
    if exists ..\jre\bin\blah.exe goto blahexists
    copy ..\jre\bin\java.exe ..\jre\bin\blah.exe
    :blahexists
    ..\jre\bin\blah.exe -cp blah blah
    In that way, each batch file can dynamically create a new .exe as approprate and the Windows task manager will show you blah.exe (and foo.exe and myserver.exe) instead of java.exe, which means you can kill them! :-)

  • Hi i wrote a java program for scanning a system for java.exe 's

    hi ,
    i wrote a program which scans the system for java.exe 's and then it captures them in a linked list and then i
    iterate through it for "\\Java\\jdk1.5.0_08\\bin\\java.exe and my aim is to return true in case the linked list contains the string "\\Java\\jdk1.5.0_08\\bin\\java.exe" and stop scanning the system.
    If the linked list does not contain "Java\\jdk1.5.0_08\\bin\\java.exe" it should return false.
    But my problem is the program is continuing to scan the system even if the linked list has "\\Java\\jdk1.5.0_08\\bin\\java.exe"
    Any sort of help is appreciated.
    The code is as follows:
    package com.installanywhere.exper;
    import com.zerog.ia.api.pub.CustomCodeRule;
    import com.installanywhere.exper.SearchTool;
    * @author
    public class eFileTool extends CustomCodeRule {
         /* (non-Javadoc)
         * @see com.zerog.ia.api.pub.CustomCodeRule#evaluateRule()
         @Override
         public boolean evaluateRule() {
              // TODO Auto-generated method stub
              SearchTool searchtool=new SearchTool();
              boolean valueTocheckfor=false;
              valueTocheckfor=searchtool.find();
              String someothervalue=Boolean.toString(valueTocheckfor);
              if(someothervalue.equalsIgnoreCase("true")){
                   return true;
                   //System.exit()
              else if(someothervalue.equalsIgnoreCase("false")){
                   try {
                        Thread.sleep(5000);
                   } catch (InterruptedException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
              System.out.println(valueTocheckfor+"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
              return valueTocheckfor;
    The code of search tool is
    package com.installanywhere.exper;
    import java.io.*;
    import java.util.*;
    public class SearchTool
         * @param args
    static     boolean valuesToReturn=false;
    static     boolean anothervalueToRefer=false;
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              SearchTool           t = new SearchTool();
              System.out.println("xxxxxxxxxxxxxxxxxxxx");
              boolean someArgument=t.find();
              System.out.println(someArgument+"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii"+"");
                   public boolean find()
                        System.out.println("2222222222222222222");
                   boolean someThing=searchcomp("java.exe");
                   System.out.println(someThing+"inside the othere one");
                   return someThing;
              public boolean searchcomp(String file)
                   System.out.println("3333333333333333333333");
                   File[] drives=File.listRoots();
                   boolean valueIdentified=false;
                   for (int ctr=0;ctr<(drives.length-1);ctr++)
                        valueIdentified=search(drives[ctr],file);
                        System.out.println("4444444444444444444");
                   System.out.println(valueIdentified+"something i need to accomplish");
                   return valueIdentified;
                   public boolean search(File dir,String file)
                   File[] directories=dir.listFiles();
              System.out.println("55555555555555555555555");
                   if (directories == null)
                        System.out.println("666666666666666666666666");
                   return false;
                   for(int ctr=0;ctr<directories.length;ctr++)
                        if(directories[ctr].isDirectory())
                             System.out.println("77777777777777777777777777");
                             valuesToReturn=search(directories[ctr],file);
                             System.out.println(valuesToReturn+"india is great");
                        else
                             if(directories[ctr].getName().equals(file))
                                  String path = directories[ctr].getAbsolutePath().toString();
                                  System.out.println(path);
                                  List someList=new LinkedList();
                                  anothervalueToRefer=allPaths(path);     
                                  System.out.println(anothervalueToRefer+"god damn it");
                                       //System.out.println(anothervalueToRefer+"let me seeeeeeeeeeeeeeeeeee");                                        
                                  return anothervalueToRefer;
                   return valuesToReturn;
                   public boolean allPaths(String allPath)
                        List l=new LinkedList();
                        String somepath=allPath;
                        l.add(somepath);
                        //return l;
    /*if(l.contains("C:\\Program Files\\Java\\jdk1.5.0_08\\bin\\java.exe")){
                             System.out.println("yepeeeeeeeeeeeeee");
                             //System.exit(0);
    else{
         System.out.println(" the face");
                        ListIterator li = l.listIterator();
                        System.out.println("inside the method of all paths");
                        if(li.hasNext())
                             if(li.next().toString().contains("\\Java\\jdk1.5.0_08\\bin\\java.exe"))
                             System.err.println(somepath+"this is the path i wanted to resolve correctly");                         
                             return true;
                             else{
                                  System.out.println("trueeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
                                       return false;
                        else {
                                  return false;
         }

    A good place to ask advice about web development is at the MozillaZine "Web Development/Standards Evangelism" forum.
    *http://forums.mozillazine.org/viewforum.php?f=25
    The helpers at that forum are more knowledgeable about web development issues.<br>
    You need to register at the MozillaZine forum site in order to post at that forum.

  • How to start java.exe from a java program in windows ?

    Hi,
    I did like to know, if its possible to run java.exe from a java program on windows ? The java.exe should be visible from checking the processes that are currently running using the Task Manager on windows.

    Runtime.getRuntime().exec("java Sample");

  • Java.exe - power hungary program?

    Ok, this is a very weird problem (I think). A few times now, I've run a java program (using java <classname>) and my computer (top of the line Dell Inspiron 9100, very fast, 1 gb of RAM) has slowed considerably. To put it in perspective, I've rendered a video using Premier, at the same time as playing Counter-Strike, with no noticable decline in performance. Now, for the real proof, I've used Task Manager every time to find the problem. Every time java.exe has been using greater then 95% of my CPU. It has Hyper Threading, and Both CPU's are hitting 100%. It's a very fast jump from normal operating to ~100%, and it'll platue there, until I close the java.exe process. I can't imagine why it's doing this, can you? Should I be using any sort of arguments in the command. I also (the last time, I can't remember the others) was using a batch file to run my program. Will THAT effect anything? (I've never in my years dealing with computers, seen a shortcut/batch file clobber the CPU).
    Ok, the other program factors. At the time this happened, I was running a Server I wrote for a game I'm making. I was also running the client (both are threaded) at the same time (well duh, when else would I run the client thwap). I can provide code for both, if need be, they're short enough. I have run both at the same time before, and did here for about two minutes before I noticed the CPU acting up.
    Any thoughts are appreciated, solutions even more so :) Thanks for your time!

    I was assuming that it was the "author of <classname>'s fault, namely, me. But the circumstances are weird, and I can't duplicate them. Here's an update.
    I just re-ran the combination of my two programs, and while one spiked to 73% when it loaded (the GUI client), neither of them took much CPU. It ran at about 15% the entire time kI was testing (and running some music, and browser). This is completly normal. So, I tested using multiple copies of the Client, multiple servers, and neither had the desired (or rather, undesired) effect. I tested running one from jGRASP< one from the Batch file. I tested both from the batch file, no luck. I'm completely stumped. Yes, I am running the latest 1.4, not going up to 1.5 (or should I say 5, or perhaps Tiger?) until it's out of Beta. This has happened, by my account, 4 times in the past, and it's always been with classes I use a lot. Now it's seemin to me that its some weird case that my classes are just eating java.exe, but I can't imagine how. Here's my two thread (i.e. the classes, minus the initializers).
        public class Server implements Runnable
           public void run()
             while(connected)
                try
                   socket = serverSocket.accept();
                   socket.setSoTimeout(200);
                   new Player(socket, me);
                   numberOfPlayers++;
                   System.out.println("New player " + numberOfPlayers + "!!\n" + socket.getInetAddress());
                    catch(IOException e)
                      e.printStackTrace();
        public class Player implements Runnable
           public void run()
             while(socket.isConnected())
                try
                   String toPrint = input.readLine();
                   System.out.println(toPrint);
                    catch(IOException e)
    }No, so far I don't actually talk to the Player class, it just creates itself. The Client class is just a GUI that accepts input from a Menu, or textField (not implemented yet, save to copy the text to a Text Area). If you select connect, you connect to my server, and it asks for a name. That's all I have so far, and I can't see that either of the threads would cause a problem. ANy suggestions appreciated. Thanks

  • A simple Java program to be compiled with ojc and executed with java.exe

    Hi ,
    This thread is relevant to Oracle Java Compiler (file ojc) and jave.exe file.
    I have written a simple java program which consists of two simple simple classes and using the JDev's 10.1.3.2 ojc and java files , i'm trying to execute it after the successful compilation....
    The problem is that trying to run it... the error :
    Exception in thread "main" java.lang.NoClassDefFoundError: EmployeeTest
    appears.
    How can i solve this problem...????
    The program is as follows:
    import java.util.*;
    import corejava.*;
    public class EmployeeTest
    {  public static void main(String[] args)
       {  Employee[] staff = new Employee[3];
          staff[0] = new Employee("Harry Hacker", 35000,
             new Day(1989,10,1));
          staff[1] = new Employee("Carl Cracker", 75000,
             new Day(1987,12,15));
          staff[2] = new Employee("Tony Tester", 38000,
             new Day(1990,3,15));
          int i;
          for (i = 0; i < 3; i++) staff.raiseSalary(5);
    for (i = 0; i < 3; i++) staff[i].print();
    class Employee
    {  public Employee(String n, double s, Day d)
    {  name = n;
    salary = s;
    hireDay = d;
    public void print()
    {  System.out.println(name + "...." + salary + "...."
    + hireYear());
    public void raiseSalary(double byPercent)
    {  salary *= 1 + byPercent / 100;
    public int hireYear()
    {  return hireDay.getYear();
    private String name;
    private double salary;
    private Day hireDay;
    For compilation... i use :
    D:\ORACLE_UNZIPPED\JDeveloper_10.1.3.2\jdev\bin\ojc -classpath D:\E-Book\Java\Sun_Java_Book_I\Corejava EmployeeTest.java
    For execution , i issue the command:
    D:\ORACLE_UNZIPPED\JDeveloper_10.1.3.2\jdk\bin\java EmployeeTest
    NOTE:I tried to use the jdk of Oracle database v.2 but the error :
    Unable to initialize JVM appeared....
    Thanks , a lot
    Simon

    Hi,
    Thanks god....
    I found a solution without using Jdev.....
    C:\oracle_files\Java\Examples>SET CLASSPATH=.;D:\E-Book\Java\Sun_Java_Book_I\Corejava
    C:\oracle_files\Java\Examples>D:\ORACLE_UNZIPPED\JDeveloper_10.1.3.2\jdk\bin\javac EmployeeTest.java
    C:\oracle_files\Java\Examples>D:\ORACLE_UNZIPPED\JDeveloper_10.1.3.2\jdk\bin\java EmployeeTest
    What does Ant has to do with this?Sorry, under the Ant tree a classpath label is found....I'm very new to Java and JDev...
    You need to include the jar file that has the Day method in it inside project properties->libraries.I have not .jar file.. just some .java files under the corejava directory.... By the way , I have inserted the corejava directory to the project pressing the button Add Jar/Directory.... , but the problem insists..
    Thanks , a lot
    Simon

  • Error while trying to run program using java.exe

    First of all I'd like to apoligize if this thread already exists here somewhere.. I've spent the last hours Googling and searching the forums for an answer, but haven't found one, so I posted a topic..
    The problem is the following:
    I'm using Netbeans 5.5 with JDK1.6.0. When I build/run a Java application in this IDE, I get no errors whatsoever..
    But, when I try to run it from the prompt, using following code (I copied the .class file into the same directory as the .java file)
    java -classpath . main.javaI get the following errors:
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Sour
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Metho
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Sourc
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)I'm quite sure that the problem is something I'm simply missing, since Netbeans runs everything without troubles..
    Anyone an idea how I could solve this problem? (Trust me, I checked the net, lots of people with this prob, but no decent solutions given)
    Thanks in advance (and once again sorry if this thread already existed).
    Greetings,
    Tribio

    Oh, forgot the first error line indeed, thanks for pointing that out.
    D:\Tribio\JPF\src\jpf>java -cp . main
    Exception in thread "main" java.lan.NoClassDefFoundError: main (wrong name: jpf/Main)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Sour
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$000(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Metho
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Sourc
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)And concerning the package question. In the code of main.java I define the package jpf as follows:
    package jpf;Hateful problem, and I so wanna use the prompt java once in a while instead of having to rely on NetBeans..
    And you're not at all looking at it too simple, any input on the matter is appreciated.. :)

  • Java EXE - Passing Attributes

    Hi,
    I have a java application that performs many functions. I have compiled this application into an exe file. I would like to automate things.
    E.g. using Windows Scheduler to run the app at 2am - execute function1, 4am - execute funtion2. etc..
    Is it possible to pass an attribute to the exe when executing so that the function can be executed automatically.
    At the moment, I am creating 5 different exe files, each one is essentially the same application, but starts at different functions. I would therefore like to simplify this into one app.
    Thanks in advance
    Regards
    Angus

    I am not sure what tool you are using to generate your exe from your java byte code, but i would assume that it would pass variables given with the exe to the java program and as such you can just extract the variable from the args[] string array in your main method.
    i.e.
    "program.exe -func1"
    passes it to your public static void main (String args[])
    so just get the variable from the args array.
    As i have said, since i dont know how your java -> exe tool works this is just a suggestion.

  • How to schedule a java application via Windows Scheduler

    I can't figure out how to schedule a java application using the Windows Scheduler. Do I schedule the java application with the .class file as a parameter? How do I pass arguments to it?
    To execute FileCopy.class, my best guess was:
    Start | Control Panel | Performance and Maintenance | Scheduled
    Tasks | Add Scheduled Task | Browse | Program Files | Java |
    jre1.5.0_06 | ... Advanced Properties
    Under the Task tab:
    Run: "C:\Program Files\Java\jre1.5.0_06\bin\java.exe"
    Start In: "MyDocuments\Eclipse_Workspace\Java_File_Copy
    FileCopy"
    This does not work. How do I schedule the FileCopy.class java application, and how can I pass arguments to it? Can this be done without specifying a password?
    TIA,
    John

    Suppose that your class is FileCopy (has no package name) and is located under MyDocuments\Eclipse_Workspace\Java_File_Copy folder, then you should have:
    Run: "C:\Program Files\Java\jre1.5.0_06\bin\java.exe" FileCopy
    Start In: "MyDocuments\Eclipse_Workspace\Java_File_Copy"
    And yes you must provide a user password to execute the task.
    Best way to do this is to create a special user (with password) for executing this task.
    Regards

  • Please help me. Cant located the Path of java.exe ???

    I have Windows 7 64bit OS. I download all softwares in 64 bit version.I just download Oracle sql developer
    4.0 (4.0.0.13.80) and jdk 7 u45 with netbeans 7.4 and i also download jre 7, all software are successfully installed on my system. but when i open sql developer ,it prompt for path of java.exe but i cant find the path. in "C:\programs files\jdk7\bin\" but there is no .exe files.
    please help me or guide me , what to do???
    I installed all the softwares successfully. but i can't understand where the problems is ?

    The easiest thing to do is download this:
    "Windows 64-bit - zip file includes the JDK 7"
    When you run the EXE, it won't prompt for anything, it will just run.
    In fact, if you have the JDK properly installed on Windows, the exe won't prompt for the location of Java anymore, so it sounds like you may have an install problem with your Netbeans install?

  • How to get Class Name given along with java.exe

    Hi friends,
    I am Mukesh, currently facing one problem
    On command prompt to execute any java program we give :
    C : \.-- > java ClassName
    This ClassName I need in my application, I want to do some post processing on that.
    Actually see what I want :
    public class Base
    static Base object;
    public static void main(String[] args) throws Exception
    object=(Base)Class.forName("Derived Class Name").newInstance();
    void main()
    public class Derived extends Base
    void main()
    System.out.println("Hello World");
    I am trying to Run Derived Class, since there is no entry point found, default JVM invoke the Base class's entry point, there I want to load
    Derived Class, but I am not getting any identity of derived class in Base class.
    I found one temporary solution to this problem :
    C: \ -- >java Derived Derived
    & in Base class, I have loaded class
    object=Class.forName(args[0]).newInstance();
    But I dont want to write the same thing twise just to know the Class name which is given along with java.exe.
    Is there any way to get the ClassName supplied with java.exe
    I have tried a lot, still I am trying !!!
    If any one knows the answer, help me.
    Regards.
    Mukesh.

    Multiple post. Please continue in other thread
    http://forum.java.sun.com/thread.jspa?threadID=5196980&tstart=0

  • My Applet crashes java.exe to crash

    Ok, I'm not sure why, but on some computers my applet is making java.exe crash. When i attach a debugger to java.exe when it crashes I see a "Access Violation Error". The oddest part is that while one computer will crash and another identical computer with the exact same setup wont. The crash happens the moment the applet starts.
    Now I've done just about everything i could to figure this out. I've installed uninstalled and reinstalled java. I've run ram, hard drive, cpu, ect tests all reporting no problem. I've disabled anti-virus and did the uninstall and reinstall again. I've installed older versions of the java. I've resigned my jar file, created a new key and then resigned. Practically the only thing i have not done and is not a viable solution is reformat/replace the computers. So I'm left thinking it might be something in the applet that is causing it.
    It could be in the applet parameters but i doubt it.
    Pram fp is about 5,000 characters long
    Pram VerfyType is about 1 character long
    Pram Arg1 is a max of 11 characters long
    Pram Arg2 is a max of 11 characters long
    This applet is meant to interact with a program on the computer that connects to a variety of fingerprint scanners that we use and passes information form the internal site to the scanner and vice versa. So it just starts a loop back socket. For the loop back socket, i have tired 127.0.0.1 and localhost which still yield the same result.
    Here is the applet. It's very simple.
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.awt.Image;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.PrintWriter;
    import java.net.MalformedURLException;
    import java.net.Socket;
    import java.net.URL;
    import java.net.UnknownHostException;
    import java.security.AccessController;
    import java.security.PrivilegedAction;
    public class Verify extends JApplet {
         private static final long serialVersionUID = 908206045464466336L;
         public JLabel jLabel1;
        public jPanel jPanel1;
        public String Template = "";
        public String VerfyType = "";
        public String Arg1 = "";
        public String Arg2 = "";
        public Thread t;
        Socket socket = null;
        public void stop()
             jPanel1.threadRun = false;
             if (socket != null)
                  try {
                        socket.close();
                   } catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
         public void init()
            //Execute a job on the event-dispatching thread:
            try {
                javax.swing.SwingUtilities.invokeAndWait(new Runnable() {
                    public void run() {
                         Template = getParameter("fp").trim();
                         VerfyType = getParameter("VerfyType").trim();
                         Arg1 = getParameter("Arg1").trim();
                         Arg2 = getParameter("Arg2").trim();
                         initComponents();
            } catch (Exception e) {
                System.err.println("getParameter didn't successfully complete");
            StartVerify();
        private void initComponents() {
              jPanel1 = new jPanel();
              jLabel1 = new JLabel();
              jPanel1.setPreferredSize(new java.awt.Dimension(66, 66));
              jPanel1.setBackground(new java.awt.Color(255, 255, 255));
              jLabel1.setText("Initializing Please Wait.");
            setBackground(new java.awt.Color(255, 255, 255));
            javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
            jPanel1.setLayout(jPanel1Layout);
            jPanel1Layout.setHorizontalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 66, Short.MAX_VALUE)
            jPanel1Layout.setVerticalGroup(
                jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 66, Short.MAX_VALUE)
            jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                        .addGroup(layout.createSequentialGroup()
                            .addContainerGap()
                            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 536, Short.MAX_VALUE))
                        .addGroup(layout.createSequentialGroup()
                            .addGap(224, 224, 224)
                            .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap())
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addComponent(jLabel1)
                    .addContainerGap(116, Short.MAX_VALUE))
        public void StartVerify()
             t = new Thread() {
              public void run()
                  AccessController.doPrivileged(new PrivilegedAction() {
                  public Object run()
                            PrintWriter out = null;
                            BufferedReader in = null;
                            try {
                                socket = new Socket("localhost", 4001);
                                out = new PrintWriter(socket.getOutputStream(), true);
                                in = new BufferedReader(new InputStreamReader(socket.getInputStream()));
                            } catch (UnknownHostException e) {
                                 jLabel1.setText("Unkown Host Error.");
                                return null;
                            } catch (IOException e) {
                                 jLabel1.setText("Unable to get communication streams..");
                                return null;
                            String reponse = "";
                            try {
                                reponse = in.readLine();
                                if (reponse.equalsIgnoreCase("cmd"))
                                    out.write("v\n");
                                    out.flush();
                                    reponse = in.readLine();
                                    if (reponse.equalsIgnoreCase("send"))
                                        out.write(Template+"\n");
                                        out.flush();
                                        reponse = in.readLine();
                                        if (reponse.equalsIgnoreCase("finger"))
                                             jLabel1.setText("Please Have the client place their finger on the scanner.");
                                             while (true)
                                                  reponse = in.readLine();
                                                  if (!reponse.equalsIgnoreCase("pulse"))
                                                       break;
                                            if (reponse.equalsIgnoreCase("good"))
                                                try {
                                                     DoRedirect();
                                                    socket.close();
                                                } catch (IOException ex) {
                                            else if (reponse.equalsIgnoreCase("bad"))
                                                           int _return = LoopTellCanceled(socket, out, in);
                                            else
                                                 jLabel1.setText("Unexpected response from finger print server.");
                                        else
                                             jLabel1.setText("Unexpected response from finger print server.");
                                    else
                                         jLabel1.setText("Unexpected response from finger print server.");
                                else
                                     jLabel1.setText("Unexpected response from finger print server.");
                            catch (IOException ex)
                                 jLabel1.setText("We lost connection to the finger print reader.");
                                 System.err.println(ex);
                            try {
                                out.close();
                                in.close();
                                socket.close();
                            } catch (IOException e) {
                                System.err.println("Couldn't get I/O for the connection");
                                return null;
                            return null;
            t.start();
        private int LoopTellCanceled(Socket socket, PrintWriter out, BufferedReader in)
             int res = JOptionPane.showConfirmDialog(null, "Incorrect Finger Print. Would you like to try again?", "Finger Print was Bad", JOptionPane.YES_NO_OPTION);
             while (res == JOptionPane.YES_OPTION)
                String reponse = "";
                try {
                    out.write("v\n");
                    out.flush();
                    reponse = in.readLine();
                    if (reponse.equalsIgnoreCase("send"))
                        out.write(Template+"\n");
                        out.flush();
                        reponse = in.readLine();
                        if (reponse.equalsIgnoreCase("finger"))
                             jLabel1.setText("Please Have the client place their finger on the scanner.");
                             while (true)
                                  reponse = in.readLine();
                                  if (!reponse.equalsIgnoreCase("pulse"))
                                       break;
                            if (reponse.equalsIgnoreCase("good"))
                                try {
                                     DoRedirect();
                                    socket.close();
                                } catch (IOException ex) {
                            else
                                 res = JOptionPane.showConfirmDialog(null, "Incorrect Finger Print. Would you like to try again?", "Finger Print was Bad", JOptionPane.YES_NO_OPTION);
                } catch (IOException ex) {
                     System.err.println(ex);
             return res;
        public void DoRedirect()
              try
                   if (Arg1.equalsIgnoreCase(""))
                        getAppletContext().showDocument(new URL("javascript: fprintVerified("+VerfyType+");"));
                   else
                        if (Arg2.equalsIgnoreCase(""))
                             getAppletContext().showDocument(new URL("javascript: fprintVerified("+VerfyType+", "+Arg1+");"));
                        else
                             getAppletContext().showDocument(new URL("javascript: fprintVerified("+VerfyType+", "+Arg1+", "+Arg2+");"));
              catch (MalformedURLException ex)
                   ex.printStackTrace();
    }Edited by: Pyromanci on Mar 1, 2011 7:58 AM

    What does your error console report? - Which one? Browser, PC, ect
    How about your java console say? - I have no clue what it could be saying since java.exe crashes the moment the applet starts the console is no longer accessible.
    What browser and version? - Firefox v3.6.13
    Have you tried a different one? - Yes Ie 6,7, and 8. Though the site the applet runs form was designed specifically for firefox (internal site)
    Have you tried Appletviewer? - Yes applet runs as intended.
    Did you give the Applet permission? I know you said you signed it - did it all go right? - Yes. Gave me the usual response of will expire in x months

  • Why do I need a second java.exe when I alreayd have another in a JDK instal

    When I install JDK then there are two instances of java.exe
    (and other programs like javaws.exe). One instance in
    INSTALL_DIR\bin\
    and the other in
    INSTALL_DIR\jre\bin\
    So why do I need two exes instead of one?
    Peter

    Hello!
    So why do I need two exes instead of one?Don't know the reason myself, ask the developers..........
    One instance in INSTALL_DIR\bin\
    and the other in
    INSTALL_DIR\jre\bin\Yes, checked that, you are right.
    But , whats the problem, It hardly takes 2MB more space.
    Or, were you implying that ideally java.exe and javaws.exe should not be in "INSTALL_DIR\bin\" as they are involved in running the java programs.
    Thanks!

  • ARGENT:error in java.exe operating server (after updating remote dbase)

    Hello,
    I am getting big trouble in java.exe which is running server program.
    interface : swings
    windows: NT 4.0
    database: MS access97
    jdk 1.3 (jsdk2)
    Dr. watson of NT reporting the error in java.exe(of server) that application error has occured and this is happening every time after i update or write something into the database. Currently i am doing it on localhost m/c.Error: "the instruction at "0x77b3cd19"
    referenced memory at 0x77b3cd19".The memory could be read/"
    //server code
    import java.rmi.*;
    import java.rmi.server.*;
    public class LoginServer {
    public LoginServer() {
    try {
    Login c = new LoginImpl();
    Naming.rebind("login", c);
    } catch (Exception e) {
    System.out.println("Trouble: " + e);
    public static void main(String args[]) {
    new LoginServer();
    //Remote functions implementation
    import java.rmi.*;
    import java.rmi.server.*;
    import java.sql.*;
    public class LoginImpl extends UnicastRemoteObject implements Login
    public LoginImpl() throws RemoteException
    super();
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    } catch(Exception e) { System.err.print("Exception: ");
    System.err.println(e.getMessage());}
    //register new user take name and password as arguement and creates
    // new user and set status OFF (ie user not logged in)
    public int NewUser(String n,String p) throws RemoteException
    String url = "jdbc:odbc:Authentic";
    int i=2;
    Connection con;
    Statement stmt;
    ResultSet rs;
    try {
    con = DriverManager.getConnection(url, "anything", "anything");
    stmt=con.createStatement();
    rs = stmt.executeQuery("SELECT NAME FROM TAUTHENTIC");
    while (rs.next()) {
    String nam = rs.getString("NAME");
    if((n.equalsIgnoreCase(nam)))
    i=1;
    rs.close();
    stmt.close();
    con.close();
    break;
    f (i==2) {
    stmt.executeUpdate("INSERT INTO TAUTHENTIC "+"VALUES'"+n+"','"+p+"','OFF')");
    i=3;
    rs.close();
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    return i;
    //verifying usre and password and then checking status if off turns on else cant verify.
    public int VerifyUser(String s,String p) throws RemoteException
    { int i=0;
    String url="jdbc:odbc:Authentic";
    String status="OFF";
    Connection con;
    Statement stmt;
    ResultSet rs;
    try {
    con = DriverManager.getConnection(url, "anything", "anything");
    stmt=con.createStatement();
    rs = stmt.executeQuery("SELECT NAME, PASSWORD, STATUS FROM AUTHENTIC");
    while (rs.next()) {
    String nam = rs.getString("NAME");
    String pas = rs.getString("PASSWORD");
    String sta=rs.getString("STATUS");
    if((s.equalsIgnoreCase(nam))&&(p.compareTo(pas)==0))
    if(status.compareTo(sta)!=0)
    {i=5; break;}
    if((s.equalsIgnoreCase(nam))&&(p.compareTo(pas)==0)&&(status.compareTo(sta)==0))
    System.out.println("Hi " +nam + " you are in our stock program now");
    i=1;
    break;
    if(i==0)
    System.out.println("Sorry either user dont exist or invalid user name or password");
    rs.close();
    stmt.close();
    con.close();
    } catch(SQLException ex) {
    System.err.println("SQLException: " + ex.getMessage());
    return i;
    //changes status each time user logged in or logged off
    public void cstatus(String name,String status) throws RemoteException
    String url="jdbc:odbc:Authentic";
    Connection con;
    Statement stmt;
    try {
    con = DriverManager.getConnection(url, "anything", "anything");
    stmt=con.createStatement();
    stmt.executeUpdate("UPDATE TAUTHENTIC SET STATUS ='" + status + "' WHERE NAME LIKE '" + name + "'");
    stmt.close();
    con.close();
    catch(Exception ex){ System.out.println("Exception: "+ex.getMessage());}
    i have used swings to call these functions. Updation is happwning but also bringing runtime server application halt.
    //if u need i can mail u my GUI client file from where i am making my RMI connections. my email is [email protected]. Please reply back as soon as possible as i am working on a java project of software agents and have to complete it by this month.
    thanx and bye for now

    Format this mess.
    http://forum.java.sun.com/faq.jsp#format

Maybe you are looking for

  • Unable to change any file or document name in Finder

    Can someone help me with following problem. Using Finder I am not able to change any folder or document name. Thus creating a "new folder" I even can not change that name! Thank you, Dorothee

  • Photo uploading problems

    Hi, I am using an iPhone 4S with everything current, and it suddenly quit uploading photos to Facebook.  If I try to upload from the newsfeed, I get an error message. If I upload from my profile or directly to the album, it appears to upload normally

  • I had lost my iPad mini in Beijing, China

    Dear all, I had lost my precious iPad (in Black) in Beijing, China. Is there any possiblilty of finding my thing ? Part No. MD530KH/A Serial No. DLXJJ0VQF195 Please help me out~~~~ From Norman Kim [email protected]

  • Yosemite comments

    Yosemite downloaded in 2 tries.  Installed without a noticeable problem. Given the problems with Mavericks, the first thing I checked was my non-pages word processing programs.  No thesaurus support for word processing.  Another limitation created on

  • IWeb blog date problem inconsistency

    The date that appears on my iWeb blog entries is different from my computer to another person's computer. On my computer, the blog entry dates in my iWeb software appears the same as what I see when I browse the site on the internet using my Safari b