How do I save as .class ?

I've opened a .class file with DJ decompiler, edited it but cannot save it back to a .class
I get this message:
Because file extension is not RTF file C:\test.java will be saved in Text Format (Plain Text)!
I end up getting a JAD and JAVA file but not an edited .class.
How do i save the edited file as a .class? Anyone know? Please excuse my lack of knowledge, I'm new to java.
Message was edited by:
JD_123

I didn't create the .class, I'm just trying to edit
it. You don't t ypically edit a class file - the .class file is not a text file.
I've never messed with java before but I figured
editing a class file and saving it wouldn't be to
difficult for a beginner. No, the standard flow is to edit the source code, then compile it to produce the corresponding class file.
I don't know a thing
about Javac. How do I use it, specifically for what
said I need to do?http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html
Good Luck
Lee

Similar Messages

  • How can I see web classes done in adobe flash?

    I am trying to take an online course on my iPad 2 but Adobe Flash is required. Can anyone tell me how I can see my class on my iPad? The message says it's not available on my device so is there an app or some conversion I can do.
    Thanks for your time!
    Lala

    You can try one of the app/service combinations for playing Flash such as Skyfire , Puffin, or iSwifter. One of those might work for you, though they all have limitations and do not work with all Flash-based sites and services
    Regards.
    Forum Tip: Since you're new here, you've probably not discovered the Search feature available on every Communities page, but next time, it might save you time (and everyone else from having to answer the same question multiple times) if you search a couple of ways for a topic, both in the relevant forums and in the Apple Knowledge Base, before you post a question.

  • How do I save preferences for automatically filled in text box?

    G'day
    I've got a popup button that lists all the external disks on my computer, and when a user picks a particular file on one of them, the path is displayed in a text field.
    If I edit the field, it's saved automatically, but how do I save/update the preference bindings without editing please?
    Regards
    Santa

    it's OK, I figured it out. For posterity...
    First define the property...
    property NSUserDefaults : class "NSUserDefaults"
    then to read...
    tell standardUserDefaults() of NSUserDefaults
    set tempDiskPath to objectForKey_("DiskPath")
    set tempDayReportDisplay to objectForKey_("DayReportDisplay")
    set thetempYears1 to objectForKey_("theYearsStrings")
    set tempYear to objectForKey_("tempYear")
    set theDayYears1 to objectForKey_("theDayYearsStrings")
    set tempdayYear to objectForKey_("tempdayYear")
    end tell
    the to write...
    on applicationShouldTerminate_(sender)
    -- Insert code here to do any housekeeping before your application quits
    set tempDiskPath to DiskPath's stringValue() as text
    set tempDayReportDisplay to DayReportDisplay's stringValue() as text
    set thetempYears1 to (theYear's itemTitles()) as list
    set tempYear to theYear's titleOfSelectedItem() as text
    set theDayYears1 to (DayReportYear's itemTitles()) as list
    set tempdayYear to DayReportYear's titleOfSelectedItem() as text
    tell standardUserDefaults() of NSUserDefaults
    setObjectforKey(tempDiskPath, "DiskPath")
    setObjectforKey(tempDayReportDisplay, "DayReportDisplay")
    setObjectforKey(thetempYears1, "theYearsStrings")
    setObjectforKey(tempYear, "tempYear")
    setObjectforKey(theDayYears1, "theDayYearsStrings")
    setObjectforKey(tempdayYear, "tempdayYear")
    end tell
    return true -- current application's NSTerminateNow
    end applicationShouldTerminate_

  • How do I save a xls document in Java

    Hi!
    How do I save a xls Document from java?
    I mean, I want to specify which xls document to save and then save it.
    Any useful code would be of great help!

    This is the code!
    import java.io.*;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.util.Locale;
    import jxl.Workbook;
    import jxl.WorkbookSettings;
    import jxl.write.Label;
    import jxl.write.WritableCell;
    import jxl.write.WritableCellFormat;
    import jxl.write.WritableImage;
    import jxl.write.WritableSheet;
    import jxl.write.WritableWorkbook;
    import jxl.write.Number;
    import jxl.write.*;
    import java.io.IOException;
    import java.io.OutputStream;
      public class writeXls
            public String templateName;
            public String outputName;
          public writeXls (String t, String o)
             templateName = "c://"+t;
             outputName = "c://"+o;
          public void writeYearVolume(String []yearvolymeArray)
              WritableWorkbook workbook = null;
              try
                  // Setup workbook
                  WorkbookSettings ws = new WorkbookSettings();
                  ws.setLocale(Locale.UK);
                  ws.setEncoding("Windows-31J");
                  // Load workbook
                  Workbook template = Workbook.getWorkbook(new FileInputStream(templateName));
                  // Create new workbook
                  workbook = Workbook.createWorkbook(new FileOutputStream(outputName), template, ws);
                  // Create new sheet
                  WritableSheet sheet = workbook.getSheet(1);
                  // Create new label
                  Number amc1000= new Number(4, 1, Integer.parseInt(yearvolymeArray[0]));
                  Number amc800 = new Number(4, 2, Integer.parseInt(yearvolymeArray[1]));
                  sheet.addCell(amc1000);
                  sheet.addCell(amc800);
                  // Write wookbook
                  workbook.write();
                  workbook.close();
                catch (IOException e)
                  e.printStackTrace();
                catch (WriteException e)
                  e.printStackTrace();
                catch(Exception e)
                    e.printStackTrace();
      }The xls file is modified but not saved, how do I save the file?
    Some of the cells in the xls file contains formulas, because of that, the cells containing formulas dosen't update its value.
    if I however save the file manually then the cells are updated. I want to save the xls file automatically from Java.
    Any ideas on how to do that?

  • How do I save a chart as a jpeg?

    How do I save a chart as a jpeg. In excel I right click, "save as picture." Not seeing anything like that in Numbers.

    Here is a script dedicated to Numbers.
    You will find explanations in French and English at the beginning.
    CAUTION :
    it requires the installation of a Unix command file which gives us the ability to check if a modifier key is depressed.
    During my tests, only shift or fn keys were correctly detected.
    Maybe it was because I did my tests in the AppleScript Editor.
    I choose the fn key which, as far as I know, is not used to define the area to save.
    --{code}
    --[SCRIPT subset_of_numbers_doc_to_jpeg]
    Télécharger getModKey.zip depuis
    http://allancraig.net/index.php?option=com_docman&Itemid=100
    Décompacter puis déplacer le fichier getModKey dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:UnixBins:
    Il vous faudra peut-être créer le dossier UnixBins.
    Détails complémentaires dans :
    http://macscripter.net/viewtopic.php?id=33652
    Enregistrer le script en tant que Script : subset_of_numbers_doc_to_jpeg.scpt
    déplacer le fichier ainsi créé dans le dossier
    <VolumeDeDémarrage>:Users:<votreCompte>:Library:Scripts:Applications:Numbers:
    Il vous faudra peut-être créer le dossier Numbers et peut-être même le dossier Applications.
    Ouvrir un document Numbers et afficher la feuille dont une portion doit être enregistrée dans un fichier jpeg.
    Aller au menu Scripts , choisir Numbers puis choisir “subset_of_numbers_doc_to_jpeg”
    Le script affiche la feuille au format PDF dans Aperçu.
    Sélectionnez la zone à enregistrer puis pressez la touche fn.
    Le script copie la sélection dans le Presse-papiers, ferme le PDF complet,
    crée un nouveau PDF à partir du Presse-papiers
    puis ouvre le dialogue Enregistrer au format jpeg.
    Il restera à définir le nom et la destination du fichier.
    --=====
    L’aide du Finder explique:
    L’Utilitaire AppleScript permet d’activer le Menu des scripts :
    Ouvrez l’Utilitaire AppleScript situé dans le dossier Applications/AppleScript.
    Cochez la case “Afficher le menu des scripts dans la barre de menus”.
    Sous 10.6.x,
    aller dans le panneau “Général” du dialogue Préférences de l’Éditeur Applescript
    puis cocher la case “Afficher le menu des scripts dans la barre des menus”.
    --=====
    Download getModKey.zip from
    http://allancraig.net/index.php?option=com_docman&Itemid=100
    Expand it then move the getModKey file into the folder
    <startupVolume>:Users:<yourAccount>:UnixBins:
    Maybe you would have to create the folder UnixBins.
    Details available in :
    http://macscripter.net/viewtopic.php?id=33652
    Save the script as a Script: subset_of_numbers_doc_to_jpeg.scpt
    Move the newly created file into the folder:
    <startup Volume>:Users:<yourAccount>:Library:Scripts:Applications:Numbers:
    Maybe you would have to create the folder Numbers and even the folder Applications by yourself.
    Open a Numbers document and display the sheet whose a subset must be saved in a jpeg file.
    Go to the Scripts Menu, choose Numbers, then choose “subset_of_numbers_doc_to_jpeg”
    The script display the sheet in a Preview's PDF window.
    Select the area to save then press the fn key.
    The script copy the selected area in the clipboard, close the full PDF,
    create a new PDF from the clipboard's contents
    then open a dialog to Save as jpeg.
    Define the name and the storage location.
    --=====
    The Finder’s Help explains:
    To make the Script menu appear:
    Open the AppleScript utility located in Applications/AppleScript.
    Select the “Show Script Menu in menu bar” checkbox.
    Under 10.6.x,
    go to the General panel of AppleScript Editor’s Preferences dialog box
    and check the “Show Script menu in menu bar” option.
    --=====
    Yvan KOENIG (VALLAURIS, France)
    2011/11/15
    --=====
    on run
              local nomFenetre, nbw
    Check that the Unix command file getModKey is available in the folder <startupVolume>:Users:<yourAccount>:UnixBins: *)
              set flPth to ("" & (path to home folder) & "UnixBins:")
              tell application "System Events" to set maybe to exists disk item (flPth & "getModKey")
              if not maybe then
                        if not my parleAnglais() then
                                  error "Please, install “getModKey” in the folder" & return & "“" & flPth & "” !"
                        else
                                  error "Veuillez installer « getModKey » dans le dossier « " & flPth & " » !"
                        end if
              end if
              set flPth to quoted form of POSIX path of (flPth & "getModKey")
              tell application "Numbers" to activate
              tell application "System Events" to tell application process "Numbers"
    Get the name of the frontmost standard window
    so that we will not 'speak' to an inspector or to the Find dialog *)
                        set nomFenetre to name of first window whose subrole is "AXStandardWindow"
      keystroke "p" using {command down}
    Wait the availability of the Print sheet *)
                        tell window nomFenetre
                                  repeat until exists sheet 1
                                            delay 0.2
                                  end repeat
                                  tell sheet 1
      click first menu button
      click first menu item of menu 1 of first menu button
                                  end tell -- sheet
                        end tell -- window
              end tell -- System Events
              tell application "Preview" to activate
              tell application "System Events" to tell application process "Preview"
                        set nbw to count of every window
                        repeat while nbw = (count windows)
                                  delay 0.2
                        end repeat
    Trigger the menu item Tools > Selection Tool *)
      keystroke "3" using {command down}
              end tell -- System Events
    Now, select the area which must be saved in a jpeg file *)
    Thanks to the command getModKey, loop until the fn key is depressed *)
              repeat
                        delay 0.2
                        if (do shell script flPth) = "131072" then exit repeat
              end repeat
    The fn key was depressed so we may copy the defined area to the clipboard *)
              tell application "Preview" to activate
              tell application "System Events" to tell application process "Preview"
    Empty the clipboard. So we will be able to check that the copy task is achieved *)
      set the clipboard to ""
    Copy to clipboard *)
      keystroke "c" using {command down}
    Loop waiting for the achievement of the Copy task *)
                        repeat
                                  delay 0.2
                                  try
      the clipboard as «class PDF »
                                            exit repeat (* Exit when the task is achieved *)
                                  end try
                        end repeat
                        set nbw to count windows
    Close the PDF window *)
      keystroke "w" using {command down}
    Wait the achievement of the Close task *)
                        repeat while nbw = (count windows)
                                  delay 0.2
                        end repeat
                        set nbw to count windows
    Create New PDF from the clipboard *)
      keystroke "n" using {command down}
    Wait the availability of the new PDF window *)
                        repeat while nbw = (count windows)
                                  delay 0.2
                        end repeat
    Get the name of the new window *)
                        set nomFenetre to name of window 1 --(first window whose subrole is "AXStandardWindow")
      keystroke "s" using {command down}
    Wait the availability of the Save sheet *)
                        repeat until exists sheet 1 of window nomFenetre
                                  delay 0.2
                        end repeat
                        tell sheet 1 of window nomFenetre
      -- properties of every UI elements
                                  tell group 1
      click first pop up button
                                            delay 0.2
      -- properties of every menu item of menu 1 of first pop up button
      click menu item "JPEG" of menu 1 of first pop up button
                                            delay 0.2
                                  end tell -- group
      -- click button 1  (* Click in the Save button *)
                        end tell -- sheet
              end tell -- System Events
    end run
    --=====
    on parleAnglais()
              local z
              try
                        tell application "Numbers" to set z to localized string "Cancel"
              on error
                        set z to "Cancel"
              end try
              return (z is not "Annuler")
    end parleAnglais
    --=====
    --[/SCRIPT]
    --{code}
    Of course, thanks to FastScripts, we may link a shortcut to the script.
    Yvan KOENIG (VALLAURIS, France)  mardi 15 janvier 2011 19:04:38
    iMac 21”5, i7, 2.8 GHz, 4 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • How can i save the error message?

    In the execution of the integration process, and i get
    the mapping error as follow:
    RuntimeException in Message-Mapping transformation: Exception:[java.lang.IllegalArgumentException: Cannot cast to float. ] in class com.sap.aii.mappingtool.flib3.Stat method sum[com.sap.aii.mappingtool.flib3.Plainer@dddd08]
    <b>Now what i want is to save this message.</b>
    <b>How can i save this message?</b>
    Thank you for your advise and reading

    Hi,
       An exception name is just any string, like, "timeout"
    You usually have a control step, which waits for somethime (say a minute) and then transfers the control to exception handler, who handles the exception.
    <i>but i dont know from where i get the exception?</i>
    It not required for us to know from where the exception is raised as long as you have created an exception handler.
    The integration process, will search for the required exception handler and execute it. Make sure, that the exception handler is in one of the branches of the block.
    Hope this helps.
    Regards,
    Smitha.

  • HELP: How can I save page state on UIX page...

    I have a fallowing situation:
    1. I create UIX application with Wizard based on one ViewObject
    2. When I get a page with ViewObject in table style I travers up and down through records and make some updates and create new records
    3. But when I go back from update and create pages I always get initial browesing page.
    My question is: how can I save state of browsing page when I return to it from update and create or any other page (save position look hide/show mode or anything else)?
    I try to use StateManager class but I faild.
    Can anybody help me or describe how can I do it on one example?
    Thanks!

    Attila,
    Sounds as though you want to remember the interactive state of your pages across requests.
    That means you'll need to store the interactive state of your pages in something like the HttpSession that has a lifecycle spanning across multiple requests.
    If you make your pages interactive using the HttpSession, then, when you navigate back from another page, they should still be in the state you left them.
    The built-in data provider name for the HttpSession in uiXML is ctrl:httpSession. Use this to data bind the interactive attributes of your page, such as the disclosed attribute of HideShow.
    In your event handlers, update the HttpSession to make your page interactive.
    Be careful to use different keys to store information in the HttpSession for different pages.

  • How to make save and restore swing components?

    hi,
    i have a problem with serialization when i trying to save a class that extends JInternalFrame class.
    err i am getting is "java.bean.PropertyDescriptior : not serialized exception". how can i get rid of this problem.
    can anyone help me in this stage so that i can complete my project.
    thankx in advance.

    Make this class implement Serializable

  • How do I save the contents of what is drawn by paintComponent() to a jpeg?

    After Googling, here is what I've come up with:
    import java.awt.Graphics;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import javax.imageio.ImageIO;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class SavePaint extends JPanel
        public SavePaint()
            JFrame frame = new JFrame("TheFrame");
            frame.add(this);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(400,400);
            frame.setVisible(true);
        protected void paintComponent(Graphics g)
            g.drawRect(50,50,50,50);
            try
                BufferedImage image = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB);
                ImageIO.write(image,"jpeg", new File("/home/deniz/Desktop/jmemPractice.jpeg"));
            catch(Exception exception)
                //code
        public static void main(String[] args)
            new SavePaint();
    }The problem, however, is that the image saved is simply a (fully filled) black square that fits the window I'm viewing it in and not the (unfilled) smaller rectangle I drew.
    How do I save exactly what I am seeing on the frame window as a jpeg image?
    Any help would be greatly appreciated!
    Thanks in advance!

    Actually, I should of looked at your link before posting. (I didn't because I thought it would be exclusively for the 2nd way of doing it). While I did get it working successfully with this code:
    import java.awt.Graphics;
    import java.awt.Graphics2D;
    import java.awt.image.BufferedImage;
    import java.io.File;
    import javax.imageio.ImageIO;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    public class SavePaint extends JPanel
        public SavePaint()
            JFrame frame = new JFrame("TheFrame");
            frame.add(this);
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.setSize(400,400);
            frame.setVisible(true);
            try
                BufferedImage image = new BufferedImage(getWidth(), getHeight(), BufferedImage.TYPE_INT_RGB);
                Graphics2D graphics2D = image.createGraphics();
                frame.paint(graphics2D);
                ImageIO.write(image,"jpeg", new File("/home/deniz/Desktop/jmemPractice.jpeg"));
            catch(Exception exception)
                //code
        protected void paintComponent(Graphics g)
            g.drawRect(50,50,50,50);
        public static void main(String[] args)
            new SavePaint();
    }the image produced has black bars. When I replace frame.paint(graphics2D); with this.paint(graphics2D);, I get fewer black bars but I still get them.
    What am I doing wrong?

  • How do i save random numbers?

    below is the coding for random numbers
    public class Random {
    public static void main(String[] args) {
    java.util.Random rand = new java.util.Random();
    for (int i = 0; i < 20; i++) {
    System.out.println(rand.nextInt(10));
    }how do i save the random numbers?????

    That was a quick sample. I'm guessing you're not too familiar with java. I expect the error was because you havn't imported the java.io library.
    import java.io.*;
    public class tester {
      public static void main(String args[]) {
        try {
          PrintWriter out = new PrintWriter(new FileWriter("tmp.txt"));
          java.util.Random rand = new java.util.Random();
          for (int i = 0; i < 20; i++) {
            out.println(rand.nextInt(10));
          out.close();
        } catch (IOException ioe) {
          ioe.printStackTrace();
    }This will compile and run. Notice how you have declared your Random class using java.util.Random? You could have imported java.util.* or java.util.Random then used the declaration 'Random rand = .....' instead (like how i've declared the PrintWriter).
    Rob.

  • How do you save a transformed image?

    Windows Store App 8.1.
    I have an image that the user has rotated, scaled and clipped etc.  How do you save the transformed image?
    There are solutions of the forums but these use the System.Media.Imaging library that isn't available, classes like the TransformedBitmap etc. are not available. 
    I'm playing around with this approach but the decoder throws a "The image format is unknown"; 
    imageManipulation is UIElement.Image.
    Any ideas on how to achieve the saving of a Transformed image in a 4.5.1 8.1 store app?
    RenderTargetBitmap rtb = new RenderTargetBitmap();
    await rtb.RenderAsync(imageManipulation, (int)imageManipulation.ActualWidth, (int)imageManipulation.ActualHeight);
    IBuffer buffer = await rtb.GetPixelsAsync();
    using (InMemoryRandomAccessStream ras = new InMemoryRandomAccessStream())
    await ras.WriteAsync(buffer);
    await ras.FlushAsync();
    BitmapDecoder dec = await BitmapDecoder.CreateAsync(BitmapDecoder.BmpDecoderId, ras);
    Rob

    Hi,
    You can use BitmapEncoder to apply transforms such as scaling and cropping, set metadata and properties, and edit pixels while preserving any unedited
    data. After transform the data, you can copy the contents from the in-memory stream to the original file’s stream and close all of the streams. That make you can save the encoded image to the file:
    memStream.Seek(0);
    fileStream.Seek(0);
    fileStream.Size = 0;
    await RandomAccessStream.CopyAsync(memStream, fileStream);
    fileStream.Dispose();
    memStream.Dispose();
    You can see the link to get more information:
    https://msdn.microsoft.com/en-us/library/windows/apps/xaml/jj709937.aspx
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • I have three videos to edit.How do I save each one so I can burn them together to a DVD?

    I have three videos to edit. How do I save each one so I can burn them together to a DVD?

    Use Share/Computer/AVI to output each video as a DV-AVI.
    Then open a new project set up for DV and combine the three AVIs on that timeline. Voila!

  • How can I save to the same map every time when printing pdfs?

    How can I save to the same map every time when printing pdfs?
    Finder points to the document map even when I chose a different map recently.
    I often print series of pdfs from the print dialog box, I'd like to choose the map to save to and then have all subsequent pdf prints automatically directed to the same map until I decide otherwise.

    that link seems to be broken right now:
    403 Error - Forbidden  - No cred, dude.

  • How can I save multiple titles under the same DVD?

    I use HandBrake to rip DVD's into iTunes. How can I save multiple titles under the same DVD? For instance, I have a Jimi Hendrix documentary that comes with special features, such as concert performances. I would like to have the main feature and the special features saved in my iTunes under the same title, perhaps as different 'tracks' (kind of like how different songs can be saved under the same album).
    Is there a way for me to do this, or am I chasing phantoms?

    *This response is for iPhoto 11 (v9). If you're using an earlier version, please post back and let us know. Troubleshooting steps are not the same for different versions. To find out which iPhoto you have: iPhoto Menu -> About iPhoto)*
    Duplicate the photo first. (Photos -> Duplicate). This means that you will have multiple copies of the master as well as the edited version.
    If you use versions like this often and wish to have only one master then you can do this with Aperture.
    Regards
    TD

  • How can i save my individual playlist on itunes on my external hard drive because i want to buy a laptop and install itunes and move all my music and playlist thats on my desktop to my laptop and almost all my music is from a bunch of cd's i own

    how can i save my individual playlist on itunes on my external hard drive because i want to buy a laptop and install itunes and move all my music and playlist thats on my desktop to my laptop and almost all of my music is from a bunch of cds i own

    Hello ryane84
    The easiest and most efficient way to copy your music is to follow the steps under the External drive section. Make sure that you have organized the iTunes library first before you copy it over. Then put the copied iTunes folder in the same Music folder on your computer.
    iTunes: How to move your music to a new computer
    http://support.apple.com/kb/ht4527
    Regards,
    -Norm G.

Maybe you are looking for