Commit 72ea8769 authored by Claes Sjofors's avatar Claes Sjofors

Start java operator locally

parent 375db67a
package jpwr.jop;
import java.awt.*;
import java.io.*;
import javax.swing.*;
import jpwr.rt.*;
public class JopOp {
boolean packFrame = false;
//Construct the application
public JopOp() {
JopOpWindowFrame frame = new JopOpWindowFrame();
//Validate frames that have preset sizes
//Pack frames that have useful preferred size info, e.g. from their layout
if (packFrame) {
frame.pack();
}
else {
frame.validate();
}
//Center the window
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = frame.getSize();
if (frameSize.height > screenSize.height) {
frameSize.height = screenSize.height;
}
if (frameSize.width > screenSize.width) {
frameSize.width = screenSize.width;
}
frame.setBounds( 0, 0, frameSize.width, screenSize.height);
// frame.setLocation((screenSize.width - frameSize.width) / 2, (screenSize.height - frameSize.height) / 2);
frame.setVisible(true);
}
//Main method
public static void main(String[] args) {
if ( args.length > 0)
System.out.println("Arg: " + args[0]);
try {
// UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
// UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
}
catch(Exception e) {
e.printStackTrace();
}
new JopOp();
byte[] buff = new byte[100];
try {
System.in.read(buff);
}
catch ( IOException e) {}
}
}
export CLASSPATH=$pwr_lib/pwr_rt.jar:$pwr_lib/pwr_jop.jar:$pwr_lib/pwr_jopc.jar:$pwr_lib/pwr_bcomp.jar:$pwr_lib/pwr_bcompfc.jar:$pwr_lib/pwr_abb.jar:$pwrp_lib/pwrp_$pwrp_projectname.jar
export LD_LIBRARY_PATH=$pwr_exe
$jdk/bin/java jpwr.jop.JopOp
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment