Java class names which contain unicode characters

I need to create, compile and load java classes which have class names that contain unicode characters.
I am using Win2k but will neet to support unix* in future.
When I try to create a fooXbar.jar where X is a unicode character which is not ascii I get an error when creating the file.
My question is: how do I map java class names and package names which contain non ascii characters into
names that the files systems will like AND that the java VM will use when trying to load .class file from the class path.
for example what would the .java and .class file be for the following class?
class \u6587\u66f8 {

You could make names for .java and .class that is understandable by the filesystem. E.g. you could prepend with % and then digits for the unicode character. The problem is then how to compile the class, and how to load the class.
You can load the class with a custom classloader, which will translate the unicode class name to the escaped file name (using %).
The problem is then reduced to how you can compile your code (you have to map the file name to the class name somehow). I think it can be done, but I don't know the solution to that.
Alternatively you can use meaningful names for the classes, and then make an obfuscator that can change the bytecodes so the classnames are changed to some obscure unicode names. Perhaps there is already obfuscators out there you can use that will use unicode characters.

Similar Messages

  • Jquery - Accessing class name which contain white space

    Hi,
    My html table code is
    <- table class="t20Region t20ReportRegion" ....;>
    now I have to use the above class name "t20Region t20ReportRegion" in the below jquery . how to do this
    $header = $('table.class_name tr:first');
    how to substitute / enter class_name which has white space in them ( "t20Region t20ReportRegion" )
    Thanks in advance
    Shijesh

    I will be patient from next time.
    Thanks Dan,
    The changes made by you is working for standard template.
    However, when i created a custom report template in which I have two row for Colum Header ( Main
    Header and Sub Header), its not working.
    Credentials are the same.. and same page nos.
    How to change the code so that it will work for custome report template as well
    if a user click on total under Col1 or Col2 , i was trying to pass Header1 + ' ' + col1 or Header1 + ' ' + col2 ( concatenation of header1 and col1/2 with space in between)
    if a user click on total under Col3 or Col4 , i was trying to pass Header2 + ' ' + col3 or Header2 + ' ' + col4 ( concatenation of header2 and col3/4 with space in between)

  • How to execute .sql file if it contains unicode characters?

    DB version : 10.2.0.1
    OS : Windwos XP
    Today I got an .sql file which needs to be executed from sql*plus prompt.
    When I am trying I got error as below
    SP2-0042: unknown command " ■I" - rest of line ignored.
    When I checked the .sql file, I found there are Urdu characters (I believe we treat them as unicode) because of which I am facing error.
    Can anyone help me in finding the way to execute this .sql file which contains unicode characters?
    Thanks in advance

    That sql file contains so many insert statements. Here is one such statement
    INSERT INTO MAIN_LAND_TABLE_DEMO(OBJECTID, BLK_ARA_SER_SECTOR_ID, BLK_ARA_AREA_CODE, BLK_BLOCK_ID, PLOT_ID, DOCUMENT_NO, AREA_NAME, OWNER_NAME, PLOT_AREA_SQ_F, PLOT_AREA_SQ_M, PLAN_NUMBER, PLAN_DATE, OLD_BLOCK_ID, OLD_PLOT_ID, LAND_USE, PLOT_DESC, LAND_TYPE, REMARKS, IMAGE_FILE_NAME, PLOT_SIZE_S, PLOT_SIZE_N, PLOT_SIZE_E, PLOT_SIZE_W, BUILDING_HEIGHT, GROUND_LEVEL, NO_OF_FLOORS, REFERENCE_NO, OLD_DRAWING_NO, PERMIT_NO, CUR_CUSTOMER_COD, QC) VALUES(RAK_ISP_SEQ.nextval,1,0,7,71,'','الرمس - ضايه','وقف على مساجد راس الخيمه',10936,1016,'33/2000',TO_DATE('8/5/2000','mm/dd/yyyy'),'','161','سكني','خالية','ملك','','','','','','',0,0,0,'','2000/32','',0,1);

  • Java class name

    The java class name is Dummy.class, it contains:
                ObjectStreamClass myObj = ObjectStreamClass.lookup(Class.forName("Dummy"));
                serialVersionUID = myObj.getSerialVersionUID();
                System.out.println("serialVersionUID: " + serialVersionUID);Now how to replace the "Dummy" string with a method returning the class name?
    OK!

    String classname = this.getClass().getName();
    Good luck!

  • How to read a line from a file which contains 45000 characters?

    Hi all,
         Iam a receiving a .CSV file which contains n number of rows ,each row has a data seperated with delimiter.
    These values based on delimiter it is seperated and certain validations are handled.
    Iam using UTL_FILE.GET_LINE operator to read the value and store it in a variable which is declared as l_text VARCHAR2(30000).
    when we receive a line which contains huge characters say 45000 then it throws an error(Unable to read the file).
    Only on rare cases we used to receive these kind of files with huge size.
    Kindly help to solve this issues.
    Database details.
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE 11.2.0.2.0 Production
    TNS for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    Hereby i have tried with long Raw data type but still same error unable to read the file.pls find the sample code below,
    declare
    l_text             LONG RAW;
    l_importTypeFile   UTL_FILE.FILE_TYPE ;
    begin
         PKG_COMMON.PROC_FOPEN(g_Directory, P_FILENAME,    'RB',l_importTypeFile,    p_error_cd, p_error_msg) ;
    UTL_FILE.GET_RAW(l_ImportTypeFile,l_Text);
    End;
    Thanks in Advance
    Siva

    Hi Siva,
    Are you trying to use data from this .csv file into your realtion tables. If yes and If you are using 11g Oracle database. I would suggest you create External Tables using the below query,
    http://www.oracle.com/technetwork/issue-archive/2011/11-mar/o21nanda-312277.html
    STEP1: You need a Directory where your SCHEMA has read/write access. Store the csv file in that directory.
    STEP2: Create an EXTERNAL Table script. Please refer the above URL. Examples are for coma delimiter (,); replace it with your pipe (|) in the code
    STEP: Once your external table is created you can simply create a relational table as below:
    CREATE  TABLE relation_table
      AS
    SELECT * FROM external_table;
    Regards,
    RaviR

  • Table name which contains the email addresses maintained in address area of SCOT

    HI,
    I would like to know the table name which contains the email addresses maintained in address area of SCOT.
    I know how to see through SCOT, but I want to see as a list through SAP table.
    I am not able to see email list through SXNODE AND SXADDRTYPE tables.
    Thanks,
    Nagaraju Ravuri

    Hi Nagaraju,
    You may use ADR6 table and field SMTP to get email address of respective users.
    Regards,
    Deepak Kori

  • Package name which contain user exit  in standard include name

    hai experts,
    can i know the package name which contain user exit mean standard include which contain forms of the perform. or give some suggestion to find this exit for purticular tcode.
    useful reply will be awarded.
    regards,
    jai.m

    Hai,
    it is not over thare....
    actualy i need to do some work at the time of the save document of mb1b transaction. my need is if any one exit or custmer exit or badi has trigger at the time of save the document in mb1b transaction.
    regards ,
    jai.m

  • Word cannot open this document.  The document might be in use, the document might not be a valid Word document,  or the file name might contain invalid characters (for example,\ /).

    I recently upgraded to a new Macbook Air running Lion, from my 2007 white Macbook running Snow Leopard.  I had Office for Mac 2004 on the 2007, but had to upgrade to Office for Mac 2011 to be compatible with Lion on the Air.  Now when I try to open my documents on the Air that were saved under Office 2004 on the old computer, I get the following message: Word cannot open this document.  The document might be in use, the document might not be a valid Word document,  or the file name might contain invalid characters (for example,\ /).
    Any suggestions?  Thank you.

    Ha,ha,ha.....I figured it out.  But for anyone else who's having this problem, it seems that while Office 2004 allowed dates in this format: 00/00/00, Office 2011 doesn't like it at all.  I just changed the format in the document names to 00-00-00 and all is well.  Documents are opening beautifully! 

  • Java.io.File and non-unicode characters in file name

    Unix filesystem object names are byte sequences. These byte sequences are not required to correspond to any character sequence in the current or any locale. How do I open a file if it has characters that do not corrospond to a valid unicode encoding for some current locale? Unless I am missing something, if I do a list on a parent directory that has some file names like this, those file names do not get added to the list. Hmmm....
    R.

