1. maxma's Avatar
    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 PM
  2. delta_foxtrot2's Avatar
    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 PM
  3. maxma's Avatar
    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 PM
  4. patrick.waugh's Avatar
    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?
    Yes.




    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.
    The RIM BB JDE is a Windows program, so to run it, you'd have to use vmware, or run it under Wine (which I doubt would work well).


    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.
    First, this is not something a newbie programmer or casual linux developer is going to be able to achieve.

    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 PM
  5. maxma's Avatar
    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 PM
  6. patrick.waugh's Avatar
    Thanks for telling me that i have not been chasing a ghost, haha.
    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?
    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.


    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?
    The above seems to indicate that you also don't have your dev environment setup correctly.

    You might want to read a bit on my wiki, that might help.
    11-25-08 04:51 PM
  7. delta_foxtrot2's Avatar
    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.
    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.
    I'm confused here, which is it, does it work or did RIM program things in a "won't work in anything but windows" manner. You controdict yourself in the same post while slagging off others about having no clue.

    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 PM
  8. patrick.waugh's Avatar
    I'm confused here, which is it, does it work or did RIM program things in a "won't work in anything but windows" manner. You controdict yourself in the same post while slagging off others about having no clue.
    If you are confused, you should post a question, but please do so in your own thread, and not hi-jack someone else's thread. Since you are clearly confused maybe you shouldn't have posted to the OP's question.


    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.
    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.
    11-27-08 02:09 PM
  9. delta_foxtrot2's Avatar
    If you are confused, you should post a question, but please do so in your own thread, and not hi-jack someone else's thread. Since you are clearly confused maybe you shouldn't have posted to the OP's question.
    You really should look up the meaning of rhetorical, or perhaps my use and phrasing were too subtle for you, in any case this was completely on topic, since my comments were related to answers you gave that 'contradicted' themselves, on one hand you said it does work, then on the other you said it didn't so which is it?

    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.
    Oh so that's why RIM put in BIG BOLD LETTERING something to the effect of 'by using this software you agree not to decompile, reverse engineer..... ' so on and so forth for at least the storm sim, no doubt all over their other T&Cs as well, I guess whatever degree your corp attorneys got must be pretty worthless since what RIM spells out in plain english, rather than hide it well down in the fine print, is pretty darn well clear, you aren't allowed to do what you are suggesting and well I guess well see how much those lawyers are really worth if RIM decides to make an example out of you. Or are they the sort of lawyers that only understand contracts written in latin and can't understand plain english ones?

    BTW, "controdict" is actually spelled contradict.
    Hmmm only picked up on one grammar or spelling mistake, I'm impressed with myself, usually I make more, but you missed the subtle stuff and had to attack spelling so you must be hard up with a real argument and on to the straw man ones, although you did manage to slip an ad hominem attack in there earlier as well I suppose, so I guess you get a bonus straw man point for that.
    Last edited by delta_foxtrot2; 11-27-08 at 03:49 PM.
    11-27-08 03:43 PM
  10. maxma's Avatar
    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 PM
  11. maxma's Avatar
    Actually looking at the java error i think my Java environment is missing some javax components, the parts that handles the UI?

    More work ahead!
    12-01-08 08:51 PM
LINK TO POST COPIED TO CLIPBOARD