Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: incorrect spelling of kannada letters in java jar file

  1. #1
    Junior Member
    Join Date
    Jan 2014
    Posts
    11
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default incorrect spelling of kannada letters in java jar file

    Hello,
    I've written a JAVA gui program with buttons having kannada text. I've used tunga font and typed the unicodes for every button label and on running individual programs i get the proper words displayed on all buttons. However when i create a jar file and run it the text is different with some of the symbols missing. I'm not sure what's wrong as no error is being shown....
    Sample code:
    Font font = new Font("Tunga", Font.BOLD,50);
    b1=new JButton("\u0CAE\u0CC2\u0CB2\u0CB5\u0CB8\u0CCD\u0CA 4\u0CC1");
    b1.setBackground(Color.green);
    b1.setFont(font);
    b1.setFocusPainted( false );

    ex2.jpg

  2. The Following User Says Thank You to Prathiksha For This Useful Post:

    GregBrannon (May 6th, 2014)


  3. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    6,304
    My Mood
    Mellow
    Thanks
    252
    Thanked 778 Times in 763 Posts

    Default Re: incorrect spelling of kannada letters in java jar file

    Interesting problem. Let us know what you figure out.

  4. #3
    Junior Member
    Join Date
    Jan 2014
    Posts
    11
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: incorrect spelling of kannada letters in java jar file

    Quote Originally Posted by GregBrannon View Post
    Interesting problem. Let us know what you figure out.
    Well i figured that the problem is in merging the letters as this language is quite complex. When i execute the jar file through the command prompt the words are displayed correctly. However this problem is seen only when i try to open the jar file manually i.e. by clicking on it. Does anyone know what's the problem?

  5. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,310
    Thanks
    56
    Thanked 2,373 Times in 2,344 Posts

    Default Re: incorrect spelling of kannada letters in java jar file

    When i execute the jar file through the command prompt the words are displayed correctly
    problem is seen only when i try to open the jar file manually i.e. by clicking on it.
    One difference could be that the manual typing of the commandline uses a different version of java
    than the commandline being used by the OS when the jar file is double clicked.
    If you don't understand my answer, don't ignore it, ask a question.

  6. The Following User Says Thank You to Norm For This Useful Post:

    Prathiksha (May 6th, 2014)

  7. #5
    Junior Member
    Join Date
    Jan 2014
    Posts
    11
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: incorrect spelling of kannada letters in java jar file

    Quote Originally Posted by Norm View Post
    One difference could be that the manual typing of the commandline uses a different version of java
    than the commandline being used by the OS when the jar file is double clicked.
    Thank you...that was what i thought too when i checked other sites...so i tried to open it by browsing through the java directory path and opening it with the javaw.exe located at jdk's bin folder but nothing happened...... How will i know which executable is running the jar file correctly?
    I've also noticed that the command
    java -jar abc.jar opens the jar file correctly but typing just abc.jar although should work gives the same problem.....
    Last edited by Prathiksha; May 6th, 2014 at 09:43 AM.

  8. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    22,310
    Thanks
    56
    Thanked 2,373 Times in 2,344 Posts

    Default Re: incorrect spelling of kannada letters in java jar file

    typing just abc.jar
    There is no executable command on the commandline there. I don't know what commandline the OS uses.
    If you don't understand my answer, don't ignore it, ask a question.

  9. #7
    Junior Member
    Join Date
    Jan 2014
    Posts
    11
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: incorrect spelling of kannada letters in java jar file

    Quote Originally Posted by Norm View Post
    There is no executable command on the commandline there. I don't know what commandline the OS uses.
    I'm sorry, I wasn't specific enough, I had created my jar files in 2 methods i.e cvfm and cvfe in command prompt as directed in the below link:
    Creating an Executable jar File
    Usually both methods give the same result...but now the jar file created using cvfe works properly when executed using java -jar abc.jar command, although double clicking it later on gives the spelling problem

  10. #8
    Junior Member
    Join Date
    Jan 2014
    Posts
    11
    Thanks
    2
    Thanked 1 Time in 1 Post

    Default Re: incorrect spelling of kannada letters in java jar file

    Quote Originally Posted by Norm View Post
    There is no executable command on the commandline there. I don't know what commandline the OS uses.
    i had uninstalled older versions of java and i'm running the jar fie on a windows 7 64-bit system....my java software has also been updated but still the problem remains. One thing i have noticed is that this problem is not present in windows xp OS

Similar Threads

  1. run jar file inside a jar file?
    By ufrubnuckle in forum Java Theory & Questions
    Replies: 1
    Last Post: February 21st, 2013, 06:58 AM
  2. How would you run jar file with a java program?
    By javapenguin in forum What's Wrong With My Code?
    Replies: 4
    Last Post: May 31st, 2012, 03:03 PM
  3. [SOLVED] jar file Built(clean and build) perfectly, but not running as jar
    By chronoz13 in forum What's Wrong With My Code?
    Replies: 18
    Last Post: July 11th, 2011, 12:41 PM
  4. Replies: 10
    Last Post: January 12th, 2011, 05:48 AM
  5. How do you convert a jar file into a java file, how ?
    By auto78900 in forum Java Theory & Questions
    Replies: 4
    Last Post: October 12th, 2010, 01:32 AM