JDeveloper on Linux

Here I'm listing some news, tips, problems and issues I found while running JDeveloper on Linux. For new features of JDeveloper 10g, see also this article by Brian Duff, of the JDeveloper team: http://www.oracle.com/technology/products/jdev/tips/duff/teamdev_9051.html

Using 9i SCM a.k.a. Repository

Note: to get more insight into what the SCM client is doing in JDeveloper, go to Tools → Preferences → Oracle SCM and turn on "Write messages to log window"

Using 9i SCM works pretty well from JDeveloper. I've ran into a couple of issues, which I list below.

Hashmarks in filenames

Most of the issues are more like little usability things than bugs, but the following looked like a show-stopper. We check in external libraries, including documentation and sourcecode. It seems DOM4J 1.4 contains a little file with the name #.xml... But 9i SCM uses .rvi files to do its administration and those use the hash mark as a comment indicator! JDeveloper happily downloads stuff from the repository but when you do 'Download new versions', it barfs with an error 'Unexpected tag'. The bug has been logged and the workaround is not to check in files with hashes in their names. This shows that the original interface for 9i SCM has always been Designer, which has been a win32-only product — and win32 doesn't require you to escape filenames with a hash-mark in it.

Avoid automatic checkouts

It's possible to let JDeveloper automatically check out files when you start editing them. This can be enabled and disabled in Tools → Preferences → Oracle SCM → Automatically Check Out Files.

The problem occurs when someone else changes and checks in a file, and you open your old version of the file and start editing. It won't download the newer version and will let you check the old changed version without warning. I was told this is because refreshing the workarea can be time-consuming, and that it is confusing to the user to see the file change while they have it opened. Whatever the reason, I turned off the auto-checkout feature and I encourage you to do the same.

Upgrades to the repository

Another bug I found, happened while the repository was updated from to I had a couple of files checked out and when the repository upgrade was finished, JDeveloper would connect but wouldn't show the status icon of each file (checked out, in or not yet checked in at all). Thus the SCM actions in the context menu of each file would only show 'Add' as the action. The 'List Checkouts' feature didn't work too. In short: nothing worked. Creating a new workarea and doing a complete download didn't help either. There are some related bugs on http://metalink.oracle.com/ but none of them offered a solution. Finally I found the solution myself:



Looking at functions from Designer

Another problem with only using JDeveloper to access the repository is that you can't see all the Designer stuff like functions, domains, entities, etc. This problem can be partly solved by using the PL/SQL gateway or something else to define views on the internal repository tables and then query them with a statement like the one below.

	select f.function_label
	     , f.short_definition
	     , t.txt_text
	from   repowner.sdd_fun            f
	     , repowner.i$rm_text_lines    t
	     , repowner.sdd_folder_members m
	where  f.ivid                      = t.parent_ivid(+)
	  and (t.txt_type                  = 'CDIDSC' OR t.txt_type is null)
	  and m.member_object              = f.irid
	  and to_char(m.folder_reference)  = '2201125301717868591556466273298378520'
	order by f.function_label;

It's probably better to just let your DBA install the ODWA packages, the Oracle Designer Web Assistant, a read-only web frontend for Designer. I think it comes with 9i Designer Headstart.

Oracle JVM for Linux

The new JDeveloper 10g ( now includes the Oracle virtual machine for Linux! The OJVM was previously only available on Windows. I've tried it and the debugger is much more responsive than using Sun's VM. Besides that, the code coach and the profiler work, too. After you downloaded and unpacked JDeveloper, change into the ojvm_linux_x86 directory and (as root) execute the script installOJVM. Now start up JDeveloper, go to your project properties, go to the Runner section and select 'OJVM' as the virtual machine.

Problems with the debugger

I've had a few problems with the debugger of JDeveloper on Linux. It wouldn't start and I sometimes had to hard kill the started process. This probably has something to do with the fact that the debugger is too quickly trying to make a connection to the debuggee (the debugged process). Go to the Tools menu, then Preferences and then select Debugger. Set the Connection Retry Setting to a value of 40 or so.

Developer Weblog

Brian Duff, one of the people in the JDeveloper development team, maintains a blog. Lots of interesting stuff here!! http://radio.weblogs.com/0128037/2003/09/05.html

10g Nice Feature: External Tools

The JDeveloper 10g version (internally referred to as 9.0.5) has a very nice feature called External Tools. I couldn't get the JUnit plugin to work in 10g, probably because the plugin API changed a little from 9.0.3. What I did, was the following:

  export JAVA_HOME=/usr/java/j2sdk1.4.2_01
  export PATH=$PATH:$JAVA_HOME/bin

The best thing is, you can put ANYTHING here. Viewers, games, everything is possible. :D In the image below, you can see that the VI editor is added; this makes it easy to run a quick regexp.

external tool jdeveloper.png


Right-clicking on an open code editor field will show the Organize Imports submenu. There are four functions here, the most useful being the Remove Unused Imports. No more cluttering of imports which you don't need!

Another useful one (which vim users have been enjoying for sometime now) is searching forward as-you-type. Hit CTRL+E and start typing. When you've found it, hit ENTER. Pressing F3 will get you the next hit.

When running a program multiple times, the output window often clutters (especially with the long stack traces that are sometimes printed). You can manually clear it, but there's a useful option to do this automatically: double-click on a project name to get into the project settings, double-click Runner and then select the subentry Options. Check the checkbox "Clear log".

If you're used to CTRL-PgUp and CTRL-PgDown to jump through the tabs of Mozilla or the terminal emulators Gnome-Terminal and Konsole, define this behaviour in JDeveloper too. Go to Preferences → Accelerators and look up the accelerators for Left File and Right File. Don't change Previous File and Next File, that's not what you're looking for.

The newest JVM

In my experience, it helps to use the latest release of the JVM for running JDeveloper. For instance, memory usage is down with 7Mb when using 1.4.2 instead of 1.4.1. This is done by searching for the line SetJavaHome in the YOUR_JDEV_DIR/jdev/bin/jdev.conf file. Note that the SetJavaHome setting is used for running JDeveloper and that your projects might use another Java SDK! For checking which version of the Java SDK your project uses, double-click on the project to see its properties, click on Libraries in the left tree, and check the dropdow box above.


When you run a project in 9.0.2, your browser won't start even though you entered the command in the preferences dialog screen. It's a bug, see also here. Upgrading to 9.0.3 will fix it. If you're running RedHat 8 or higher, put /usr/bin/htmlview in the field in the preferences dialog. That way, when you're using Mozilla it won't start up a separate instance when Mozilla already happens to be running.


In the Database Connections part of the preferences, you can type the command to start SQL*Plus. If you use Gnome and want to start SQL*Plus in the standard terminal, type something like gnome-terminal -x sqlplus. Note the -x option; don't use -e because it won't work.


While not a problem with JDeveloper per se, I just wanted to share this. I was trying out all sorts of Java examples. I used the jdbc driver jars from our development solaris box, which worked the whole time. I figured it might be better to use those, since they're also used on the build server I configured.

All went well until I wanted to compile and run a few pieces of example code which came with iFS. All of a sudden, running the examples gave all kinds of funny errors when trying to connect to iFS, like:

  java.lang.NoSuchFieldError: envCharSetId
  java.sql.SQLException: Character Set Not Supported !!: DBConversion

I was running a 9.2 database locally, so I figured I might need to match the development server and installed client software for 9.0.1 and added a line to /etc/ld.so.conf. But this didn't help. I searched Metalink and found out that you could define properties for the iFS connection. I tried setting the connection URL but that didn't help. After spending an hour on Metalink, I wanted to give up.

Then I figured, let's google for it and I encountered a blurb about mismatching JDBC drivers and OCI libraries. I then used the drivers I got with my own installed 9.2 database and VOILA!! it worked.... Morale of the story: use the correct JDBC drivers and when not using thin but OCI drivers, make sure you use the JDBC drivers that came with your installation! Arrrrgh! Sometimes, stuff like this kills me!

Mouse Wheel

If you download and install the full version of JDeveloper 9.0.2, the mouse scroll wheel doesn't work since the JRE that comes along (1.3.1) doesn't support the mouse wheel. See also here. An alternative is to set the environment variable JDEV_JAVA_HOME to a newer Java JRE or SDK. I noticed that JDeveloper 9.0.2 also runs with the latest versions, which have support for the scroll wheel. I also noticed JDeveloper hung using 1.4.1_02, but not with 1.4.1_03. I didn't pursue the matter, though.

JDeveloper (or any other Java program) font settings

When I started up JDeveloper on my laptop running Linux, it irritated me that the fonts looked just as crappy as... well, as like any Java application running on my laptop while I have perfectly good-looking Microsoft TrueType fonts installed.

After some looking around on the Sun website, I found the solution here. Disclaimer: it worked for me (running SuSe 7.2 and RedHat), it might not work for you. There are a zillion Linux distro's and Sun and Oracle are not standing still either.

First of all: If you don't want to read the docs and you have the Microsoft TrueType fonts installed (which you should) , then:

Changing the fonts manually:

  verdanaz.ttf -microsoft-Tahoma-bold-i-normal--0-0-0-0-p-0-iso8859-4
  verdanaz.ttf -microsoft-Tahoma-bold-i-normal--0-0-0-0-p-0-iso8859-3
  verdanaz.ttf -microsoft-Tahoma-bold-i-normal--0-0-0-0-p-0-iso8859-2
  # SansSerif font definition
  # SansSerif font definition

If you find that the fonts are too big for your taste, do the following steps:

    chmod 444 ide.properties

I'm not sure why, but at every start JDeveloper overwrites this file (and maybe others as well). I've asked the development team why this is, I'll keep you informed.

There are no more steps. Any Java app and especially JDeveloper looks better now!

Last updated 30 September 2004