help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-glpk] Using JNI in a frame


From: Mark Rossman
Subject: Re: [Help-glpk] Using JNI in a frame
Date: Tue, 28 Mar 2006 09:01:30 -0500


In your method you should try:

try
{
your code
}
catch(NullPointerException e)
{}

from my experience this usually fixes it without actually doing anything in the catch statement


On 3/27/06, faheem hussain <address@hidden> wrote:
Hi,
  I am trying to use GLPK in my Java program. I want to invoke the solver on pressing a button on the frame. But every time I press the button all I see is NullPointerException. When I close the frame that time GLPK is invoked and send messages on the console of loading the model. It feels like the GlpkSolver is invoked after the calling program is terminated. Can anyone help me solving this issue.

I downloaded the jar file and dll from http://bjoern.dapnet.de/glpk/index.htm . Here is the code I try to run on pressing a button.

public void solveLP(String model){
         GlpkSolver solver = GlpkSolver.readModel(modelFile,dataFile, solutionFile);
        solver.simplex();
        solver.deleteProb ();
    }

Any help would be highly appreciated.


Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1ยข/min.


_______________________________________________
Help-glpk mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]