RomRaider Logo

RomRaider

Open Source ECU Tools
 FAQ •  Register •  Login 

RomRaider

Documentation

Community

Developers

It is currently Fri Dec 26, 2025 10:30 am

All times are UTC - 5 hours [ DST ]





Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Stupid question about JAVA and Libs
PostPosted: Tue Jan 02, 2007 1:44 am 
Offline
RomRaider Developer

Joined: Mon Nov 20, 2006 8:26 pm
Posts: 109
I'm sorry to ask such a remedial question, but I've futzed with this for several hours and am stumped.

My understanding of development under Java and Netbeans has been that if I specify library classes and companion files (ex. a DLL for an I/O class to use to get to com ports) in a project, when I build a .\lib folder should be created and the requried libraries and files copied into it.

My problem is that the lib folder does not appear to be created or populated. I can build, I can even run in the debugger, but if I try to execute the built class with the Java runtime I get an error that it can't find the required libraries. I've tried manually creating the .\lib folder relative to the java file, but the references don't appear to get resolved.

Again, I'm sorry to ask what is undoubtedly a remedial (if not downright stupid) question, but I'm stumped. I've tried searching all the Sun online tutorials, but they seem to skip this (presumably people with sequentially firing neurons don't need help with something this simple!)

Thanks in advance for any insight anyone can give!
-jjf

Oh, an Happy New Year!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 4:19 am 
Offline
RomRaider Developer
User avatar

Joined: Sun Jul 16, 2006 12:09 am
Posts: 644
Location: Brisbane, Australia
I'm not sure about Netbeans, as I've never used it, but with Eclipse and IntelliJ you have to add each of the jars to the classpath manually for the associated project/module. I would have thought it'd be similar for Netbeans. This means you'd manually create a lib folder where you want it, put all your libraries in there and add them to your project classpath in Netbeans.

_________________
Paul.
------------------------------------
MY04 Forester XT (Aus. spec)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 9:10 am 
Offline
Administrator
User avatar

Joined: Fri Jan 13, 2006 12:33 pm
Posts: 2079
Location: Palo, IA
Not sure if this is the case, but it seems if you include a JAR in a project in netbeans, it will put a copy of the JAR in .\lib. But any JAR included in that JAR will not be.

_________________
- Jared


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 4:04 pm 
Offline
RomRaider Developer

Joined: Mon Nov 20, 2006 8:26 pm
Posts: 109
qoncept wrote:
Not sure if this is the case, but it seems if you include a JAR in a project in netbeans, it will put a copy of the JAR in .\lib. But any JAR included in that JAR will not be.


The weird thing is it doesn't seem to move anything. Last night I tried upgrading to NetBeans 5.5 and created a new project (new project from source). I get exactly the same behavior. The only thing that seems to have changed is that the Libraries branch in the Project view will no longer expand (always shows empty, no matter how many libraries I add).

I thought Swing and a test window was going to be the big hurdle, now I'm stumped on getting gnu.io (RXTXcomm.jar and rxtxSerial.dll) properly copied and resolved. Again, I know it must be something incredibly stupid, but I've been stumped.

FWIW, I get the same behavior when I build RomRaider proper - the created .\lib folder is empty. But the built result still runs when placed above the normal .\lib folder - I can't seem to run my little applet outside of the debugger.

Thanks for the help.

-jjf


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 6:01 pm 
Offline
RomRaider Developer

Joined: Mon Nov 20, 2006 8:26 pm
Posts: 109
I just spent my lunch time on this and I'm still confused. After work I'm going to try assembling the lib folder manually, then recreating all library references in the project so they point there.

@#$%@#$! This is frustrating...

-jjf


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 8:19 pm 
Offline
RomRaider Developer
User avatar

Joined: Sun Jul 16, 2006 12:09 am
Posts: 644
Location: Brisbane, Australia
jfitzpat wrote:
I just spent my lunch time on this and I'm still confused. After work I'm going to try assembling the lib folder manually, then recreating all library references in the project so they point there.

