- Hi Guys,
I'm new in Blackberry and it's development. I've got a project requiring me to code , compile and sign some java apps in a RHEL linux environment.Has anyone successfully deployed a working JDE environment in linux?
It was easy to develop in windows as i just had to install the JDE from BB.
After some googling there wasn't much around on BB JDE on linux. So i came here for help and advise.
I found a few pages but they are only pieces of the puzzle,
A simple yes powerful enough tool to completely replace the RIM JDE. However a copy of the JDE must be installed for the rapc and signature tool jar files. Which i am unsure of how to.
http:// bb-ant-tools.sourceforge.net/main
How to sign your BB apps using bb ant tools.
http:// blog.lightvoid.net/2008/04/28/automated-blackberry-sign-tool-mac-linux-windows/
But at the end of the day i'm unsure how to deploy the RIM JDE in linux.
Thanks in advance.11-23-08 09:10 PMLike 0 - I don't believe this is possible, I've installed vmplayer (legally free) and boot the copy of windows that came with the computer from inside linux.
To get everything up and running it's helpful to grab the 30 day trial version of vmware for the desktop, after that you can just go on using the player.
Other virtualisation solutions don't handle the BB changing USB IDs and that can be a pain if you want to connect to a real device for debugging or other reasons.
In any case I've not been able to upgrade the OS from a virtual copy of windows, and needed to resort to using a real copy of windows running natively on a machine for this.11-23-08 09:17 PMLike 0 - I don't believe this is possible, I've installed vmplayer (legally free) and boot the copy of windows that came with the computer from inside linux.
To get everything up and running it's helpful to grab the 30 day trial version of vmware for the desktop, after that you can just go on using the player.
Other virtualisation solutions don't handle the BB changing USB IDs and that can be a pain if you want to connect to a real device for debugging or other reasons.
In any case I've not been able to upgrade the OS from a virtual copy of windows, and needed to resort to using a real copy of windows running natively on a machine for this.
Thanks for the heads up.
My ultimate goal is to automate the compiling and signing of BB apps on linux a RHEL linux machine.
I read on some sites is to setup up a remote windows machine that you can create a cron on the linux to drop the files into the remote machine, somehow trigger it to compile and retrieve it after the compilation.
From what i have googled there seems to be a way to setup the BB JDE libraries and APIs manually and showing the rapc the way to compile the files using the libraries. But the 2 sites only post on these thing briefly and don't have any in depth guides on it.
If anyone has any idea please help.
Thanks~11-23-08 09:40 PMLike 0 -
It was easy to develop in windows as i just had to install the JDE from BB.
After some googling there wasn't much around on BB JDE on linux. So i came
here for help and advise.
I found a few pages but they are only pieces of the puzzle,
A simple yes powerful enough tool to completely replace the RIM JDE. However a copy of the JDE must be installed for the rapc and signature tool jar files. Which i am unsure of how to.
http:// bb-ant-tools.sourceforge.net/main
How to sign your BB apps using bb ant tools.
http:// blog.lightvoid.net/2008/04/28/automated-blackberry-sign-tool-mac-linux-windows/
But at the end of the day i'm unsure how to deploy the RIM JDE in linux.
You have to setup/use either Eclipse Ganymede, or NetBeans. Yes, you do indeed have to also "install" (unzip really) the BB JDE (or JDEs), and you also have to actually modify/correct some of RIMs tools which were programmed to work only on Windows (they clearly missed the whole point of Java).
You may also wish to use Apache Ant, along with BB-Ant-Tools to make life easier.
If you know what you are doing, it can be done. If you are new at linux and programming, I'd stick to Windows unless you have a year to kill.11-24-08 06:12 PMLike 0 - Thanks for telling me that i have not been chasing a ghost, haha.
I have managed to install JDK in my linux machine. I copied the net_rim_api.jar library into the linux machine and set the
CLASSPATH of my .bash_profile to point to the directory i put it in. By doing so i was able to compile the BB code.
Next step is to get the signing tool to work. Any suggestions?
I have tried to run "java SignatureTool.jar" but this is the error it returns
Quote:
Exception in thread "main" java.lang.NoClassDefFoundError: SignatureTool.jar
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
Caused by: java.lang.ClassNotFoundException: SignatureTool.jar not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/root/bb/net_rim_api.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
any ideas?Last edited by maxma; 11-24-08 at 08:18 PM.
11-24-08 08:00 PMLike 0 - No worries. Just glad you didn't listen to those that posted that haven't a clue, have never used Linux/Unix, and have no idea what they are talking about.
I have managed to install JDK in my linux machine. I copied the net_rim_api.jar library into the linux machine and set the
CLASSPATH of my .bash_profile to point to the directory i put it in. By doing so i was able to compile the BB code.
Next step is to get the signing tool to work. Any suggestions?
I have tried to run "java SignatureTool.jar" but this is the error it returns
Quote:
Exception in thread "main" java.lang.NoClassDefFoundError: SignatureTool.jar
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
Caused by: java.lang.ClassNotFoundException: SignatureTool.jar not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:/root/bb/net_rim_api.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
any ideas?
You might want to read a bit on my wiki, that might help.11-25-08 04:51 PMLike 0 - The signing tool was incorrectly programmed by RIM, and although this has been pointed out to them, they have failed to correct the source code and fix it. So, you either have to decompile it and figure out how to fix it yourself, or know someone who can tell you how to do it. Try Googling for the fix, or send me an email.
PS decompiling and "fixing it yourself" goes against RIM terms and conditions and you really shouldn't suggest people do such things in public or you could find yourself in legal hot water if said company decides to make an example out of someone at some point in time. I could be really antagonistic here and state how those of us with no clue about linux etc who aren't breaking any laws or software licenses are doing the right thing (legally speaking) here no matter how stupid RIM is being about it.Last edited by delta_foxtrot2; 11-25-08 at 10:00 PM.
11-25-08 09:55 PMLike 0 -
PS decompiling and "fixing it yourself" goes against RIM terms and conditions and you really shouldn't suggest people do such things in public or you could find yourself in legal hot water if said company decides to make an example out of someone at some point in time. I could be really antagonistic here and state how those of us with no clue about linux etc who aren't breaking any laws or software licenses are doing the right thing (legally speaking) here no matter how stupid RIM is being about it.
BTW, "controdict" is actually spelled contradict.11-27-08 02:09 PMLike 0 -
While we are touched that you are so concerned about us but, we actually have corporate attorneys (who actually went to college and have law degrees - unlike you) who advise us, thanks. And RIM is well aware of the tools which have been modified by the programming community, so don't worry yourself.
BTW, "controdict" is actually spelled contradict.Last edited by delta_foxtrot2; 11-27-08 at 03:49 PM.
11-27-08 03:43 PMLike 0 - Hi Guys,
Cool down guys~
Good news is i have manage to start Signaturetool.jar in the RHEL enviroment.
Just gotta change something to get it to work. I'm now using the same JDE version as the one in the guide, 4.3.
www. slashdev.ca/2008/03/16/using-sigtool-in-linux/ (remove the space)
I dropped the SignatureTool.jar and the few sigtools files.
Initially if i typed "java -jar SignatureTool.jar"
It would prompt me for the COD file and once i selected the COD file it would crash.
By typing "java -jar SignatureTool.jar -p password" i skipped certain buggy parts of the API i guess and i was forwarded to the main UI of the application, where there is the few button below(add/change password/revoke key...etc) and a main box where is shows you the components that needs to be signed if you have added a COD file, but of course it is blank now as i have skipped that step. And i though "Cool! i manage to get it to work!" until i added a COD file, a bunch of error occurs back in the console screen but the application didn't crash! And signaturetool.jar has successfully identified the required signing keys( on the top of the application is displayed "Required Code Signatures : 0/2" and " Optional Code Signatures: 0/1". great i clicked on Request. and a dialog box appeared telling me that signing is successful and the top displayed "Required Code Signatures : 2/2" and " Optional Code Signatures: 1/1".
I'm done!
Next is to get it to automate. I was told that if i ran "java -jar SignatureTool.jar -a -c -p mypass myapp.cod" it will be almost automated because it will pass in the password and the target file. But again it crashed.
My next step would be to ask one of my developers to mod the JDE code to trace where the application crashed and fix the bug for RIM. gggrrrrr....
For those that are interested here is the error log
Exception during event dispatch:
java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTextUI$RootView.paint( libgcj.so.7rh)
at javax.swing.plaf.basic.BasicTextUI.paintSafely(lib gcj.so.7rh)
at javax.swing.plaf.basic.BasicTextUI.paint(libgcj.so .7rh)
at javax.swing.plaf.basic.BasicTextUI.update(libgcj.s o.7rh)
at javax.swing.JComponent.paintComponent(libgcj.so.7r h)
at javax.swing.JComponent.paintDoubleBuffered(libgcj. so.7rh)
at javax.swing.JComponent.paint(libgcj.so.7rh)
at javax.swing.JComponent.update(libgcj.so.7rh)
at net.rim.device.codesigning.signaturetool.ap.valueC hanged(Unknown Source)
at javax.swing.DefaultListSelectionModel.fireValueCha nged(libgcj.so.7rh)
at javax.swing.DefaultListSelectionModel.fireValueCha nged(libgcj.so.7rh)
at javax.swing.DefaultListSelectionModel.setSelection Interval(libgcj.so.7rh)
at javax.swing.JTable.changeSelection(libgcj.so.7rh)
at net.rim.device.codesigning.signaturetool.ap.a(Unkn own Source)
at net.rim.device.codesigning.signaturetool.ap.else(U nknown Source)
at net.rim.device.codesigning.signaturetool.ap.action Performed(Unknown Source)
at javax.swing.AbstractButton.fireActionPerformed(lib gcj.so.7rh)
at javax.swing.AbstractButton$1.actionPerformed(libgc j.so.7rh)
at javax.swing.DefaultButtonModel.fireActionPerformed (libgcj.so.7rh)
at javax.swing.DefaultButtonModel.setPressed(libgcj.s o.7rh)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(libgcj.so.7rh)
at java.awt.AWTEventMulticaster.mouseReleased(libgcj. so.7rh)
at java.awt.Component.processMouseEvent(libgcj.so.7rh )
at java.awt.Component.processEvent(libgcj.so.7rh)
at java.awt.Container.processEvent(libgcj.so.7rh)
at java.awt.Component.dispatchEventImpl(libgcj.so.7rh )
at java.awt.Container.dispatchEventImpl(libgcj.so.7rh )
at java.awt.Component.dispatchEvent(libgcj.so.7rh)
at java.awt.LightweightDispatcher.handleMouseEvent(li bgcj.so.7rh)
at java.awt.LightweightDispatcher.dispatchEvent(libgc j.so.7rh)
at java.awt.Container.dispatchEventImpl(libgcj.so.7rh )
at java.awt.Window.dispatchEventImpl(libgcj.so.7rh)
at java.awt.Component.dispatchEvent(libgcj.so.7rh)
at java.awt.EventQueue.dispatchEvent(libgcj.so.7rh)
at java.awt.EventDispatchThread.run(libgcj.so.7rh)Last edited by maxma; 12-01-08 at 08:55 PM.
12-01-08 08:47 PMLike 0
- Forum
- BlackBerry Developers
- Developers Lounge
Need help in developing apps in RHEL linux enviroment
LINK TO POST COPIED TO CLIPBOARD