Let hibernate8ide run in JBuilder

xiaoxiao2021-03-06  70

Hibernate8IDE has changed the name of Console in the new version. Run as follows, you can use the profile already built in the project, no need to configure it, reduce the opportunity of Hibernamte8IDE errors. In the past, there were various errors. It is very dizzy. Download the latest version of Hibernate-Extensions, extract to the relevant directory. Introducing the hibernateConsole.jar under the Console directory in JB, then introducing all JAR files in the Console / Lib directory Create a StartHibern8ide.java file , Copy the code below, then Run. Refer to the article running in Eclipse. Of course, the following code is the same in Eclipse. Run with the following code, you can solve Chinese problems.

Import java.awt.font;

Import javax.swing.uimanager;

Import com.jgoodies.clearlook.clearlookManager; import com.jgoodies.clearlook.clearlookmode; import com.jgoodies.plaf.plastic.plastic ketflookfeel;

Import net.sf.hibower.cfg.configuration; import net.sf.hibernate.console. *;

Public class starthibern8ide {

Public static void main (string [] args) throws exception {configuration control = new configuration ();

Try {IF ("Sun.AWT.Exception.Handler") == null) {System.SetProperty ("Sun.AWT.Exception.Handler, AWTEXCEPTIONHANDAL.CLASS.GETNAME ());} else {system ClearLookMode.on; UIManager.SetLookandFeel ()); New PlasticxPlookAndfeel ());

Setuifont (New Javax.swing.Plaf.Fontuiresource ("Song", Font.Plain, 12); Configuration.configure ();

//r

Start.startwith (Configuration);

} Catch (Exception E) {// noop E.PrintStackTrace ();

}

public static void setUIFont (javax.swing.plaf.FontUIResource f) {java.util.Enumeration keys = UIManager.getDefaults () keys ();. while (keys.hasMoreElements ()) {Object key = keys.nextElement (); Object value = uimanager.get (key); if (value instanceof javax.swing.plaf.fontuiresource) UIManager.put (key, f);}}}

转载请注明原文地址:https://www.9cbs.com/read-87766.html

New Post(0)