Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Regular Contributor
Posts: 55
Registered: ‎02-17-2010
My Device: BB8100
My Carrier: Airtel
Accepted Solution

Unable to build project on Linux machine (RAPC Task)

Hi,

 

I want to run my build script (ant script with rapc tag) on linux machine. I've included the bb-ant-tools.jar  file in the classpath but it also requires JDE installation directory.

Please help me if anyone knows how to resolve this issue. I can't use windows machine for building my project, is it possible to copy JDE dir from windows machine to linux for running the script?

 

Regards,

Pulkit

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Unable to build project on Linux machine (RAPC Task)

rapc has some hardcoded Windows paths and calls. Most who are not using Windows will code it on whatever system they want and use a VM to compile it.

 

Until RIM releases the full-Java versions of rapc that is the only way you can really do it.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Regular Contributor
Posts: 55
Registered: ‎02-17-2010
My Device: BB8100
My Carrier: Airtel

Re: Unable to build project on Linux machine (RAPC Task)

Please tell me how to do it on linux if its not provided by linux.

If there is some manual on how to do it then please share it.

 

Regards,

Pulkit

Regular Contributor
Posts: 55
Registered: ‎02-17-2010
My Device: BB8100
My Carrier: Airtel

Re: Unable to build project on Linux machine (RAPC Task)

I've copied JDE installation directory from Windows machine to linux machine.

Now I'm getting following error, please help me as I'm unable to figure out a solution.

 

Buildfile: build.xml

 

clean:
   [delete] Deleting directory /home/buildbb/buildbb/workingArea/release_blackberry_1.3.93-Ent-blackberry_4/BackgroundApp/build

 

build:
    [mkdir] Created dir: /home/buildbb/buildbb/workingArea/release_blackberry_1.3.93-Ent-blackberry_4/BackgroundApp/build
     [rapc] Compiling 1 source files to BackgroundApp.cod
     [rapc] /usr/bin/javac: line 3: java: command not found
     [rapc] Error!: Error: java compiler failed: javac -source 1.3 -target 1.1 -g -O -d /tmp/rapc_262d51f7.dir -bootclasspath "/home/buildbb/libs/Bl ...

BUILD FAILED
/home/buildbb/buildbb/workingArea/release_blackberry_1.3.93-Ent-blackberry_4/BackgroundApp/build.xml:16: Java returned: 97

 

Reagrds,

Pulkit

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Unable to build project on Linux machine (RAPC Task)

That's exactly what I said. One of the hard-coded elements is the compiling so rapc goes to invoke javac, can't find it, crashes, and returns what you see. It will only compile on Windows unfortunately.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Regular Contributor
Posts: 55
Registered: ‎02-17-2010
My Device: BB8100
My Carrier: Airtel

Re: Unable to build project on Linux machine (RAPC Task)

So there is no way to build my project on Linux Smiley Indifferent

Regular Contributor
Posts: 55
Registered: ‎02-17-2010
My Device: BB8100
My Carrier: Airtel

Re: Unable to build project on Linux machine (RAPC Task)

Finally solved the issue...

Running rapc on linux is quite easy. It requires rapc.jar and net_rim_api.jar in bin & lib folders respectively alongwith correct path for Java, ANT & WTK (for preverification).

 

 

Highlighted
Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Unable to build project on Linux machine (RAPC Task)

Ok, you figured out a work around. That should be helpful for others trying to do the same thing.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.