|
I second that - try every script by it's own and find the one that crashes the Java Hot Spot VM[^]
regards
Torsten
I never finish anyth...
|
|
|
|
|
You could try updating to a more recent build of Java. Update 17 is quite old now and it is possible that there may have been some fixes to more recent releases. I know that these things aren't always that easy, particularly if this involves upgrading a live production system, but if you can upgrade then it might be worth a try.
|
|
|
|
|
Who can give me an example ? Please
|
|
|
|
|
|
Oh, Thanks, Have you a good day!
|
|
|
|
|
So you're too lazy to look it up? those are language keywords, they get explained in the language reference documentation, as well as in any book on the language. Tsk. Tsk.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Throw is the method by which you can explicitly throw the exception raised during the code which is enclosed in the try block.
you can use throw by writing
first you have to create an object of exception type
throw e // e is an object of type exception
and e is catched by the relevant catch block
|
|
|
|
|
Hello my friends
It's time to let some knowledge wander the opposite direction:
How do I get Arabic fonts displayed correctly in a Java GUI (Swing and in this case also JFace/SWT) ?
regards
Torsten
I never finish anyth...
|
|
|
|
|
0. Ensure the font supports Aarbic, bit basic I know.
1. Make sure the resource strings are properly encoded. Try saving them externally to the application.
2. Look here[^]
3. Google is your friend, try "use Arabic fonts in Swing".
Panic, Chaos, Destruction.
My work here is done.
or "Drink. Get drunk. Fall over." - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
Have a bit more patience with newbies. Of course some of them act dumb -- they're often *students*, for heaven's sake. -- (Terry Pratchett, alt.fan.pratchett)
|
|
|
|
|
thanks Nagy. I'm already taking care of these things.
This seems to be a fairly common problem.
To get a bit more precise on what I'm doing right now:
- Eclipse RCP application
- Eclipse owned buttons / labels and JFace/SWT Components have to be displayed Arabic or English by preference.
It all depends pretty much on the charset I'm using. I changed the RCP based NLS to my own "MultiLanguageSupport":
public final class MultiLanguageSupport{
private final static String strPROPERTIES = "/resource/language/";
private static HashMap<String, String> oMap;
static{
loadMap();
}
private static void loadMap(){
oMap = new HashMap<String, String>();
try {
String strLanguage = "language.txt";
String strPref = AccountManager.getGeneralStore().getString(
GeneralPreferenceConstants.LANGUAGE
);
if(false == strPref.isEmpty()){
strLanguage = strPref;
}
ClassLoader oClassLoader = MultiLanguageSupport.class.getClassLoader();
URL oURL = oClassLoader.getResource(strPROPERTIES + strLanguage);
InputStream oInputStream = oClassLoader.getResourceAsStream( strPROPERTIES + strLanguage );
StringWriter writer = new StringWriter();
IOUtils.copy(oInputStream, writer, "UTF8");
String strValues = writer.toString();
StringTokenizer oLineTokenizer = new StringTokenizer(strValues, "\n");
while(oLineTokenizer.hasMoreElements()){
String strLine = oLineTokenizer.nextToken();
if (strLine.length()>0 &&
strLine.charAt(0) != '#' &&
strLine.charAt(0) != '{' &&
strLine.charAt(0) != '\\' ){
StringTokenizer oTokenizer = new StringTokenizer(strLine, "=");
if(2 == oTokenizer.countTokens()){
oMap.put(oTokenizer.nextToken().trim(), oTokenizer.nextToken().trim());
}
}
}
}
catch (FileNotFoundException e) { e.printStackTrace(); }
catch (IOException e) { e.printStackTrace(); }
}
public static final String getString(final String strKey){
return oMap.get(strKey);
}
}
Now I can load these Strings from a *.txt file. This is needed as *.properties are not able to hold Arabic characters (to my knowledge).
Now I'm struggling on the charset to be used. Word tells me, that ISO-8859-6 ("Window Arabic") is not capable to save the Arabic characters I was able to produce with word ( " ٰ١٢٣ٵڅکګڪ " - I hope my random selection of characters is nothing offensive )
So how can I achieve my goal to display Arabic text in my RCP-application? I also thought about loading another font, but also that one would need "some arabic command" to display the chars right (at least on my European Latin character based machine...)
regards
Torsten
I never finish anyth...
|
|
|
|
|
TorstenH. wrote: Now I can load these Strings from a *.txt file. This is needed as *.properties
are not able to hold Arabic characters (to my knowledge).
Pretty sure that you can create a unicode file for properties.
Then you run a tool on it which converts it to txt. It it called something like utf2ascii (something with 2 and ascii in it.) It is part of the jdk.
|
|
|
|
|
are you thinking of this one?[^]
i also did a little research:
Java internationalization[^]
supported Font @ Oracle.com[^]
and a lot of unanswered questions in the forums around the world.
I think I'll leave it as a first attempt this way and ask the interpreter, what he thinks would be the best way to do this. I hope he has some more info about this for me.
regards
Torsten
I never finish anyth...
|
|
|
|
|
There are a number of Arabic speaking CPians around - maybe try the question in the Lounge.
The best things in life are not things.
|
|
|
|
|
|
Ask any Arabic speaker's in the lounge to come here and read the thread. Also blame Richard.
Panic, Chaos, Destruction.
My work here is done.
or "Drink. Get drunk. Fall over." - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
Have a bit more patience with newbies. Of course some of them act dumb -- they're often *students*, for heaven's sake. -- (Terry Pratchett, alt.fan.pratchett)
|
|
|
|
|
Do you still work in Woking?
The best things in life are not things.
|
|
|
|
|
For another three weeks.
Panic, Chaos, Destruction.
My work here is done.
or "Drink. Get drunk. Fall over." - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
Have a bit more patience with newbies. Of course some of them act dumb -- they're often *students*, for heaven's sake. -- (Terry Pratchett, alt.fan.pratchett)
|
|
|
|
|
I assumed (and still believe) that with your knowledge and experience of CodeProject you would be able to formulate the question in a way that made it appear not as a programming question.
The best things in life are not things.
|
|
|
|
|
|
Additional problem: Eclipse RCP Bundle Localization is not able to read from UTF-8 encoded *.txt files Sometimes it's just fun...
regards
Torsten
I never finish anyth...
|
|
|
|
|
|
TorstenH. wrote: Now I'm dealing with the IDialogConstants , where the "OK" and
"Cancel" is read. Any ideas how to customize that
Don't. Instead of trying to reference the captions use control the names in your decision logic, see setName(String) and getName() , now the LOGIC and DISPLAY are nice and seperate.
Panic, Chaos, Destruction.
My work here is done.
or "Drink. Get drunk. Fall over." - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
Have a bit more patience with newbies. Of course some of them act dumb -- they're often *students*, for heaven's sake. -- (Terry Pratchett, alt.fan.pratchett)
|
|
|
|
|
HI,
My Cron Expression is this 0 00 15 5 MAY ? 2011
Whats is START_TIME
Whats is END_TIME
Whats is NEXT_FIRE_TIME
Whats is PREV_FIRE_TIME
Please any one help me.
|
|
|
|
|
would this [^]help?
I looks like a single event to me.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
This is not a Java question; try posting in the correct forum.
The best things in life are not things.
|
|
|
|