Embedfonts Class File

Helo.
I created a custom Component using a ActionScript Class file. In this component, i create some text fields and i want change the alpha. If my fla file use FlashPlayer 10, the text field is not shown if i set the alpha to 0, but, if the i use the FlashPlayer 9 the text field is shown.
To fix that, i think i need to use the embedFonts properties in the TextField, but when i do that the text on the text field don't shown. Reading the help of the embedFonts says that i need specify a font, if i don't do that the text will be not display. But i specify the font in the TextFormat and the text continues not shown.
How can i specify a embed font in this Class file?
Thanks

The answer is totally yes. Nevertheless, here is a situation that can happen and it happens sometimes, that
is mistaken as a platform incompatibility. You develop on Windows with JDK1.6, let's say, and try to execute the file on a Solaris or whatever system that happens to only have JRE1.4. It won't work and the first reaction is,
somehow understandably, to doubt the portability of the class files. It won't work on a Windows with JRE1.4 either.
This is simply because the class files emitted by the newer compiler have a format that is not understood by the older VM.

Similar Messages

  • How to convert class file

    Hi all, I am new in java card development.
    This is my environment setting:
    @echo off
    set JC_HOME=C:\JavaCard\java_card_kit-2_2
    set JAVA_HOME=C:\j2sdk14103
    set PATH=.;%JC_HOME%\bin;%PATH%
    I have created the Wallet applet according to 'Zhiqun Chen" text book and named it WalletApp.java.
    I have compiled this file to a class file.
    This is where is I saved my file
    C:\JavaCard\java_card_kit-2_2\samples\src\com\sun\javacard\samples\WalletApp\WalletApp.java.
    But I don't really understand how to convert the class file.
    May I know what is this for?
    -out EXP JCA CAP
    -exportpath
    -applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1:0x1
    com.sun.javacard.samples.HelloWorld.HelloWorld
    com.sun.javacard.samples.HelloWorld
    0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x1 1.0
    must save this in what file?
    I tried to type in the command line below (and the result):
    C:\JavaCard\java_card_kit-2_2\samples>converter -config scr\com\sun\javacard\sap
    les\Wallet\Wallet.opt
    error: file scr\com\sun\javacard\saples\Wallet\Wallet.opt could not be found
    Usage: converter <options> package_name package_aid major_version.minor_ver
    sion
    OR
    converter -config <filename>
    use file for all options and parameters to converter
    Where options include:
    -classdir <the root directory of the class hierarchy>
    set the root directory where the Converter
    will look for classes
    -i support the 32-bit integer type
    -exportpath <list of directories>
    list the root directories where the Converter
    will look for export files
    -exportmap use the token mapping from the pre-defined export
    file of the package being converted. The converter
    will look for the export file in the exportpath
    -applet <AID class_name>
    set the applet AID and the class that defines the
    install method for the applet
    -d <the root directory for output>
    -out [CAP] [EXP] [JCA]
    tell the Converter to output the CAP file,
    and/or the JCA file, and/or the export file
    -V, -version print the Converter version string
    -v, -verbose enable verbose output
    -help print out this message
    -nowarn instruct the Converter to not report warning messages
    -mask indicate this package is for mask, so restrictions on
    native methods are relaxed
    -debug enable generation of debugging information
    -nobanner suppress all standard output messages
    -noverify turn off verification. Verification is default
    *********************************************************May I know What is the correct command line to convert the class file and what must I do to before converting the class file?
    I saw some article saying we must use JDK1.3, is it a must?
    Your solution is highly appreciated.
    Thank you!

    Hi Ricardo,
    I saved the file below as WalletApp.opt in the directory of scr\com\sun\javacard\samples\WalletApp
    -out EXP JCA CAP
    -exportpath c:\javacard\java_card_kit-2_2\api_export_files
    -applet 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x2:0x1 WalletApp.WalletApp
    WalletApp 0xa0:0x0:0x0:0x0:0x62:0x3:0x1:0xc:0x2 1.0
    But I still have the problem below:
    C:\JavaCard\java_card_kit-2_2\samples>converter -config scr\com\sun\javacard\sam
    ples\WalletApp\WalletApp.opt
    error: file scr\com\sun\javacard\samples\WalletApp\WalletApp.opt could not be fo
    und
    Usage: converter <options> package_name package_aid major_version.minor_ver
    sion
    OR
    converter -config <filename>
    May I know What's wrong with my command or file?
    Where can I download JDK because what I can find is J2SDK.
    Thank you!

  • Error while converting class file to exp and jca file

    error while converting *.class file to *.exp and *.jca file
    =====================================================================================================================
    linux-y60u:/home/admin/java_card_kit-2_2_1/samples/src # converter -exportpath "/home/admin/java_card_kit-2_2_1/lib/" com/sun/javacard/samples/HelloWorld 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b 1.0 -v -applet 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x01 Identity
    Java Card 2.2.1 Class File Converter, Version 1.3
    Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    parsing /home/admin/java_card_kit-2_2_1/samples/src/com/sun/javacard/samples/HelloWorld/HelloWorld.class
    parsing /home/admin/java_card_kit-2_2_1/samples/src/com/sun/javacard/samples/HelloWorld/Identity.class
    error: com.sun.javacard.samples.HelloWorld.HelloWorld: unsupported class file format of version 50.0.
    error: com.sun.javacard.samples.HelloWorld.Identity: unsupported class file format of version 50.0.
    conversion completed with 2 errors and 0 warnings.
    =====================================================================================================================

    i compile a file javacard use this command:
    ===
    javac -source 1.3 -target 1.1 -g -classpath ./classes:../lib/api.jar:../lib/installer.jar src/com/sun/javacard/samples/Identity/Identity.java
    ===
    and try to convert this class use this command
    ===
    /home/xnuxerx/admin/java_card_kit-2_2_1/bin/converter -exportpath "/home/xnuxerx/admin/java_card_kit-2_2_1/lib/" com/sun/javacard/samples/Identity 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b 1.0 -v -applet 0x00:0x01:0x02:0x03:0x04:0x05:0x06:0x07:0x0b:0x01 Identity
    ===
    result convert:
    ===
    Java Card 2.2.1 Class File Converter, Version 1.3
    Copyright 2003 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
    parsing /home/xnuxerx/admin/java_card_kit-2_2_1/samples/classes/com/sun/javacard/samples/Identity/Identity.class
    converting com.sun.javacard.samples.Identity.Identity
    error: export file framework.exp of package javacard.framework not found.
    conversion completed with 1 errors and 0 warnings.
    ===
    why ??
    please your comment for this problem.
    thank 4 all.

  • NetBeans IDE 4.1 & a class file

    Hello, I use NetBeans IDE 4.1 to write my java programs. I've been assigned to write a program that will prompt the user for an input. To make this easier, my University has written a file called "In.java" so we can easily get any type of input from the user. For example if we want the user to enter his/her name, we would write:
    System.out.println ("Please enter your name: ");
    String name = In.getString(); //allows user to enter a string
    The "In.java" file is supposed to be kept and compiled in the directory I'm working in. I kept it in C:\j2sdk1.4.2_09 and it works fine when I write a program in notepad but not NetBeans IDE. It does not recognize the "In.class" file. Any way to get around this? Thanks in advance.

    NetBeans 4.1 is bundled with J2sdk1.5.0_04. Check your NetBeans classpath and see if it is pointing to the newer sdk.
    If so, it needs to be changed to point to your older SDK...
    ... or, get your In.class file into the current NetBeans classpath...
    ... or read up on, and use the new Scanner class in the new sdk.

  • JavaCompiler outputs .class files in wrong folder

    I'm trying to compile some code using the Compiler API. The code belongs to package "compile", however, upon compiling the code, the class file ends up in the root directory rather than in the "compile" folder as I was expecting. The compiler seems to be ignoring the package info. What am I doing wrong here?
    package compile;
    import java.io.IOException;
    import java.net.URI;
    import java.util.Arrays;
    import javax.tools.*;
    import javax.tools.JavaCompiler.CompilationTask;
    public class CompilerTest {
         private static final String code =
              "package compile;\n" +
              "class TestClass {\n" +
              "     public static void main(String[] args) {\n" +
              "          System.out.println(\"Hello World!\");\n" +
              "     }\n" +
              "}\n";
         public static void main(String[] args) {
              JavaStringObject source = new JavaStringObject("compile.TestClass", code);
              Iterable<? extends JavaFileObject> sources = Arrays.asList( source );
              JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
              CompilationTask task = compiler.getTask(null, null, null, null, null, sources);
              System.out.println( task.call() );
         /** Java source from a String */
         private static class JavaStringObject extends SimpleJavaFileObject {
              private final String code;
              public JavaStringObject(String className, String content) {
                   super( URI.create("string:///"+className.replace('.','/')+Kind.SOURCE.extension), Kind.SOURCE );
                   code = content;
              public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
                   return code;
    }Thanks

    How do we know it is wrong?
    You are not showing where you compile and run this from.
    Also you are making it more confusing than it needs to be because your test class and the data for the compilation have the same package - I'd put CompilerTest and TestClass into different packages just to remove the potential for confusion.
    You are not specifying a -d option to the compiler.
    You are not specifying what the working directory is and the classpath when you run your test.
    You are not telling us where the generated class file is placed.
    When you say root directory do you mean the file system root, or the working directory or what?
    With some more information we might be able to either reproduce your fault or alternatively explain to you why what you are observing is the expected behaviour.
    Bruce

  • Importing my class files from another folder

    hello everybody ,im creating a software package for a new company and want to organise my class files into different folders so that it would be easier for someone to navigate through them and update if necessary ,how do i import an instance of a class in a file that is in a subfolder of the folder that contains the class that is calling it.(sorry for being a bit long winded) iv tried diff things and they didn't work.
    At the moment i have all the files in the one folder,but as i said above want to put them into appropriate folders.
    I would be very gratefull if someone could give me some examples and if not some appropriate links,thanks iv tried looking for this on the net but could not find anything.

    What you should probably do is to organise your classes into a heirarchy of packages not merely folders. Java expects the package structure to be reflected in the directory structure holding both the source and class files. If it's looking for a class called, say, com.mycompany.widgets.MainWidget it expects to find it in a directory com//mycompany/widgets relative the the directory on the class path.
    Use the package directive in each source file to indicate the package path.

  • Adding .class files to your project and making them work.

    Ok, im fairly new to java and having trouble understanding how to make importing of .class files work. Im using eclipse 3.2
    I have the files in a directory and I have gone to project->properties->java build path->libraries->add external class folder and pointed it to the correct place.
    Now, I am trying to use some of the classes it provides. I get no errors when creating the object with this code:
    com.ECS.client.jax.ItemSearchRequest itemRequest = new com.ECS.client.jax.ItemSearchRequest();
    Before I did the add external class folder that code would error cause it didnt know what com.ECS was. Now it works fine. My problem is that when I try to use a class, it does not recognize it as a class. After doing the above code I have:
    itemRequest.setSearchIndex("Books");
    its giving me an error on the period, saying: "Syntax error on token(s), misplaced construct(s)". Its not seeing that it is a class, so I can't use it. But when I am creating the object I get no errors. For reference, here is the chunk of code:
    com.ECS.client.jax.ItemSearchRequest itemRequest = new com.ECS.client.jax.ItemSearchRequest();
    itemRequest.setSearchIndex("Books");
    the second line of which errors. So my question is, how do I get it to recognize that the itemRequest is a class when I have imported the .class files to my project already?

    It's working fine. It's just that you have to put your code in a method.

  • Problem with variable in class file.

    Im working on a project from school where I read in a text file with numbers and print the max and the min. In my main file, I read in the text file and set the different numbers to variables a, b, and c. My question is, when Im writing my class file MaxMin, is there anyway to access those variables to compare them? Or will I have to do it some other way. Thanks for your help.

    Ok. Sorry
    Here is the main code
    import java.io.*;
    import java.util.StringTokenizer;
    public class LabAssign1
    public static void main(String[] args) throws IOException
    final int TOKENS_PER_LINE = 3;
    String fileName = "labassign1.txt";
    File theFile = new File(fileName);
    FileInputStream theStream = new FileInputStream(theFile);
    InputStreamReader theReader = new InputStreamReader(theStream);
    BufferedReader input = new BufferedReader(theReader);
    int numLines = 0;
    String line = input.readLine();
    while (line != null)
    StringTokenizer st = new StringTokenizer(line);
    if (line.length() == 3)
    int a = Integer.parseInt(st.nextToken());
    int b = Integer.parseInt(st.nextToken());
    int c = Integer.parseInt(st.nextToken());
    else
    line = input.readLine();
    input.close();
    Is there any way to call variables a,b,and c in a separate class file?

  • How to edit a ".class" file?  Anyone?

    I hope someone can help me with this...
    Someone gave me a class file to put into my applet. However, I'm wanting to go into the class file and change a few things around. However, I've done just about everything to try to find a way to go into the code of this file to do some changing, and I can't find anything to do it with! I've tried Netbeans and Visual Studio .NET, but it doesn't work. Maybe I'm doing something wrong. Does anyone know how to go into the class file and change it?
    thanks soo much..

    Someone gave me a class file to put into my applet.
    ... Does anyone know how to go
    into the class file and change it? And why can't you ask "someone" for the source? Or ask them to modify it for you?

  • Unable to run a .class file w/ javaw

    I created a simple application which uses swing gui.
    This application works just fine when I click the "run" button in eclipse.
    But as soon as i copy the .class file from the eclipse project folder to somewhere else and try to run it with "javaw myclass" (the filename is myclass.class) nothing happens.
    No command not found error, no nothing.
    Its like javaw finds and executes the .class and then returns to the command prompt... But I dont see any windows or any sign of my program running.
    Thx in advance

    When run with just java I get this:
    C:\>java myclass
    Exception in thread "main" java.lang.NoClassDefFoundError: myclass$1
    at myclass.<init>(myclass.java:38)
    at myclass.<init>(myclass.java:28)
    But I Eclipse it works just fine...
    What does Eclipse do that I dont?

  • Any way to reduce class file size?

    Somewhere during my travels on the net I remember seeing something about a utility that reduces the size of java class files, eg by optimizing. I think it is an IBM product. Anybody know about this?
    I am writing a midlet that needs to be less than 70K in size (JAR file), but currently its at about 100K -- any suggestions on how to reduce the size of the class files?
    Thx,
    Fred

    Yes, I think you are refering to JAX by IBM.
    I have just started using it a couple of days ago. It reduced my 130k application to 70k good tool.
    Here is the link :
    http://www.alphaworks.ibm.com/tech/JAX
    Look for verion 6.1 that on if free. The new version is very expensive $1000 :(.
    6.1 works well.

  • Urgent,java Error when compiling class file for jsp

    Hi!
    Reference to statement is ambbiguous,both class java.sql.statement in java.sql and class.java.beans.statement in java beans match.
    this is my file . When i comment the java.import.bean headre it does compile but my server is not able to recognize the class file.,Cud someone help me.
    THis is my source file
    package dbmg;
    //import java.beans.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class DbBean
    Connection con;
    ResultSet rs;
    String sql;
    boolean queryType;
    int edited;
    public DbBean() throws Exception
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con = DriverManager.getConnection("jdbc:odbc:Forums");
    public void setQueryType(String s)
    queryType=s.equalsIgnoreCase("select");
    public void setSql(String s)
    sql = s;
    synchronized public void processRequest(HttpServletRequest req) throws
    Exception
    if (queryType)
    Statement stmt=con.createStatement();
    rs=stmt.executeQuery(sql);
    else
    PreparedStatement ps=null;
    ps=con.prepareStatement(sql);
    int count=0;
    String sqlParam,paramValue;
    boolean set=true;
    while (set)
    count++;
    sqlParam="param"+String.valueOf(count);
         if (sqlParam==null)
              set=false;
              continue;
    paramValue=req.getParameter(sqlParam);
         if (paramValue==null)
    set=false;
    continue;
              else
                   paramValue=paramValue.trim();
    try
                   ps.setString(count,paramValue);
              catch(Exception ex)
                   set=false;
                   continue;
    try
    edited=ps.executeUpdate();
    catch(SQLException e)
    edited=0;
    public Connection getConnection()
    return con;
    public ResultSet getResultSet()
    return rs;
    public int stored()
    return edited;
    public void closeCon() throws Exception
    con.close();
    rs = null;

    No need of commenting your import statement. Whenever there is ambiguity, you can use full class name (with package).
    Like,
    java.sql.Statement stmt=con.createStatement();
    Now there is no ambiguity.
    Sudha

  • How to create and exe from a class file.

    I want to create an application and want to distribute it. I am using simplw awt gui interface. I have compiled the program and have got the required class file. If I want an executable how can I go for it.
    There are many files provided by java library which are exe but are created using java API eg. policytool.exe. Please Help.
    Ashwini Bagga,
    Jaipur(Rajasthan)
    INDIA.

    Java uses the JVM to parse the class files. It cannot be converted to a .exe file
    but if you want to distribute it, i suggest you use InstallAnywhere which makes it into an exe installer.
    In the end it still uses the virtual machine...
    If i am wrong anywhere pls correct me thanks...

  • Line number in a *.class file, please help, advanced language guys

    dear all,
    i use c++ to open a *.class file and try to read line number of code in the file, i have 2 questions:
    1. i read line number in a method successfully, but i can not understand the meaning of start_pc, following are one of those data, please explain:
    s = start_pc,n = line_number
    s , n
    0 , 123
    8 , 125
    23 , 126
    29 , 127
    34 , 129
    38 , 130
    2. i can not find where the class's line number are, i.e. class start line and class end line, or field's line number.
    does these info exist inside a *.class file?
    thx for any light

    jdb gets line number of fields from class file, not
    source file definitely.I'm not really sure how you tested this, but here's my test, and JDB definitely gets its listing from the source file.
    First, I created and compiled class Tester:
    public class Tester
        public static void main( String[] argv )
        throws Exception
            Tester x = new Tester();
            System.out.println(x.toString());
        int     x;
        int     y;
        private Tester()
            x = 0;
            y = 1;
    }Then, I ran this in JDB. Note lines 16 and 17 in the output from "list":
    H:\Workspace>jdb Tester
    Initializing jdb ...
    stop in Tester.mainDeferring breakpoint Tester.main.
    It will be set after the class is loaded.
    runrun Tester
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Tester.main
    Breakpoint hit: "thread=main", Tester.main(), line=12 bci=0
    12            Tester x = new Tester();
    main[1] list
    8    {
    9        public static void main( String[] argv )
    10        throws Exception
    11        {
    12 =>         Tester x = new Tester();
    13            System.out.println(x.toString());
    14        }
    15
    16        int     x;
    17        int     y;
    main[1] quit
    Tester@b82368Then I edited the source file. Again, look at lines 16 and 17:
    H:\Workspace>jdb Tester
    Initializing jdb ...
    stop in Tester.mainDeferring breakpoint Tester.main.
    It will be set after the class is loaded.
    runrun Tester
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Tester.main
    Breakpoint hit: "thread=main", Tester.main(), line=12 bci=0
    12            Tester x = new Tester();
    main[1] list
    8    {
    9        public static void main( String[] argv )
    10        throws Exception
    11        {
    12 =>         Tester x = new Tester();
    13            System.out.println(x.toString());
    14        }
    15
    16        int     a;
    17        int     b;
    main[1]

  • How to call a class file in a jsp without deploying anything in j2ee

    Hi,
    I am new in J2EE. I have some jsps, which I configured using web.properties(documentroot=c:/jsp/). I am able to get
    those pages by the web browser. I have some import statements in some jsps, now I
    am trying to access those page but it is failing, it says
    org.apache.jasper.JasperException: Unable to compile class for
    JSPD:\j2sdkee1.3\repository\pradip\web\_0002fLogin_0002ejspLogin_jsp_0.java:1:
    Class com.gui.UPMGuiGlobalConstants not found in import.
    import com.gui.UPMGuiGlobalConstants;
    Actually I have not deployed any class file or jsps.. Now my question is can I access
    these jsps without deploying anything, like can I put my .jar file in any j2ee
    directory(like lib or anywhere else, I already tried after putting in /lib) and restart the
    j2ee and use it. So how can I call a class file from a jsp without any kind of
    deployment?
    Please send me the reply as soon as possible.
    Regds,
    Pradip

    After you put the jar containing the class to import into the WEB-INF/lib directory, you still need to include it in the jsp.
    Putting the jar into the lib dir, will make it available to the vm, but as in any other java class, you still need to import it into the class, that the jsp will be compiled into.
    And you do that by putting
    <%@page import="com.gui.UPMGuiGlobalConstants" %>somewhere near the top of your jsp. (well you don't need to put it there, but it good style ;)
    That should do it.

Maybe you are looking for

  • Can you apply keywords and metadata for only some subfolders at import?

    I thought I should make a separate thread for my second LR file import question. It seems that LR authors assumed that most users would download single events or projects but that isn't the case with me.  I'm just an amateur with a Canon 30D and a 4

  • Trapcode Form and Particular Z axis issue

    I have a problem using trapcode Particular and Form in the same composition ... The emitter of Particular is a light and goes from the front to the back of the composition through Z axis. The particles of the form are in the middle of this travel. Wh

  • BADI's in SD

    Hello All. Does anybody know if there are any BADI;s to work with for SD saving of contracts? Thanks!

  • Flash Video not showing on Server

    Hi, wonder if anyone can help on this one. Going round in circles. Not sure why, should be simple enough. I have created a Flash Video in Flash 8 and published and picked up in Dreamweaver 8. Published files were sample.swf, sample.html and SteelExte

  • Original photos disappear when exporting retouched photos from iPhoto

    BACKGROUND: I have a folder of, say, 15 photos. I open them in iPhoto and retouch them. I export the photos and IMMEDIATELY am confronted with the message that they can't be exported because the originals cannot be found. I go to the original folder