Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Two Java VMs running

  • 04-06-2005 07:26PM
    #1
    Registered Users, Registered Users 2 Posts: 6,315 ✭✭✭


    I think I have two JVMs running on my laptop. I have two Java.exe files in my process list. Could this be why my laptop is running so slow?

    Also what's the deal with this?
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/comm/CommPortId
    entifier
            at sms.SMSAgent.open(SMSAgent.java:48)
            at sms.SMSAgent.<init>(SMSAgent.java:34)
            at sms.Main.<init>(Main.java:32)
            at sms.Main.main(Main.java:52)
    


Comments

  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Right now, yes, each seperate Java application will open a new JRE instance to run. The entire JRE. Thankfully, some bods at SUn have seen the folly in this, and are currently working on whats called "Barcelona"; basically a linking and sharing architecture to allow different apps run in the same VM.

    As for the error, it looks like the javax.comm.CommPortIdentifier class is missing, or not included in the CLASSPATH.


  • Registered Users, Registered Users 2 Posts: 6,315 ✭✭✭ballooba


    Cheers Aidan,

    That error doesn't come up when I run it in NetBeans.

    This is the first time I have ever tired to run a JAR I have made from the command line.

    I just ran what was in the dist folder. Am I missing something?


  • Registered Users, Registered Users 2 Posts: 6,315 ✭✭✭ballooba


    I'm running it like this btw:
    java -jar JamboIn.jar


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Find where the javax.comm package is ([location]), and run it as

    java -jar -cp .:[location] JamboIn.jar


  • Registered Users, Registered Users 2 Posts: 6,315 ✭✭✭ballooba


    The javax.com also has a DLL attached to it and a javax.properties file.

    These are in the bin folder. Does this matter?

    The above did not work anyway.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 6,315 ✭✭✭ballooba


    Just to let you know i found a solution to this.

    For executable jars the classpath is ignored. They are "closed" units.

    Had to drop the -jar switch and use:

    java -cp .;C:\j2ee\environment\j2sdk1.4.2_05\jre\lib\comm.jar;JamboIn.jar sms.Main


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    Hmm. I didn't know that. Thanks for the tip. Sorry I wasn't more help.


  • Registered Users, Registered Users 2 Posts: 6,315 ✭✭✭ballooba


    Thanks for trying to help anyway. Much appreciated.


Advertisement