    OK, create.c is a program that will create a file whose name is not a character in the 'ja' locale.
    Lister.java defines a class that lists files in the current directory. For each file, it spits out the 'toString()' version of the file, the char array of the name as hex, and the 'getBytes' byte array of the name.
    So, what you can do is compile and run create.c, which will create a file whose name is a single byte whose hex value is 99. Then compile and run Lister.java, which will give you the following output (shown for two different locales:
    $ export LANG=
    $ java Lister
    name:?; chars:99,; bytes:99,
    $ export LANG=ja
    $ java Lister
    name:?; chars:fffd,; bytes:3f,
    ---------------------------------------------Note that when running in the JA locale, there is no character corresponding to byte value 0x99. So, Java uses the replacement character 0xFFFD, and the '?' character 0x3F, as a replacement.
    The point is that there are files which Java cannot uniquely represent as a straight String. I suppose we could get the filename via JNI, do the conversion ourselves, and then use the private-use area of Unicode to encode all our strings, but ugh.
    //create.c
    #include <stdio.h>
    int main()
       const char* name = "\x99";
       FILE* file = fopen( name, "w" );
       if( file == NULL )
          printf( "could not open file %s\n", name );
          return 1;
       fclose( file );
       return 0;
    // Lister.java
    import java.io.*;
    public class Lister
        public static void main( String[] args )
            new Lister().run();
        public void run()
            try
                doRun();
            catch( Exception e )
                System.out.println( "Encountered exception: " + e );
        private void doRun() throws Exception
            File cwd = new File( "." );
            String[] children = cwd.list();
            for( int i = 0; i < children.length; ++i )
                printName( children[ i ] );
        private void printName( String s )
            System.out.print( "name:" );
            System.out.print( s );
            System.out.print( "; chars:" );
            printCharsAsHex( s );
            System.out.print( "; bytes:" );
            printBytesAsHex( s );
            System.out.println();
        private void printCharsAsHex( String s )
            for( int i = 0; i < s.length(); ++i )
                char ch = s.charAt( i );
                System.out.print( Integer.toHexString( ch ) + "," );
        private void printBytesAsHex( String s )
            byte[] bytes = s.getBytes();
            for( int i = 0; i < bytes.length; ++i )
                byte b = bytes[ i ];
                System.out.print( Integer.toHexString( unsignedExtension( b ) ) + "," );
        private int unsignedExtension( byte b )
            return (int)b & 0xFF;
    }

  • Is knowing of Class Name, which called current method, possible?

    Hallo everyone,
    My method is called from inside some method of some class. Can I know which class called my method.
    In other words I would like to know is that possible to have a name of class from which my current method is called? It's sometrhing like I need an access to the call stack.
    thanks!

    You can do the same thing before 1.4 as well:
          Throwable t;
          PrintStream ps;
          PrintWriter pw;
          String str;
          StringBuffer sb;
          StringWriter st;
          t = new Throwable();
          st = new StringWriter();
          pw = new PrintWriter(st);
          t.printStackTrace(pw);
          sb = st.getBuffer();
          str = sb.toString();You now have the stack as a String in the variable str.
    The problem is that you have to parse the String to separate methods from classes and so on. And different platform may produce slightly different string representations of the stack.
    So, it is easier in Java 1.4

  • Where to keep the java class file which is being used from a form?

    Hi,
    Actually I am developing a form which has a bean area and the data will be displayed in the bean area in the form of grid. And I will register this form with apps and will run the from Oracle apps. I want to know that there is a java class file that is being refered by the form, where should this java class file be placed and is there any other places where any changes are required so that the form runs correctly from the Oracle apps and can find the java class file.
    I am very thankful to each and everyone who will be able answer this question of my.

    do you mean decompiling? there are tons of java decompilers available out there, what exactly are you trying to do here?

  • Deploy java stored proc. publishes java class names without package name

    Hi to All,
    Using JDevStudio 10132 I've created a 'Loadjava and Java Stored Procedure' deployment profile for my project. I've added my static method to the deplyment profile, but it generates script without java packege name, only pure class name.
    For example it executes: ...
    CREATE OR REPLACE PROCEDURE Procedure1(p1 IN VARCHAR2) AUTHID CURRENT_USER AS LANGUAGE JAVA NAME 'CryptoHelper.Procedure1(java.lang.String)';
    instead of
    CREATE OR REPLACE PROCEDURE Procedure1(p1 IN VARCHAR2) AUTHID CURRENT_USER AS LANGUAGE JAVA NAME 'mypackege.xxx.yyy.CryptoHelper.Procedure1(java.lang.String)';
    The CryproHelper class is definitely in mypackage.xxx.yyy package and JDeveloper Application Navigator shows correctly it.
    Any ideas?
    thx fo answers

    Hi,
    I've just been doing this on 10133 and found exactly the same thing. It's an easy fix to edit the package body - but it's rather annoying to have to manually do something that should just work.
    Steve
    *Hand editing the .deploy file to add in the package name works.
    Message was edited by:
    spilgrim

  • Customization of generated Java class names

    Hi,
    I could not find any documentation on how to customize names of the generated
    Java classes/types. In Castor, you can do it with a simple mapping, is it possible
    with XMLBeans?
    Thanks,
    Marina

