Yesterday, I checked out a project from SVN, I ran mvn eclipse:eclipse and imported it into my IDE. So far so good, everything compiled, Maven could run all the tests, all was well.
But then I tried to run a JUnit test in Eclipse. I kept getting a strange error about Eclipse not being able to run javaw.exe in my project-folder. After some Googling, I found that the underlying error that causes this problem, was of an entirely different nature: Windows has a character limit to command line statements. And since Eclipse assembles the classpath itself to pass it on as a launch parameter, the command line character limit got violated.
I now knew what was causing the error, but fixing it didn't seem that simple. I tried to remove all unnecessary libraries (there weren't a lot), but the problem persisted. So I changed to drastic measures: I moved my Maven repository to a folder directly at my C:\ disk. The path was about 30 characters shorter than before, but since Eclipse was adding a whole lot of Maven libraries to my classpath, it made a huge difference.
After that, I could run my JUnit test without any problems. I suppose I'm safe for now, but what will happen when we add even more libraries to the project? It's possible that at a given point, the classpath will be too long for even the shortest possible repo-path you can get. And then what? Switching to Linux could be an option, but during my quest to solve this problem, I also read that IntelliJ has better support for this. So going there could be an option too. Or I could just write/wait for an Eclipse plugin that deals with this problem...
Showing posts with label Eclipse. Show all posts
Showing posts with label Eclipse. Show all posts
Friday, June 14, 2013
Monday, December 3, 2012
Special character encoding
If you have ever created a custom language bundle, you'll know special characters can be very annoying. When they're not displaying correctly, but instead showing a diamond with a question mark or a white rectangle, it's sometimes difficult and frustrating to find the origin of the problem.
When you're building a website that has to come with a language with a lot of special characters (French, German, ...), you can run these encoding problems. In fact, there only has to be one of those special characters anywhere in your site, and it'll be messed up. When working with resource bundles (.properties files), I've found that these few steps often resolve a lot of issues, so try to follow these simple guidelines.
When you're building a website that has to come with a language with a lot of special characters (French, German, ...), you can run these encoding problems. In fact, there only has to be one of those special characters anywhere in your site, and it'll be messed up. When working with resource bundles (.properties files), I've found that these few steps often resolve a lot of issues, so try to follow these simple guidelines.
- Make sure your general encoding is set to UTF-8. In Eclipse, you do this in Window -> Preferences -> General -> Workspace
- Each file can have a seperate encoding as well. Check the properties of your .properties files. In Eclipse, you do this by right-clicking, then selecting Properties. Under Resource, you can set the encoding to UTF-8.
Redeploy your application with this correct settings, and your problems should dissolve! Bear in mind, though, that if you had an incorrect encoding first, switching to the correct encoding may break your file and replace the special characters by the 'not found' characters (diamond or rectangle). Check your file before deploying!
Wednesday, June 20, 2012
ADF in Eclipse
Oracle organizes a free virtual event, to show some best practices in building rich ADF applications, based on ADF Data Controls, using standard Java technologies (EJBs, JPA, ...).
There's also a live Q&A chat with Oracle technical staff. The event takes place on July 10. You can register here.
There's also a live Q&A chat with Oracle technical staff. The event takes place on July 10. You can register here.
Tuesday, February 28, 2012
Google App Engine
Recently, I started building my own website. Since I'm a Java developer, I wanted to build a website in Java. For work, I usually build web applications using Oracle's ADF, so for now, I wanted to use some other technology.
Of course, building a website in Java offers a lot of possibilities, but it also has its drawbacks. For example, most free webhosting solutions don't support Java applications. Therefore I had to either put up my own server, or find some cloud solution.
I opted for the latter, and quickly encountered Google as a provider for my needs. And more specifically: Google App Engine. After some quick research, I found that there are plugins for Eclipse (or STS, in my case) to get started easily. After installing the Google App Engine SDK Plugin for Eclipse, creating and deploying an application to the web is a matter of a few clicks!
More information on how to build applications for Google Apps Engine will follow shortly, in upcoming posts.
Stay tuned!
Of course, building a website in Java offers a lot of possibilities, but it also has its drawbacks. For example, most free webhosting solutions don't support Java applications. Therefore I had to either put up my own server, or find some cloud solution.
I opted for the latter, and quickly encountered Google as a provider for my needs. And more specifically: Google App Engine. After some quick research, I found that there are plugins for Eclipse (or STS, in my case) to get started easily. After installing the Google App Engine SDK Plugin for Eclipse, creating and deploying an application to the web is a matter of a few clicks!
More information on how to build applications for Google Apps Engine will follow shortly, in upcoming posts.
Stay tuned!
Labels:
Cloud,
Eclipse,
Google,
Google App Engine,
Java,
Springsource ToolSuite
Subscribe to:
Posts (Atom)