jEdit Community - Resources for users of the jEdit Text Editor
SplashScreen conflict when building jEdit
Submitted by a992400 on Sunday, 15 June, 2008 - 19:05
Hello. I'm trying to rebuild jEdit from source, and I'm using the jEdit source code for version 4.2, and Apache Ant version 1.7.0. Ant correctly locates build.xml in the root directory of the jEdit source, and starts the building process. But it fails with two errors, and many warnings. Ignoring the warnings for now, I'm looking at the first error:

[javac] D:\_t\org\gjt\sp\jedit\GUIUtilities.java:1532: reference to SplashScreen is ambiguous, both class org.gjt.sp.jedit.gui.SplashScreen in org.gjt.sp.jedit.gui and class java.awt.SplashScreen in java.awt match
[javac] private static SplashScreen splash;

Apparently Java AWT has a class named SplashScreen (http://java.sun.com/javase/6/docs/api/java/awt/SplashScreen.html), and jEdit is trying to use the same name for its own class. So I'm wondering how jEdit was able to be successfully built for the release? Anyone have any ideas on this?
Comment viewing options
Select your preferred way to display the comments and click 'Save settings' to activate your changes.
4.2 was built and released pr
by elberry on Mon, 16/06/2008 - 07:06
4.2 was built and released pre Java 6, I believe the requirement at the time was 1.4. java.awt.SplashScreen is new in Java 6.

If you really want to build 4.2 (instead of the latest development version) you'll probably need to go into the code and change the import to be the jedit one.

Learn from the past. Live in the present. Plan for the future.
11101000
Blog
 
Thanks for your reply. I sho
by a992400 on Mon, 16/06/2008 - 14:55
Thanks for your reply. I should have mentioned what version of Java I'm running: 1.6.0_01

That makes sense. In the meantime, I changed the name of the jEdit SplashScreen object to be _SplashScreen, and that seemed to work. What exactly do you mean as to changing the import to be the jEdit one? Do you mean use an earlier version of Java?
 
No. I mean change the import
by elberry on Tue, 17/06/2008 - 03:05
No. I mean change the import that imports the SplashScreen to be specific.

If you look near the top of GUIUtilities, you should see two import statements like this:
[code]
import org.gjt.sp.jedit.gui.*;
import java.awt.*;
[/code]

Adding this line:
[code]
import org.gjt.sp.jedit.gui.SplashScreen;
[/code]

Should fix the issue.

Since the java.awt.SplashScreen didn't exist when 4.2 was built and released, it's clear that the intention was to use the org.gjt.sp.jedit.gui.SplashScreen.

You should really keep that intention as the behavior of the jEdit splash screen depends on it.

Hope that makes sense.

Learn from the past. Live in the present. Plan for the future.
11101000
Blog
 
Your approach is much cleaner
by a992400 on Tue, 17/06/2008 - 14:32
Your approach is much cleaner than mine. I tried it just now, and it worked great. Thanks!
User login
Browse archives
« November 2024  
MoTuWeThFrSaSu
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
Poll
Are you interested in language packs for jEdit?
Yes, and I could help maintain translations
26%
Yes, I'd like to have translations
32%
Indifferent
35%
No, that'd be bad (please comment)
7%
Total votes: 1093
Syndication
file   ver   dls
German Localization light   4.4.2.1   101634
Context Free Art (*.cfdg)   0.31   46062
BBEdit scheme   1.0   18601
JBuilder scheme   .001   18502
ColdFusion scheme   1.0   18031
R Edit Mode - extensive version   0.1   17481
Advanced HTML edit mode   1.0   16213
Matlab Edit Mode   1.0   16075
jEdit XP icons   1.0   15236
XP icons for jEdit   1.1   14300