    Hi, Steve,
    thanks for your reply!
    I have tried to add an xsdconfig file, but when I run the following command:
    C:\Java\XMLBeans\xkit\bin\scomp -src . -srconly order.xsd
    with the xsdconfig file in the current directory , nothing happens - the xsdconfig
    file is ignored and Java files are generated in exactly same way as they were
    without the xsdconfig file...
    Here is the content of my xsdconfig file - it is very simple, for test purposes:
    <xb:config xmlns:order="http://order"
    xmlns:xb="http://www.bea.com/2002/09/xbean/config">
    <xb:namespace uri="http://order">
    <xb:package>neptune.neptunelib</xb:package>
    </xb:namespace>
    <xb:qname name="order:order" javaname="OrderDO"/>
    <xb:qname name="order:shippingID" javaname="ShippingInfoDO"/>
    <xb:qname name="order:addressInfo" javaname="AddressInfoDO"/>
    <xb:qname name="order:destination" javaname="DestinationDO"/>
    </xb:config>
    I'm not sure about the namespace part - currently, my order.xsd has no namespace
    or URI assigned. I asked BEA's customer support about this and the answer was:
    'use anything, the URI does not matter'. Well, I did use "anything" but I'm not
    sure this is correct...
    Thanks,
    Marina
    "Steve Traut" <[email protected]> wrote:
    Marina -- You can do this by creating an xsdconfig file and including
    it
    when you compile your XSD files. The xsdconfig file maps schema types
    to
    generated Java type names.
    If you're using WebLogic Workshop, the following topic should give you
    what
    you need:
    http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/howdoi/howGuideXMLBeansTypeNaming.html
    If you're using Ant, I can provide a topic that will be available soon.
    Please send email if you'd like information on the Ant task.
    Steve
    "Marina Popova" <[email protected]> wrote in message
    news:3f8c468c$[email protected]..
    Hi,
    I could not find any documentation on how to customize names of thegenerated
    Java classes/types. In Castor, you can do it with a simple mapping,is it
    possible
    with XMLBeans?
    Thanks,
    Marina

  • Table name which contains all the details of infocube

    Hi All,
    I need to write a program which contains the details of infocube like
    1) Request ID
    2) Request Number
    3) Username
    4) Transfered Records
    5) Added Records
    6) Data source
    Please could anyone tell me where i can find all these details.
    I need to know the table name or else any function module name which can fetch all the details based on Infocube. I got one table name 'RSMONICDP' where i can get Request number and username. but rest i m not able to findout..please help me out.
    Regards
    Anju

    Hi,
    Chk these tables
    RSMONICTAB -- transferred and added records
    try also RSREQDONE RSREQICODS and RSMDATASTATE for other details
    Regards,
    B

  • How can i get all java class names from a package using reflection?

    hi,
    can i get all classes name from a package using reflection or any other way?
    If possible plz give the code with example.

    You can't, because the package doesn't have to be on the local machine. It could be ANYWHERE.
    For example, via a URLClassLoader (ie from the internet) I could load a class called:
    com.paperstack.NobodyExpectsTheSpanishInquisitionI haven't written it yet. But I might tomorrow. How are you going to determine if that class is in the package?
    This subject comes up a lot. If you want to do something a bit like what you're asking for (but not quite) there are plenty of threads on the subject. Use google and/or the forum search facility to find them.
    But the answer to your question, as you asked it, is "you can't do that".

Maybe you are looking for

  • CS5 (camera raw 8.7.1) not reading Nikon d810 NEF files

    I just purchased Nikon d810. I have CS5. All updates are current and I've downloaded Camera Raw 8.7.1 but Photoshop/Bridge still can not read NEF files. What am I doing wrong?

  • Is there ANY way to fix a corrupt InDesign file??

    My computer crashed last night and the InDesign file i was working on seems to have been corrupted. When i try to open the file i get the following message: "Adobe Indesign automatic recovery failed the last time it tried to open the document" when i

  • Help - can't open .mpg file with Quicktime 7.3

    Hi folks, Just tried to open a .mpg file of a recent santa visit for my little boys and Quicktime indicated it couldn't open it saying it wasn't a movie. I upgrade to Quicktime pro but that didn't solve the problem. Any thoughts as regards possible s

  • CUCM 10.1 CDR showing no data

    Hello, i am using CUCM 10 and configured CDr last month as epr guide.. but as now i am checking CDR details for any user it is showing no details.. how can correct it so that it will show full and final call details..?

  • How to install oracle 10g 10.2.0.1.0 to centOS

    Dear sir/madam I am trying to install oracle 10g 10.2.0.1.0 to centOS. After configuring Linux (centOS), I try to run ./runInstaller it give me am error as following 正在檢查安裝程式需求... 檢查作業系統版本: 必須是 redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 o