@#$%@#$! This is frustrating...

-jjf


Don't want to start an IDE holy war, but ditch Netbeans and try Eclipse, or even better, Intellij (limited to 30 day trial if you don't buy it though...)

_________________
Paul.
------------------------------------
MY04 Forester XT (Aus. spec)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 02, 2007 11:16 pm 
Offline
RomRaider Developer

Joined: Mon Nov 20, 2006 8:26 pm
Posts: 109
I'm ready to try a switch - I don't want a holy war either, but I don't have enough hair left on my head to keep pulling it out!

Thanks for the tip. I'll give Intellij a try.

-jjf


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 06, 2007 2:00 pm 
Offline
Newbie
User avatar

Joined: Fri Jun 09, 2006 4:42 pm
Posts: 57
i seem to be having the same problem in eclipse when trying to get the new gui to run. i am pretty sure i have my buildpath set correctly. any suggestions?

Code:
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
   at java.lang.ClassLoader.loadLibrary(Unknown Source)
   at java.lang.Runtime.loadLibrary0(Unknown Source)
   at java.lang.System.loadLibrary(Unknown Source)
   at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
   at RomRaider.logger.utec.commInterface.UtecInterface.listPortChoices(UtecInterface.java:301)
   at RomRaider.logger.utec.commInterface.UtecInterface.<clinit>(UtecInterface.java:29)
   at RomRaider.logger.utec.impl.UtecTuningEntityImpl.initJMenu(UtecTuningEntityImpl.java:123)
   at RomRaider.logger.utec.impl.UtecTuningEntityImpl.<init>(UtecTuningEntityImpl.java:54)
   at RomRaider.NewGUI.NewGUI.initData(NewGUI.java:69)
   at RomRaider.NewGUI.NewGUI.<init>(NewGUI.java:53)
   at RomRaider.NewGUI.NewGUI.getInstance(NewGUI.java:61)
   at RomRaider.NewGUI.TestNewGUI.main(TestNewGUI.java:8)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 06, 2007 2:38 pm 
Offline
RomRaider Developer

Joined: Tue Jul 11, 2006 9:25 pm
Posts: 1025
disque71 wrote:
i seem to be having the same problem in eclipse when trying to get the new gui to run. i am pretty sure i have my buildpath set correctly. any suggestions?

Code:
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
Exception in thread "main" java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path
   at java.lang.ClassLoader.loadLibrary(Unknown Source)
   at java.lang.Runtime.loadLibrary0(Unknown Source)
   at java.lang.System.loadLibrary(Unknown Source)
   at gnu.io.CommPortIdentifier.<clinit>(CommPortIdentifier.java:83)
   at RomRaider.logger.utec.commInterface.UtecInterface.listPortChoices(UtecInterface.java:301)
   at RomRaider.logger.utec.commInterface.UtecInterface.<clinit>(UtecInterface.java:29)
   at RomRaider.logger.utec.impl.UtecTuningEntityImpl.initJMenu(UtecTuningEntityImpl.java:123)
   at RomRaider.logger.utec.impl.UtecTuningEntityImpl.<init>(UtecTuningEntityImpl.java:54)
   at RomRaider.NewGUI.NewGUI.initData(NewGUI.java:69)
   at RomRaider.NewGUI.NewGUI.<init>(NewGUI.java:53)
   at RomRaider.NewGUI.NewGUI.getInstance(NewGUI.java:61)
   at RomRaider.NewGUI.TestNewGUI.main(TestNewGUI.java:8)


In the arguments pane of the run dialog in RomRaider, you need to put in -Djava.library.path=c:\blah\blah to the folder that contains all the dlls rxtx uses. I'm lazy so I create a folder, dump in all the dlls and use that argument to target it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subsilver by phpBBservice.nl