Results 1 to 2 of 2
  1. #1
    altainta is offline Member
    Join Date
    Feb 2011
    Posts
    1
    Rep Power
    0

    Default Newbie Need help Making Java to class and signing

    Hello,
    Reason : The programmer is not responding (or it is not in the contact now) and i outsourced this project. So i have to do it my self.
    Knowledge level - PHP, Some jquery Javascript Nothing else. Java is very new to me and not intended to learn.
    I would like some help for signing applet
    Java Code:
    .java -> .class -> .jar -> Signing -> Signed.jar -> Adding to Website


    Okay i think that will define purpose
    So here is the procedure i did on pc

    Removed all
    Java
    JDK
    jRE ETC

    RESTARTED
    Now installed Just JDK (it contains JRE by default) (the latest version)
    that is it...
    So i have .java file which is made by programmer. For compiling it
    .Java - .CLass

    i did this

    Java Code:
    javac MyNewApplet.java
    MyNewApplet.java:18: cannot find symbol
    symbol  : variable j
    location: class MyNewApplet
          j = paramString.charAt(i);
          ^
    MyNewApplet.java:19: cannot find symbol
    symbol  : variable j
    location: class MyNewApplet
          switch (j)
                  ^

    Here is SOME source code of the file
    Java Code:
    import java.applet.AppletContext;
    import java.io.ByteArrayOutputStream;
    import java.io.InputStream;
    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.net.URLDecoder;
    import java.util.HashMap;
    import java.util.LinkedList;
    import javax.swing.JApplet;
    
    public class MyNewApplet extends JApplet
    {
      private String mv_decrypt(String paramString, int paramInt1, int paramInt2)
      {
        LinkedList localLinkedList1 = new LinkedList();
        for (int i = 0; i < paramString.length(); i++)
        {
          j = paramString.charAt(i);
          switch (j)
          {
    Compiler error
    Java Code:
    Note: MyNewApplet.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    30 errors
    Can you kindly explain what is wrong ?
    Atlest 19 Errors are of the sysmbol
    will tell about other as the first error is solved
    Last edited by altainta; 02-20-2011 at 08:34 AM.

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    6

    Default

    in this case, "j' is a variable of a character type, it is apparently not defined.
    Most likely this code is incomplete or a work in progress and has not been finished.

    For compiling, jar packaging, and signing, I have found it helpful to use "Ant", after installing Ant, and a bit of time reading the manual, there are a few tasks for compile, jar, and signjar. It really helps to automate the manual operations, so it makes it easy to consistently package the signed jar file. But it is still handy to know the basics for how this is done by hand first.

    In both cases (manual or sing ant tasks), for signing a jar file, we need a certificate, created or imported into a key file using keytool.

Similar Threads

  1. Making Data available to every class in a project.
    By JOHNINALBANY in forum New To Java
    Replies: 5
    Last Post: 12-15-2010, 10:09 AM
  2. Replies: 1
    Last Post: 05-20-2009, 12:03 AM
  3. Newbie - Robot Class
    By drasgear in forum New To Java
    Replies: 2
    Last Post: 11-14-2008, 05:46 PM
  4. Signing Java Applet
    By Agri in forum New To Java
    Replies: 8
    Last Post: 09-29-2008, 07:26 PM
  5. Replies: 13
    Last Post: 08-23-2008, 10:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •