BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 03-23-2007, 02:52 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Feb 2007
Model: 8100
Carrier: T-Mobile
Posts: 54
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default eTaras.com RAPC issue

Please Login to Remove!

Not sure what i'm doing wrong, but, I cannot get the javac task that gets invoked from rapc to use -source 1.5

The line always shows -source 1.3 -target 1.1

I DO NOT have 1.3 or 1.4 installed, I have ONLY had 1.5 installed on my system.

How do I override the -source 1.3 argument that's getting passed to javac?

Sincerely,
[email address]
Offline  
Old 03-26-2007, 04:37 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Model: 8800
Carrier: Orange
Posts: 181
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Why is it a problem? You don't need 1.3 or 1.4 installed. It's invoking the installed javac compiler (1.5) and telling it the version of source code it's getting is 1.3. Why do you need to change it?
Offline  
Old 03-26-2007, 10:47 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Feb 2007
Model: 8100
Carrier: T-Mobile
Posts: 54
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Rapc cannot resolve some 1.3 classes?

Quote:
Originally Posted by bdowling
Why is it a problem? You don't need 1.3 or 1.4 installed. It's invoking the installed javac compiler (1.5) and telling it the version of source code it's getting is 1.3. Why do you need to change it?
I may be confused here. Can we only program for the blackberry using the 1.3x JDK?

I had assumed that if I develop in 1.4, or 1.5, I could change the -source argument to specify that the source code it written in 1.5, and that the -target argument would "downgrade" my code to a 1.1 JVM target? I had thought I could use 1.4 and 1.5 features and it would get downgraded, but I guess that's a pretty tall order.

However, I've created a very SIMPLE test using the DecimalFormat class that indeed does exist in the 1.3 JDK.
I'm working in the Eclipse environment using the eTaras RAPC c ANT task. So, I'm developing in Eclipse, but doing the deployment/simulation via an ANT script which compiles for me. I'm using the V1.8 eTaras jar.

Here's the error I get :

Buildfile: X:\eclipse_workspaces\TEST\QuickTipper\build.xml
buildRIM:
[rim] Building "QuickTipper" project.
[rim] "C:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\bin\rapc.exe" import="C:\Program Files\Research In Motion\BlackBerry JDE 4.2.1\lib\net_rim_api.jar" codename="Quick_Tipper" "Quick_Tipper.rapc" "..\BlackBerryBase\src\java\com\wcs\blackberry\uti l\FormatUtils.java" "..\BlackBerryBase\src\java\com\wcs\blackberry\uti l\TestClass.java" "..\BlackBerryBase\src\java\com\wcs\blackberry\uti l\USCurrencyField.java" "resource\img\tip.png" "src\com\wcs\blackberry\QuickTipper.java" "src\com\wcs\blackberry\QuickTipperFieldChangeList ener.java"

BUILD FAILED
X:\eclipse_workspaces\TEST\QuickTipper\build.xml:5 0: com.etaras.B.A.D: Error!: Error: java compiler failed: javac -source 1.3 -target 1.1 -g -O -d C:\DOCUME~1\mwheaton\LOCALS~1\Temp\rapc_0ee5cde9.d ir -bootcl ...

X:\eclipse_workspaces\TEST\BlackBerryBase\src\java \com\wcs\blackberry\util\TestClass.java:9: package java.text does not exist
import java.text.DecimalFormat;
^
X:\eclipse_workspaces\TEST\BlackBerryBase\src\java \com\wcs\blackberry\util\TestClass.java:23: cannot resolve symbol
symbol : class DecimalFormat
location: class com.wcs.blackberry.util.TestClass
DecimalFormat df = new DecimalFormat("0,000.00");
^
Offline  
Old 03-26-2007, 04:22 PM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
Skipper_Joe's Avatar
 
Join Date: Jan 2007
Location: Kharkov, Ukraine
Model: 8300
Carrier: N/A
Posts: 237
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi, mdwheaton!

You confuse java language versions and java API versions.

java compiler directive "-source" defines version of language, not API. You can define "-source 1.5" and use 1.5 language features (as soon as they don't depend on new APIs). But you can't use JDK 1.5 API (and JDK 1.3 too, btw).
You can only use API, available on BlackBerry device, and it doesn't depend on javac.

To find available APIs, see javadocs, bundled with JDE, or <SIMULATOR_PATH>\lib\net_rim_api.jar.
This is CLDC1.1 + MIDP2 + bunch of BlackBerry-specific packages: net.rim.*
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.