kamalchopra / jsyntaxpane

Automatically exported from code.google.com/p/jsyntaxpane
0 stars 0 forks source link

JNLP use of jeditorpane #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I´ve devel an app tha use jsyntaxpane with a JEditorPane. I do a:
 DefaultSyntaxKit.initKit();
 field=new JEditorPane();
 field.setContentType("text/sql");

And i works fine. But when i use the app thru JNLP, syntax highlight is
disabled. Console shows:
26-mar-2009 19:06:24 jsyntaxpane.DefaultSyntaxKit loadConfig
INFO: unable to load configuration for: class jsyntaxpane.DefaultSyntaxKit
from: jsyntaxpane/DefaultSyntaxKit/config.properties

Could it be caused by the way of loading the resource?

Thanks in advance.
Victor Martinez

Original issue reported on code.google.com by victor.martinez.conte@gmail.com on 26 Mar 2009 at 7:24

GoogleCodeExporter commented 9 years ago
Sorry, subject was "JNLP use of jeditorpane", please edit!

Original comment by victor.martinez.conte@gmail.com on 26 Mar 2009 at 7:26

GoogleCodeExporter commented 9 years ago
Could be.  The default configuration is located in the JAR file of jsyntaxpane 
(or
should be located under META-INF/services/jsyntaxpane/defaultsyntaxkit.  So if 
the
JAR is loaded by JNLP in full, it should find it. 
I'm not able to test right now.  
What version did you use?

Original comment by ayman.al...@gmail.com on 27 Mar 2009 at 3:42

GoogleCodeExporter commented 9 years ago
Hi! I used jsyntaxpane-0.9.5-b17.jar. Inside jar file is the config file (i 
works
actually as standalone app). I looked inside the code and it seems like
JarServiceProvider.readProperties(String name) couldnt find resource at 
InputStream
is = findResource(serviceFile)

Maybe, the ClassLoader.getSystemClassLoader() at findResource(String url) does 
not
returns the same classloader in JNLP

But it's a assumption.
Thanks for all

Original comment by victor.martinez.conte@gmail.com on 27 Mar 2009 at 7:36

GoogleCodeExporter commented 9 years ago
This is the same as issue 85.  Closing as duplicate of that, as the fix is in 
that issue.

Original comment by ayman.al...@gmail.com on 8 Apr 2009 at 5:16

GoogleCodeExporter commented 9 years ago

Original comment by ayman.al...@gmail.com on 8 Apr 2009 at 5:17

GoogleCodeExporter commented 9 years ago
Turns out this is not the same issue as issue 85.  Re-Openning

Original comment by ayman.al...@gmail.com on 14 Apr 2009 at 7:14

GoogleCodeExporter commented 9 years ago
If I need to go any further in this, I'll need full source (make it short 
please) of
a project recreating this issue.

Original comment by ayman.al...@gmail.com on 16 Apr 2009 at 5:39

GoogleCodeExporter commented 9 years ago
I'll try a short example and a jnlp link to test it, my project is too long for 
a
outside test.

Thank you for your time!

Original comment by victor.martinez.conte@gmail.com on 16 Apr 2009 at 8:49

GoogleCodeExporter commented 9 years ago
Hi, i've done a simple test code (with sql syntax) and it worked under JNLP. I
thought it could be cos jars was signed in my "main" app, so i signed the two 
test
jars; it worked too. 

So, it must be something related with my "main" app. I'll try to see some 
difference.

Original comment by victor.martinez.conte@gmail.com on 18 Apr 2009 at 8:41

GoogleCodeExporter commented 9 years ago
Jar JSyntaxPane jar is not signed, which could cause issues with JNLP.

Original comment by ayman.al...@gmail.com on 22 Apr 2009 at 7:09

GoogleCodeExporter commented 9 years ago
Right, i signed it myself. I thought it could be the problem, but the test 
worked
fine with and without sign so, i understand its not the cause. I will try to 
make
some other test, but i dont see any significant difference between test code 
and main
app :-\

Original comment by victor.martinez.conte@gmail.com on 22 Apr 2009 at 7:40